Author: mcayland Date: Sat Apr 28 15:34:42 2012 New Revision: 1049 URL: http://tracker.coreboot.org/trac/openbios/changeset/1049
Log: Rename ofmem_arch_early_map_pages() to ofmem_arch_map_pages().
This OFMEM call does actually map the page for the architectures that require it, so let's change its name so that we now have a symmetrical ofmem_arch_map_pages() and ofmem_arch_unmap_pages() API.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/ppc/ofmem.c trunk/openbios-devel/arch/ppc/qemu/ofmem.c trunk/openbios-devel/arch/sparc32/lib.c trunk/openbios-devel/arch/sparc64/lib.c trunk/openbios-devel/drivers/iommu.c trunk/openbios-devel/include/libopenbios/ofmem.h trunk/openbios-devel/libopenbios/ofmem_common.c
Modified: trunk/openbios-devel/arch/ppc/ofmem.c ============================================================================== --- trunk/openbios-devel/arch/ppc/ofmem.c Sat Mar 17 17:34:21 2012 (r1048) +++ trunk/openbios-devel/arch/ppc/ofmem.c Sat Apr 28 15:34:42 2012 (r1049) @@ -121,7 +121,7 @@ /* kill page mappings in provided range */ }
-void ofmem_arch_early_map_pages(ucell phys, ucell virt, ucell size, ucell mode) +void ofmem_arch_map_pages(ucell phys, ucell virt, ucell size, ucell mode) { /* none yet */ }
Modified: trunk/openbios-devel/arch/ppc/qemu/ofmem.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/ofmem.c Sat Mar 17 17:34:21 2012 (r1048) +++ trunk/openbios-devel/arch/ppc/qemu/ofmem.c Sat Apr 28 15:34:42 2012 (r1049) @@ -129,7 +129,7 @@ /* kill page mappings in provided range */ }
-void ofmem_arch_early_map_pages(phys_addr_t phys, ucell virt, ucell size, ucell mode) +void ofmem_arch_map_pages(phys_addr_t phys, ucell virt, ucell size, ucell mode) { /* none yet */ }
Modified: trunk/openbios-devel/arch/sparc32/lib.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/lib.c Sat Mar 17 17:34:21 2012 (r1048) +++ trunk/openbios-devel/arch/sparc32/lib.c Sat Apr 28 15:34:42 2012 (r1049) @@ -342,7 +342,7 @@ /* Currently do nothing */ }
-void ofmem_arch_early_map_pages(phys_addr_t phys, ucell virt, ucell size, ucell mode) +void ofmem_arch_map_pages(phys_addr_t phys, ucell virt, ucell size, ucell mode) { map_pages(phys, virt, size, mode); }
Modified: trunk/openbios-devel/arch/sparc64/lib.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/lib.c Sat Mar 17 17:34:21 2012 (r1048) +++ trunk/openbios-devel/arch/sparc64/lib.c Sat Apr 28 15:34:42 2012 (r1049) @@ -476,7 +476,7 @@ unmap_pages(virt, size); }
-void ofmem_arch_early_map_pages(phys_addr_t phys, ucell virt, ucell size, ucell mode) +void ofmem_arch_map_pages(phys_addr_t phys, ucell virt, ucell size, ucell mode) { if (mode & SPITFIRE_TTE_LOCKED) { // install locked tlb entries now
Modified: trunk/openbios-devel/drivers/iommu.c ============================================================================== --- trunk/openbios-devel/drivers/iommu.c Sat Mar 17 17:34:21 2012 (r1048) +++ trunk/openbios-devel/drivers/iommu.c Sat Apr 28 15:34:42 2012 (r1049) @@ -68,7 +68,7 @@ */ mva = (unsigned int) va; mpa = (unsigned int) pa; - ofmem_arch_early_map_pages(mpa, mva, npages * PAGE_SIZE, ofmem_arch_io_translation_mode(mpa)); + ofmem_arch_map_pages(mpa, mva, npages * PAGE_SIZE, ofmem_arch_io_translation_mode(mpa));
/* * Map into IOMMU page table.
Modified: trunk/openbios-devel/include/libopenbios/ofmem.h ============================================================================== --- trunk/openbios-devel/include/libopenbios/ofmem.h Sat Mar 17 17:34:21 2012 (r1048) +++ trunk/openbios-devel/include/libopenbios/ofmem.h Sat Apr 28 15:34:42 2012 (r1049) @@ -67,15 +67,15 @@ extern ucell ofmem_arch_get_iomem_base(void); extern ucell ofmem_arch_get_iomem_top(void); extern retain_t* ofmem_arch_get_retained(void); -extern int ofmem_arch_get_physaddr_cellsize(void); -extern int ofmem_arch_encode_physaddr(ucell *p, phys_addr_t value); +extern int ofmem_arch_get_physaddr_cellsize(void); +extern int ofmem_arch_encode_physaddr(ucell *p, phys_addr_t value); extern int ofmem_arch_get_available_entry_size(phandle_t ph); extern void ofmem_arch_create_available_entry(phandle_t ph, ucell *availentry, phys_addr_t start, ucell size); extern int ofmem_arch_get_translation_entry_size(void); extern void ofmem_arch_create_translation_entry(ucell *transentry, translation_t *t); extern ucell ofmem_arch_default_translation_mode( phys_addr_t phys ); extern ucell ofmem_arch_io_translation_mode( phys_addr_t phys ); -extern void ofmem_arch_early_map_pages(phys_addr_t phys, ucell virt, ucell size, +extern void ofmem_arch_map_pages(phys_addr_t phys, ucell virt, ucell size, ucell mode); extern void ofmem_arch_unmap_pages(ucell virt, ucell size); /* sparc64 uses this method */
Modified: trunk/openbios-devel/libopenbios/ofmem_common.c ============================================================================== --- trunk/openbios-devel/libopenbios/ofmem_common.c Sat Mar 17 17:34:21 2012 (r1048) +++ trunk/openbios-devel/libopenbios/ofmem_common.c Sat Apr 28 15:34:42 2012 (r1049) @@ -794,8 +794,8 @@ /* install translations */ ofmem_map_page_range(phys, virt, size, mode);
- /* allow arch to install mappings early, e.g. for locked mappings */ - ofmem_arch_early_map_pages(phys, virt, size, mode); + /* allow arch to map the pages */ + ofmem_arch_map_pages(phys, virt, size, mode);
return 0; } @@ -836,7 +836,7 @@ mode = ofmem_arch_io_translation_mode(off);
ofmem_map_page_range(phys, virt, npages * PAGE_SIZE, mode); - ofmem_arch_early_map_pages(phys, virt, npages * PAGE_SIZE, mode); + ofmem_arch_map_pages(phys, virt, npages * PAGE_SIZE, mode);
return (virt + off); }