diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-03-06 17:24:29 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-03-06 17:24:29 +0000 |
commit | 8dcd50b15558dd2e3ee509779dd39b7f385238f4 (patch) | |
tree | 2400a431c1502cdcbae71901348418b89d1491b3 /src | |
parent | 054c7235c3d1094214b9cbe9f2cc876dfb249d62 (diff) |
fix a bunch of cast and type warnings and don't call the apic "nvram", that
doesn't make no sense. (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3977 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/i386/boot/acpi.c | 2 | ||||
-rw-r--r-- | src/arch/i386/boot/multiboot.c | 8 | ||||
-rw-r--r-- | src/arch/i386/boot/tables.c | 2 | ||||
-rw-r--r-- | src/arch/i386/smp/ioapic.c | 4 | ||||
-rw-r--r-- | src/cpu/x86/lapic/lapic_cpu_init.c | 2 | ||||
-rw-r--r-- | src/cpu/x86/tsc/delay_tsc.c | 9 | ||||
-rw-r--r-- | src/devices/device.c | 3 |
7 files changed, 15 insertions, 15 deletions
diff --git a/src/arch/i386/boot/acpi.c b/src/arch/i386/boot/acpi.c index 40fdf3d368..92338046c0 100644 --- a/src/arch/i386/boot/acpi.c +++ b/src/arch/i386/boot/acpi.c @@ -202,7 +202,7 @@ void acpi_create_ssdt_generator(acpi_header_t *ssdt, char *oem_table_id) ssdt->asl_compiler_revision = 42; ssdt->length = sizeof(acpi_header_t); - acpigen_set_current((unsigned char *) current); + acpigen_set_current((char *) current); current = acpi_fill_ssdt_generator(current, oem_table_id); /* recalculate length */ diff --git a/src/arch/i386/boot/multiboot.c b/src/arch/i386/boot/multiboot.c index 31e9e4aa4f..d331193416 100644 --- a/src/arch/i386/boot/multiboot.c +++ b/src/arch/i386/boot/multiboot.c @@ -72,7 +72,7 @@ static void build_mb_mem_range(void *gp, struct device *dev, struct resource *re build_mb_mem_range_nooverlap(res->base, res->size); } -#define ROUND(_r,_a) ((_r) + (((_a) - 1)) & ~((_a) - 1)) +#define ROUND(_r,_a) (((_r) + (((_a) - 1))) & ~((_a) - 1)) unsigned long write_multiboot_info( unsigned long low_table_start, unsigned long low_table_end, @@ -81,12 +81,12 @@ unsigned long write_multiboot_info( struct multiboot_info *mbi; int i; - mbi = rom_table_end; + mbi = (struct multiboot_info *)rom_table_end; memset(mbi, 0, sizeof(*mbi)); rom_table_end += sizeof(*mbi); mbi->mmap_addr = (u32) rom_table_end; - mb_mem = rom_table_end; + mb_mem = (struct multiboot_mmap_entry *)rom_table_end; /* reserved regions */ reserved_mem[0].addr = low_table_start; @@ -111,5 +111,5 @@ unsigned long write_multiboot_info( printk_info("Multiboot Information structure has been written.\n"); - return mb_mem; + return (unsigned long)mb_mem; } diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c index e8de68a88a..71459570f6 100644 --- a/src/arch/i386/boot/tables.c +++ b/src/arch/i386/boot/tables.c @@ -182,7 +182,7 @@ struct lb_memory *write_tables(void) #if CONFIG_MULTIBOOT /* The Multiboot information structure */ - mbi = rom_table_end; + mbi = (struct multiboot_info *)rom_table_end; rom_table_end = write_multiboot_info( low_table_start, low_table_end, rom_table_start, rom_table_end); diff --git a/src/arch/i386/smp/ioapic.c b/src/arch/i386/smp/ioapic.c index 4e72f46f03..d64b0ad3f3 100644 --- a/src/arch/i386/smp/ioapic.c +++ b/src/arch/i386/smp/ioapic.c @@ -55,11 +55,11 @@ void setup_ioapic(void) { int i; unsigned long value_low, value_high; - unsigned long nvram = 0xfec00000; + unsigned long ioapicaddr = 0xfec00000; volatile unsigned long *l; struct ioapicreg *a = ioapicregvalues; - l = (unsigned long *) nvram; + l = (unsigned long *) ioapicaddr; #if defined(i786) /* For the pentium 4 and above apic deliver their interrupts * on the front side bus, enable that. diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c index 75437fc6e9..d7fdd51886 100644 --- a/src/cpu/x86/lapic/lapic_cpu_init.c +++ b/src/cpu/x86/lapic/lapic_cpu_init.c @@ -295,7 +295,7 @@ void stop_this_cpu(void) lapicid = lapic_read(LAPIC_ID) >> 24; - printk_debug("CPU %d going down...\n", lapicid); + printk_debug("CPU %ld going down...\n", lapicid); /* send an LAPIC INIT to myself */ lapic_write_around(LAPIC_ICR2, SET_LAPIC_DEST_FIELD(lapicid)); diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c index 92de0288a7..946d2cf512 100644 --- a/src/cpu/x86/tsc/delay_tsc.c +++ b/src/cpu/x86/tsc/delay_tsc.c @@ -104,6 +104,7 @@ static unsigned long long calibrate_tsc(void) unsigned long long start, end, delta; unsigned long result, count; + printk_spew("Calibrating delay loop...\n"); start = rdtscll(); // no udivdi3, dammit. // so we count to 1<< 20 and then right shift 20 @@ -127,10 +128,10 @@ static unsigned long long calibrate_tsc(void) delta >>= 20; // save this for microsecond timing. result = delta; - printk_spew("end %x, start %x\n", end, start); - printk_spew("32-bit delta %d\n", (unsigned long) delta); + printk_spew("end %llx, start %llx\n", end, start); + printk_spew("32-bit delta %ld\n", (unsigned long) delta); - printk_spew("%s 32-bit result is %d\n", + printk_spew("%s 32-bit result is %ld\n", __func__, result); return delta; @@ -143,7 +144,7 @@ void init_timer(void) { if (!clocks_per_usec) { clocks_per_usec = calibrate_tsc(); - printk_info("clocks_per_usec: %u\n", clocks_per_usec); + printk_info("clocks_per_usec: %lu\n", clocks_per_usec); } } diff --git a/src/devices/device.c b/src/devices/device.c index a66969d9b7..06d32ea1f8 100644 --- a/src/devices/device.c +++ b/src/devices/device.c @@ -357,8 +357,7 @@ void compute_allocate_resource( resource->flags &= ~IORESOURCE_STORED; base += size; - printk_spew( - "%s %02lx * [0x%08Lx - 0x%08Lx] %s\n", + printk_spew("%s %02lx * [0x%08Lx - 0x%08Lx] %s\n", dev_path(dev), resource->index, resource->base, |