mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
arm64: Use pmap_early_vtophys in pmap_bootstrap_san
Use pmap_early_vtophys to find the physical address of the kernel base rather than using the calculated offset as it will be removed in a latter commit. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42566 (cherry picked from commit 5fae53589eacbf65855419922c881b3a25a68e03)
This commit is contained in:
parent
4dd61b21f9
commit
88227ddc75
3 changed files with 6 additions and 3 deletions
|
|
@ -973,7 +973,7 @@ initarm(struct arm64_bootparams *abp)
|
|||
* segments also get excluded from phys_avail.
|
||||
*/
|
||||
#if defined(KASAN)
|
||||
pmap_bootstrap_san(KERNBASE - abp->kern_delta);
|
||||
pmap_bootstrap_san();
|
||||
#endif
|
||||
|
||||
physmem_init_kernel_globals();
|
||||
|
|
|
|||
|
|
@ -1365,11 +1365,14 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen)
|
|||
* - Map that entire range using L2 superpages.
|
||||
*/
|
||||
void
|
||||
pmap_bootstrap_san(vm_paddr_t kernstart)
|
||||
pmap_bootstrap_san(void)
|
||||
{
|
||||
vm_offset_t va;
|
||||
vm_paddr_t kernstart;
|
||||
int i, shadow_npages, nkasan_l2;
|
||||
|
||||
kernstart = pmap_early_vtophys(KERNBASE);
|
||||
|
||||
/*
|
||||
* Rebuild physmap one more time, we may have excluded more regions from
|
||||
* allocation since pmap_bootstrap().
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused)
|
|||
#if defined(KASAN) || defined(KMSAN)
|
||||
struct arm64_bootparams;
|
||||
|
||||
void pmap_bootstrap_san(vm_paddr_t);
|
||||
void pmap_bootstrap_san(void);
|
||||
void pmap_san_enter(vm_offset_t);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue