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 --- openbios-devel/arch/ppc/ofmem.c | 2 +- openbios-devel/arch/ppc/qemu/ofmem.c | 2 +- openbios-devel/arch/sparc32/lib.c | 2 +- openbios-devel/arch/sparc64/lib.c | 2 +- openbios-devel/drivers/iommu.c | 2 +- openbios-devel/include/libopenbios/ofmem.h | 6 +++--- openbios-devel/libopenbios/ofmem_common.c | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/openbios-devel/arch/ppc/ofmem.c b/openbios-devel/arch/ppc/ofmem.c index 436cfe3..c9b066e 100644 --- a/openbios-devel/arch/ppc/ofmem.c +++ b/openbios-devel/arch/ppc/ofmem.c @@ -121,7 +121,7 @@ void ofmem_arch_unmap_pages(ucell virt, ucell size) /* 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 */ } diff --git a/openbios-devel/arch/ppc/qemu/ofmem.c b/openbios-devel/arch/ppc/qemu/ofmem.c index 1319389..fbade1e 100644 --- a/openbios-devel/arch/ppc/qemu/ofmem.c +++ b/openbios-devel/arch/ppc/qemu/ofmem.c @@ -129,7 +129,7 @@ void ofmem_arch_unmap_pages(ucell virt, ucell size) /* 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 */ } diff --git a/openbios-devel/arch/sparc32/lib.c b/openbios-devel/arch/sparc32/lib.c index 020f781..dde5a0f 100644 --- a/openbios-devel/arch/sparc32/lib.c +++ b/openbios-devel/arch/sparc32/lib.c @@ -342,7 +342,7 @@ void ofmem_arch_unmap_pages(ucell virt, ucell size) /* 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); } diff --git a/openbios-devel/arch/sparc64/lib.c b/openbios-devel/arch/sparc64/lib.c index 58286ba..893fde1 100644 --- a/openbios-devel/arch/sparc64/lib.c +++ b/openbios-devel/arch/sparc64/lib.c @@ -476,7 +476,7 @@ void ofmem_arch_unmap_pages(ucell virt, ucell size) 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 diff --git a/openbios-devel/drivers/iommu.c b/openbios-devel/drivers/iommu.c index 5eb8a60..47c6130 100644 --- a/openbios-devel/drivers/iommu.c +++ b/openbios-devel/drivers/iommu.c @@ -68,7 +68,7 @@ dvma_alloc(int size, unsigned int *pphys) */ 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. diff --git a/openbios-devel/include/libopenbios/ofmem.h b/openbios-devel/include/libopenbios/ofmem.h index 30f20d8..f5c442e 100644 --- a/openbios-devel/include/libopenbios/ofmem.h +++ b/openbios-devel/include/libopenbios/ofmem.h @@ -67,15 +67,15 @@ extern phys_addr_t ofmem_arch_get_phys_top(void); 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 */ diff --git a/openbios-devel/libopenbios/ofmem_common.c b/openbios-devel/libopenbios/ofmem_common.c index ac36fca..bae0732 100644 --- a/openbios-devel/libopenbios/ofmem_common.c +++ b/openbios-devel/libopenbios/ofmem_common.c @@ -794,8 +794,8 @@ int ofmem_map( phys_addr_t phys, ucell virt, ucell size, ucell mode ) /* 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 @@ ucell ofmem_map_io( phys_addr_t phys, ucell size ) 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); }