From 44c092f57d1906a359ea7b088aea02b5a2fed627 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 5 Mar 2007 03:42:12 +0000 Subject: [PATCH] With the current set of changes, bochs bios sees the right amount of memory. qemu does not, which is odd. in bochs, we get this. find_lb_table: header test: L I I O find_lb_table: Found candidate at: 00000500 find_lb_table: header checksum o.k. find_lb_table: table checksum o.k. find_lb_table: record count o.k. collect_linuxbios_info: collect_linuxbios_info: yes collect_linuxbios_info: Found LinuxBIOS table at: 00000500 malloc_diag: alloc: 0 bytes (0 blocks), free: 16376 bytes (1 blocks) malloc_diag: alloc: 72 bytes (1 blocks), free: 16304 bytes (1 blocks) convert_memmap: 0x00000000000000 0x000000000005a4 16 convert_memmap: 0x000000000005a4 0x000000000efa5c 1 convert_memmap: 0x000000000f0000 0x00000001f10000 1 convert_memmap: 0x000000000f0000 0x00000000000000 16 collect_sys_info: after collect info->memrange 00119418 collect_sys_info: 00000000000005a4-00000000000f0000 collect_sys_info: 00000000000f0000-0000000002000000 collect_sys_info: RAM 32 MB Some further changes are coming, aimed at making it easier for people to understand how things fit together. Signed-off-by: Ronald G. Minnich Acked-by: Ronald G. Minnich Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@185 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/linuxbios_table.c | 5 ++++- device/device_util.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/linuxbios_table.c b/arch/x86/linuxbios_table.c index 52e333a426..ccd99a5d3a 100644 --- a/arch/x86/linuxbios_table.c +++ b/arch/x86/linuxbios_table.c @@ -181,7 +181,7 @@ void lb_memory_range(struct lb_memory *mem, u32 type, u64 start, u64 size) { int entries; - printk(BIOS_SPEW-2, "%s: start 0x%lx size 0x%lx\n", __func__, start, size); + printk(BIOS_SPEW-2, "%s: start 0x%lx size 0x%lx\n", __func__, (u32)start, (u32)size); entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); mem->map[entries].start = pack_lb64(start); mem->map[entries].size = pack_lb64(size); @@ -243,6 +243,9 @@ static void lb_cleanup_memory_ranges(struct lb_memory *mem) int entries; int i, j; entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); + printk(BIOS_INFO, "%s: # entries %d\n", __func__, entries); + for(i = 0; i < entries; i++) + printk(BIOS_INFO, " #%d: base 0x%x size 0x%x\n", i, (u32)mem->map[i].start.lo, mem->map[i].size.lo); /* Sort the lb memory ranges */ for(i = 0; i < entries; i++) { diff --git a/device/device_util.c b/device/device_util.c index 5f9695b3bd..174cd9101f 100644 --- a/device/device_util.c +++ b/device/device_util.c @@ -514,8 +514,8 @@ void search_global_resources( if (!curdev->have_resources) continue; for(i = 0; i < curdev->resources; i++) { struct resource *resource = &curdev->resource[i]; - printk(BIOS_SPEW, "%s: dev %s, resource %d, flags %x\n", __func__, curdev->dtsname, - i, resource->flags); + printk(BIOS_SPEW, "%s: dev %s, resource %d, flags %x base 0x%lx size 0x%lx\n", __func__, curdev->dtsname, + i, resource->flags, (u32) resource->base, (u32)resource->size); /* If it isn't the right kind of resource ignore it */ if ((resource->flags & type_mask) != type) { continue;