Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap()
instead of hiding behind pmap_map_chunk(). It's not longer needed after old pmap-v6 code was removed. For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used even for __ARM_ARCH < 6.
This commit is contained in:
parent
fb872bbc68
commit
677ba8502b
@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/armreg.h>
|
||||
#include <machine/devmap.h>
|
||||
#include <machine/vmparam.h>
|
||||
@ -52,6 +53,9 @@ static boolean_t devmap_bootstrap_done = false;
|
||||
#define PTE_DEVICE VM_MEMATTR_DEVICE
|
||||
#elif defined(__arm__)
|
||||
#define MAX_VADDR ARM_VECTORS_HIGH
|
||||
#if __ARM_ARCH >= 6
|
||||
#define PTE_DEVICE VM_MEMATTR_DEVICE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -204,8 +208,13 @@ arm_devmap_bootstrap(vm_offset_t l1pt, const struct arm_devmap_entry *table)
|
||||
|
||||
for (pd = devmap_table; pd->pd_size != 0; ++pd) {
|
||||
#if defined(__arm__)
|
||||
#if __ARM_ARCH >= 6
|
||||
pmap_preboot_map_attr(pd->pd_pa, pd->pd_va, pd->pd_size,
|
||||
pd->pd_prot, pd->pd_cache);
|
||||
#else
|
||||
pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size,
|
||||
pd->pd_prot,pd->pd_cache);
|
||||
pd->pd_prot, pd->pd_cache);
|
||||
#endif
|
||||
#elif defined(__aarch64__)
|
||||
pmap_kenter_device(pd->pd_va, pd->pd_size, pd->pd_pa);
|
||||
#endif
|
||||
|
@ -218,12 +218,6 @@ vm_offset_t pmap_preboot_reserve_pages(u_int );
|
||||
vm_offset_t pmap_preboot_get_vpages(u_int );
|
||||
void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t,
|
||||
vm_memattr_t);
|
||||
static __inline void
|
||||
pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa,
|
||||
vm_size_t size, int prot, int cache)
|
||||
{
|
||||
pmap_preboot_map_attr(pa, va, size, prot, cache);
|
||||
}
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@ -256,29 +250,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa,
|
||||
*/
|
||||
void vector_page_setprot(int);
|
||||
|
||||
/*
|
||||
* sys/arm/arm/bus_space_generic.c (just comment)
|
||||
* sys/arm/arm/devmap.c
|
||||
* sys/arm/arm/pmap.c (just comment)
|
||||
* sys/arm/at91/at91_machdep.c
|
||||
* sys/arm/cavium/cns11xx/econa_machdep.c
|
||||
* sys/arm/freescale/imx/imx6_machdep.c (just comment)
|
||||
* sys/arm/mv/orion/db88f5xxx.c
|
||||
* sys/arm/mv/mv_localbus.c
|
||||
* sys/arm/mv/mv_machdep.c
|
||||
* sys/arm/mv/mv_pci.c
|
||||
* sys/arm/s3c2xx0/s3c24x0_machdep.c
|
||||
* sys/arm/versatile/versatile_machdep.c
|
||||
* sys/arm/xscale/ixp425/avila_machdep.c
|
||||
* sys/arm/xscale/i8134x/crb_machdep.c
|
||||
* sys/arm/xscale/i80321/ep80219_machdep.c
|
||||
* sys/arm/xscale/i80321/iq31244_machdep.c
|
||||
* sys/arm/xscale/pxa/pxa_machdep.c
|
||||
*/
|
||||
#define PTE_DEVICE PTE2_ATTR_DEVICE
|
||||
|
||||
|
||||
|
||||
#endif /* _KERNEL */
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user