diff -urN -X .exclude linux-nubus-000910post1/arch/ppc/appleboot/misc.c linux-nubus/arch/ppc/appleboot/misc.c --- linux-nubus-000910post1/arch/ppc/appleboot/misc.c Thu Sep 14 10:35:59 2000 +++ linux-nubus/arch/ppc/appleboot/misc.c Thu Sep 14 10:35:13 2000 @@ -255,10 +255,11 @@ { int i; static char num_table[] = "0123456789"; - unsigned long size, digits, need_zero, need_comma, have_simm; + unsigned long size, digits, need_zero, need_comma, have_simm, zeroth; have_simm = 0; - for (i = 0; i < MAX_DRAM_BANKS; i++) { + zeroth = mach_info2->physical_dram[0].size; + for (i = 1; i < MAX_DRAM_BANKS; i++) { int j, flag; if (!mach_infos->physical_dram[i].size || !mach_infos->physical_dram[i].base) @@ -283,9 +284,7 @@ } if (!have_simm) { - bprint("\nIt appears as though no SIMM is installed"); - bprint(" on this machine...."); - while(1); + mem_bank[0].size = zeroth - (8 << 20); } else if (have_simm < 0) { bprint("\nFound SIMM at unsupported base address\n"); while(1); @@ -526,6 +525,11 @@ mem_pieces_sort(mp); mem_pieces_coalesce(mp); + if (!mp->n_regions) { + bprint("No memory???\n"); + while(1); + } + /* Use the largest region (and 0th) only */ max = 0; imax = 0; @@ -548,7 +552,7 @@ if (boot_infos->architecture & BOOT_ARCH_NUBUS_PDM) mem_pieces_remove(mp, PDM_VIDEO_RAM, PDM_VIDEO_SIZE, 1); - /* save Mas OS's exception handlers if it hasn't been destroyed yet. */ + /* save Mac OS's exception handlers if it hasn't been destroyed yet. */ /* it appears that we get some exception (alignment?) in gunzip() */ exception_handler &= 0xfff80000; mem_pieces_remove(&phys_mem, exception_handler, 0x80000, 0); Binary files linux-nubus-000910post1/arch/ppc/coffboot/coffboot and linux-nubus/arch/ppc/coffboot/coffboot differ Binary files linux-nubus-000910post1/arch/ppc/coffboot/note and linux-nubus/arch/ppc/coffboot/note differ diff -urN -X .exclude linux-nubus-000910post1/arch/ppc/kernel/nubus_pmac_setup.c linux-nubus/arch/ppc/kernel/nubus_pmac_setup.c --- linux-nubus-000910post1/arch/ppc/kernel/nubus_pmac_setup.c Sun Sep 10 02:25:40 2000 +++ linux-nubus/arch/ppc/kernel/nubus_pmac_setup.c Thu Sep 14 02:10:13 2000 @@ -48,12 +48,6 @@ #include #include -struct reg_property __attribute((aligned(sizeof(struct reg_property)))) -nubus_mem_bank[8] __initdata = { - {0x01000000,0}, {0x05000000,0}, {0x09000000,0}, {0x0d000000,0}, - {0x11000000,0}, {0x15000000,0}, {0x19000000,0}, {0x1d000000,0} -}; - static struct address_range __attribute((aligned(16))) nubus_addrs[] __initdata = { /* via-cuda, 0 */ @@ -295,7 +289,12 @@ { int i, j; struct device_node *dp, *dn; - struct reg_property *rp, *mem_bank = nubus_mem_bank; + struct reg_property *rp; + struct reg_property mem_bank[9] = { + {0,0}, + {0x01000000,0}, {0x05000000,0}, {0x09000000,0}, {0x0d000000,0}, + {0x11000000,0}, {0x15000000,0}, {0x19000000,0}, {0x1d000000,0} + }; char *p, *q; if (!boot_infos) @@ -324,7 +323,7 @@ for (i = 0; i < boot_infos->physMemoryMapSize; i++) { if (!boot_infos->physMemoryMap[i].size) continue; - for (j = 0; j < 8; j++) { + for (j = 0; j < 9; j++) { if (boot_infos->physMemoryMap[i].physAddr == mem_bank[j].address) mem_bank[j].size = @@ -345,7 +344,7 @@ bank = simple_strtoul(q, &q, 0); if (bank < 1 || bank > 8) break; - --bank; + bank; ++q; if (q[-1] != ':') break; @@ -370,9 +369,9 @@ /* "reg" is the only property in properties */ rp = (struct reg_property *)dp->properties[0].value; /* update device node */ - for (i = 0; i < 8; ++i) { - rp[i + 1].size = mem_bank[i].size; - dp->addrs[i + 1].size = mem_bank[i].size; + for (i = 0; i < 9; ++i) { + rp[i].size = mem_bank[i].size; + dp->addrs[i].size = mem_bank[i].size; } /* fix up serial property */ diff -urN -X .exclude linux-nubus-000910post1/arch/ppc/mm/init.c linux-nubus/arch/ppc/mm/init.c --- linux-nubus-000910post1/arch/ppc/mm/init.c Sun Sep 10 16:19:31 2000 +++ linux-nubus/arch/ppc/mm/init.c Thu Sep 14 02:10:56 2000 @@ -119,9 +119,6 @@ pte_t *kmap_pte; pgprot_t kmap_prot; #endif -#ifdef CONFIG_NUBUS_PMAC -extern struct reg_property nubus_mem_bank[]; -#endif /* CONFIG_NUBUS_PMAC */ void MMU_init(void); static void *MMU_get_page(void); @@ -1576,16 +1573,6 @@ initpages<< (PAGE_SHIFT-10), PAGE_OFFSET, (unsigned long) end_of_DRAM); -#ifdef CONFIG_NUBUS_PMAC - printk("Memory: built-in 8 MB"); - for (i = 0; i < 8; i++) { - if (nubus_mem_bank[i].size != 0) { - printk(", bank%d %d MB", i + 1, - (int)(nubus_mem_bank[i].size >> 20)); - } - } - printk("\n"); -#else /* CONFIG_NUBUS_PMAC */ printk("Memory: "); for (i = 0; i < phys_mem.n_regions; i++) { printk("node%d %d kB", i, @@ -1594,7 +1581,6 @@ printk(", "); } printk("\n"); -#endif /* CONFIG_NUBUS_PMAC */ mem_init_done = 1; } @@ -1816,17 +1802,6 @@ } #endif /* CONFIG_APUS */ - -static void __init -clear_hash_table(void) -{ - unsigned char *adr = (unsigned char *)Hash; - unsigned long i = Hash_size; - - for (; i > 0; --i) - *adr++ = 0; -} - /* * Initialize the hash table and patch the instructions in head.S. */ @@ -1887,7 +1862,7 @@ /* Find some memory for the hash table. */ if ( Hash_size ) { Hash = mem_pieces_find(Hash_size, Hash_size); - clear_hash_table(); + __clear_user((void *)Hash, Hash_size); } else Hash = 0; #endif /* CONFIG_PPC64BRIDGE */