j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Sun Feb 16 17:26:40 2014 New Revision: 1267 URL: http://tracker.coreboot.org/trac/openbios/changeset/1267
Log: SPARC32: unmap freed memory in ofmem_arch_unmap_pages()
During NextStep boot, all the virtual memory is probed so freed memory must be properly unmapped.
Signed-off-by: Olivier Danet odanet@caramail.com Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c
Modified: trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c Sun Feb 16 17:26:37 2014 (r1266) +++ trunk/openbios-devel/arch/sparc32/ofmem_sparc32.c Sun Feb 16 17:26:40 2014 (r1267) @@ -142,8 +142,16 @@ /* Unmap a set of pages */ void ofmem_arch_unmap_pages(ucell virt, ucell size) { - /* OFMEM re-maps the pages for us, so just ensure the TLB is in sync */ - srmmu_flush_whole_tlb(); + unsigned long pa; + ucell i; + + for (i = 0; i < size; i += PAGE_SIZE) { + pa = find_pte(virt, 0); + *(uint32_t *)pa = 0; + virt += PAGE_SIZE; + } + + srmmu_flush_whole_tlb(); }
/* Map a set of pages */