Switch to using arm_devmap_add_entry() to set up static device mapping.
This eliminates the hard-coded max kva and roughly doubles the available kva space.
This commit is contained in:
parent
4f9ffa42b0
commit
358018a688
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260374
@ -50,21 +50,16 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <arm/allwinner/a10_wdog.h>
|
||||
|
||||
/* Start of address space used for bootstrap map */
|
||||
#define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000
|
||||
|
||||
|
||||
vm_offset_t
|
||||
initarm_lastaddr(void)
|
||||
{
|
||||
|
||||
return (DEVMAP_BOOTSTRAP_MAP_START);
|
||||
return (arm_devmap_lastaddr());
|
||||
}
|
||||
|
||||
void
|
||||
initarm_early_init(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -77,28 +72,21 @@ initarm_late_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1)
|
||||
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
|
||||
{ 0, 0, 0, 0, 0, }
|
||||
};
|
||||
|
||||
/*
|
||||
* Construct pmap_devmap[] with DT-derived config data.
|
||||
* Set up static device mappings.
|
||||
*
|
||||
* This covers all the on-chip device with 1MB section mappings, which is good
|
||||
* for performance (uses fewer TLB entries for device access).
|
||||
*
|
||||
* XXX It also covers a block of SRAM and some GPU (mali400) stuff that maybe
|
||||
* shouldn't be device-mapped. The original code mapped a 4MB block, but
|
||||
* perhaps a 1MB block would be more appropriate.
|
||||
*/
|
||||
int
|
||||
initarm_devmap_init(void)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
fdt_devmap[i].pd_va = 0xE1C00000;
|
||||
fdt_devmap[i].pd_pa = 0x01C00000;
|
||||
fdt_devmap[i].pd_size = 0x00400000; /* 4 MB */
|
||||
fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
|
||||
fdt_devmap[i].pd_cache = PTE_DEVICE;
|
||||
|
||||
i++;
|
||||
|
||||
arm_devmap_register_table(&fdt_devmap[0]);
|
||||
arm_devmap_add_entry(0x01C00000, 0x00400000); /* 4MB */
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user