summaryrefslogtreecommitdiffstats
path: root/sys/amd64/acpica/madt.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-08-11 19:22:57 +0000
committerjhb <jhb@FreeBSD.org>2006-08-11 19:22:57 +0000
commitce9f8963fd6c7fcb782d8b9eebf51fb108d847f8 (patch)
tree1ef0dbab4a5d1ad1c224a7eec5af2c8597bfef7d /sys/amd64/acpica/madt.c
parent11b5f41beac4542db8456ad35e02e9a1d89d2291 (diff)
downloadFreeBSD-src-ce9f8963fd6c7fcb782d8b9eebf51fb108d847f8.zip
FreeBSD-src-ce9f8963fd6c7fcb782d8b9eebf51fb108d847f8.tar.gz
First pass at allowing memory to be mapped using cache modes other than
WB (write-back) on x86 via control bits in PTEs and PDEs (including making use of the PAT MSR). Changes include: - A new pmap_mapdev_attr() function for amd64 and i386 which takes an additional parameter (relative to pmap_mapdev()) specifying the cache mode for this mapping. Note that on amd64 only WB mappings are done with the direct map, all other modes result in a private mapping. - pmap_mapdev() on i386 and amd64 now defaults to using UC (uncached) mappings rather than WB. Previously we relied on the BIOS setting up MTRR's to enforce memio regions being treated as UC. This might make hw.cbb_start_memory unnecessary in some cases now for example. - A new pmap_mapbios()/pmap_unmapbios() API has been added to allow places that used pmap_mapdev() to map non-device memory (such as ACPI tables) to do so using WB as before. - A new pmap_change_attr() function for amd64 and i386 that changes the caching mode for a range of KVA. Reviewed by: alc
Diffstat (limited to 'sys/amd64/acpica/madt.c')
-rw-r--r--sys/amd64/acpica/madt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/amd64/acpica/madt.c b/sys/amd64/acpica/madt.c
index bfbeaac..ba3c0c2 100644
--- a/sys/amd64/acpica/madt.c
+++ b/sys/amd64/acpica/madt.c
@@ -203,15 +203,15 @@ madt_probe(void)
/*
* Map in the RSDP. Since ACPI uses AcpiOsMapMemory() which in turn
- * calls pmap_mapdev() to find the RSDP, we assume that we can use
- * pmap_mapdev() to map the RSDP.
+ * calls pmap_mapbios() to find the RSDP, we assume that we can use
+ * pmap_mapbios() to map the RSDP.
*/
if (AcpiOsGetRootPointer(ACPI_LOGICAL_ADDRESSING, &rsdp_ptr) != AE_OK)
return (ENXIO);
#ifdef __i386__
KASSERT(rsdp_ptr.Pointer.Physical < KERNLOAD, ("RSDP too high"));
#endif
- rsdp = pmap_mapdev(rsdp_ptr.Pointer.Physical, sizeof(RSDP_DESCRIPTOR));
+ rsdp = pmap_mapbios(rsdp_ptr.Pointer.Physical, sizeof(RSDP_DESCRIPTOR));
if (rsdp == NULL) {
if (bootverbose)
printf("MADT: Failed to map RSDP\n");
@@ -261,7 +261,7 @@ madt_probe(void)
break;
madt_unmap_table(rsdt);
}
- pmap_unmapdev((vm_offset_t)rsdp, sizeof(RSDP_DESCRIPTOR));
+ pmap_unmapbios((vm_offset_t)rsdp, sizeof(RSDP_DESCRIPTOR));
if (madt_physaddr == 0) {
if (bootverbose)
printf("MADT: No MADT table found\n");
@@ -335,7 +335,7 @@ static int
madt_setup_local(void)
{
- madt = pmap_mapdev(madt_physaddr, madt_length);
+ madt = pmap_mapbios(madt_physaddr, madt_length);
lapic_init((uintptr_t)madt->LocalApicAddress);
printf("ACPI APIC Table: <%.*s %.*s>\n",
(int)sizeof(madt->OemId), madt->OemId,
OpenPOWER on IntegriCloud