Author: mcayland Date: Tue Apr 9 21:25:46 2013 New Revision: 1116 URL: http://tracker.coreboot.org/trac/openbios/changeset/1116
Log: Revert "Remove /chosen "mmu" property from the default device tree."
This reverts commit 0bfdafe64f0e7e0a3a692292c82ed22df4d2188b as it accidentally contained parts of a subsequent patch.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/ppc/qemu/ofmem.c trunk/openbios-devel/arch/sparc32/lib.c trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c trunk/openbios-devel/forth/device/tree.fs
Modified: trunk/openbios-devel/arch/ppc/qemu/ofmem.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/ofmem.c Tue Apr 9 21:17:02 2013 (r1115) +++ trunk/openbios-devel/arch/ppc/qemu/ofmem.c Tue Apr 9 21:25:46 2013 (r1116) @@ -549,10 +549,9 @@ { ofmem_t *ofmem = ofmem_arch_get_private();
- /* Map the memory (don't map page 0 to allow catching of NULL dereferences) */ - ofmem_claim_phys(PAGE_SIZE, get_ram_bottom() - PAGE_SIZE, 0); - ofmem_claim_virt(PAGE_SIZE, get_ram_bottom() - PAGE_SIZE, 0); - ofmem_map(PAGE_SIZE, PAGE_SIZE, get_ram_bottom() - PAGE_SIZE, 0); + ofmem_claim_phys(0, get_ram_bottom(), 0); + ofmem_claim_virt(0, get_ram_bottom(), 0); + ofmem_map(0, 0, get_ram_bottom(), 0);
/* Map everything at the top of physical RAM 1:1, minus the OpenBIOS ROM in RAM copy */ ofmem_claim_phys(get_ram_top(), get_hash_base() + HASH_SIZE - get_ram_top(), 0);
Modified: trunk/openbios-devel/arch/sparc32/lib.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/lib.c Tue Apr 9 21:17:02 2013 (r1115) +++ trunk/openbios-devel/arch/sparc32/lib.c Tue Apr 9 21:25:46 2013 (r1116) @@ -403,9 +403,9 @@ ofmem_arch_map_pages(pa, va, size, ofmem_arch_default_translation_mode(pa)); ofmem_map_page_range(pa, va, size, ofmem_arch_default_translation_mode(pa));
- // 1:1 mapping for RAM (don't map page 0 to allow catching of NULL dereferences) - ofmem_arch_map_pages(PAGE_SIZE, PAGE_SIZE, LOWMEMSZ - PAGE_SIZE, ofmem_arch_default_translation_mode(0)); - ofmem_map_page_range(PAGE_SIZE, PAGE_SIZE, LOWMEMSZ - PAGE_SIZE, ofmem_arch_default_translation_mode(0)); + // 1:1 mapping for RAM + ofmem_arch_map_pages(0, 0, LOWMEMSZ, ofmem_arch_default_translation_mode(0)); + ofmem_map_page_range(0, 0, LOWMEMSZ, ofmem_arch_default_translation_mode(0));
/* * Flush cache
Modified: trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c Tue Apr 9 21:17:02 2013 (r1115) +++ trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c Tue Apr 9 21:25:46 2013 (r1116) @@ -365,8 +365,8 @@ /* inherit translations set up by entry.S */ ofmem_walk_boot_map(remap_page_range);
- /* Map the memory (don't map page 0 to allow catching of NULL dereferences) */ - ofmem_map_page_range(PAGE_SIZE, PAGE_SIZE, qemu_mem_size - PAGE_SIZE, 0x36); + /* Map the memory */ + ofmem_map_page_range(0, 0, qemu_mem_size, 0x36);
if (!(retained->magic == RETAIN_MAGIC)) { OFMEM_TRACE("ofmem_init: no retained magic found, creating\n");
Modified: trunk/openbios-devel/forth/device/tree.fs ============================================================================== --- trunk/openbios-devel/forth/device/tree.fs Tue Apr 9 21:17:02 2013 (r1115) +++ trunk/openbios-devel/forth/device/tree.fs Tue Apr 9 21:25:46 2013 (r1116) @@ -54,6 +54,7 @@ \ " hda1:/boot/vmunix" encode-string " bootpath" property \ " -as" encode-string " bootargs" property 0 encode-int " memory" property + 0 encode-int " mmu" property finish-device
\ END