PowerMac G5 context: kernel_va_to_slbv(...) and SLBV_L use vs. addresses < DMAP_BASE_ADDRESS
Mark Millard via freebsd-ppc <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.ppc |
|---|---|
| Message-ID | <[email protected]> |
[DMAP_START below is an abbreviation of DMAP_BASE_ADDRESS.]
kernel_va_to_slbv has logic for if slbv would have
SLBV_L asserted or not:
uint64_t
kernel_va_to_slbv(vm_offset_t va)
{
uint64_t slbv;
/* Set kernel VSID to deterministic value */
slbv = (KERNEL_VSID((uintptr_t)va >> ADDR_SR_SHFT)) << SLBV_VSID_SHIFT;
/*
* Figure out if this is a large-page mapping.
*/
if (hw_direct_map && va > DMAP_BASE_ADDRESS && va < DMAP_MAX_ADDRESS) {
/*
* XXX: If we have set up a direct map, assumes
* all physical memory is mapped with large pages.
*/
if (mem_valid(DMAP_TO_PHYS(va), 0) == 0)
slbv |= SLBV_L;
}
return (slbv);
}
[Presuming hw_direct_map!=0 . . .]
By having handle_kernel_slb_spill count its usage,
broken out by address range and EXC_[DI]SE type, there
are examples of slbtrap's that use handle_kernel_slb_spill
for srr0<DMAP_START and for dar<DMAP_START.
handle_kernel_slb_spill uses kernel_va_to_slbv. (So did
my hack to -r345758 .)
Are slbv values correct for small effective addresses by
not having SLBV_L asserted? (Same memory, covered by two
different page sizes based on the style of
effective-address that happens to be used [upper bits
different].)
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"