From 7201e9b32ee93e189d7682a38678dab919941986 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 17 Feb 2004 10:26:46 +0000 Subject: [PATCH] move call to get_memory_mep() to memory.c --- second/bootinfo.c | 9 +++------ second/main.c | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/second/bootinfo.c b/second/bootinfo.c index ede3370..65a8c6c 100644 --- a/second/bootinfo.c +++ b/second/bootinfo.c @@ -234,7 +234,6 @@ MacHasHardware(unsigned long gestaltBit) void bootinfo_init() { long proc, fpu, mmu, mach, ram; - memory_map_t map; int i; /* I'm a macintosh, I know, I'm sure */ @@ -322,12 +321,10 @@ void bootinfo_init() /* memory structure */ - get_memory_map(&map); - - for (i = 0; i < map.bank_number; i++) + for (i = 0; i < memory_map.bank_number; i++) { - boot_info.memory[i].addr = map.bank[i].address; - boot_info.memory[i].size = map.bank[i].size; + boot_info.memory[i].addr = memory_map.bank[i].address; + boot_info.memory[i].size = memory_map.bank[i].size; } boot_info.num_memory = i; diff --git a/second/main.c b/second/main.c index e5c8c36..5bda25a 100644 --- a/second/main.c +++ b/second/main.c @@ -26,7 +26,6 @@ int main(int argc, char** argv) char* kernel_image_start = &_kernel_start; unsigned long kernel_image_size = &_kernel_end - &_kernel_start; unsigned long kernel_size = (unsigned long)&_KERNEL_SIZE; - memory_map_t map; int i; printf("Early Macintosh Image LoadEr\n"); @@ -37,13 +36,14 @@ int main(int argc, char** argv) printf("Kernel image size is %ld Bytes\n", kernel_image_size); printf("Physical memory map:\n"); - get_memory_map(&map); - for (i = 0; i < map.bank_number; i++) + for (i = 0; i < memory_map.bank_number; i++) { - printf("%d: 0x%08lx -> 0x%08lx\n", i, map.bank[i].address - , map.bank[i].address + map.bank[i].size); + printf("%d: 0x%08lx -> 0x%08lx\n", i, + memory_map.bank[i].address, + memory_map.bank[i].address + memory_map.bank[i].size); } +while(1); if (kernel_image_size != 0) { /* add KERNEL_ALIGN if we have to align