summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-02-22 02:10:48 +0000
committermarcel <marcel@FreeBSD.org>2004-02-22 02:10:48 +0000
commit2a9068ac03f4d66f08009d4aa0bb2ec199ae8030 (patch)
treeab398a173ed6ac6fd5954e9f4e98044f95caf7b2
parent9576df9a828ddb44a5aa60c1a938a251ab4506d9 (diff)
downloadFreeBSD-src-2a9068ac03f4d66f08009d4aa0bb2ec199ae8030.zip
FreeBSD-src-2a9068ac03f4d66f08009d4aa0bb2ec199ae8030.tar.gz
Do not pre-map the I/O port space. On the Intel Tiger 4 this conflicts
with a memory mapped I/O range that's immediately before it and is not 256MB aligned. As a result, when an address is accessed in the memory mapped range and a direct mapping is added for it, it overlaps with the pre-mapped I/O port space and causes a machine check. Based on a patch from: arun@
-rw-r--r--sys/ia64/ia64/machdep.c33
-rw-r--r--sys/ia64/ia64/mp_machdep.c1
-rw-r--r--sys/ia64/include/md_var.h1
3 files changed, 0 insertions, 35 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 9435f07..b7fb86a 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -400,37 +400,6 @@ map_pal_code(void)
}
void
-map_port_space(void)
-{
- struct ia64_pte pte;
- u_int64_t psr;
-
- /* XXX we should fail hard if there's no I/O port space. */
- if (ia64_port_base == 0)
- return;
-
- bzero(&pte, sizeof(pte));
- pte.pte_p = 1;
- pte.pte_ma = PTE_MA_UC;
- pte.pte_a = 1;
- pte.pte_d = 1;
- pte.pte_pl = PTE_PL_KERN;
- pte.pte_ar = PTE_AR_RW;
- pte.pte_ppn = ia64_port_base >> 12;
-
- __asm __volatile("ptr.d %0,%1" :: "r"(ia64_port_base), "r"(24 << 2));
-
- __asm __volatile("mov %0=psr" : "=r" (psr));
- __asm __volatile("rsm psr.ic|psr.i");
- __asm __volatile("srlz.d");
- __asm __volatile("mov cr.ifa=%0" :: "r"(ia64_port_base));
- __asm __volatile("mov cr.itir=%0" :: "r"(IA64_ID_PAGE_SHIFT << 2));
- __asm __volatile("itr.d dtr[%0]=%1" :: "r"(2), "r"(*(u_int64_t*)&pte));
- __asm __volatile("mov psr.l=%0" :: "r" (psr));
- __asm __volatile("srlz.d");
-}
-
-void
map_gateway_page(void)
{
struct ia64_pte pte;
@@ -546,8 +515,6 @@ ia64_init(void)
ia64_pal_base = mdp->PhysicalStart;
}
- map_port_space();
-
metadata_missing = 0;
if (bootinfo.bi_modulep)
preload_metadata = (caddr_t)bootinfo.bi_modulep;
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index b1e4749..b7efc76 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -94,7 +94,6 @@ ia64_ap_startup(void)
ia64_set_k4((intptr_t)pcpup);
map_pal_code();
- map_port_space();
map_gateway_page();
ia64_set_fpsr(IA64_FPSR_DEFAULT);
diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h
index a9a3dfd..4946709 100644
--- a/sys/ia64/include/md_var.h
+++ b/sys/ia64/include/md_var.h
@@ -63,7 +63,6 @@ void ia64_probe_sapics(void);
int interrupt(uint64_t, struct trapframe *);
void map_gateway_page(void);
void map_pal_code(void);
-void map_port_space(void);
void os_boot_rendez(void);
void os_mca(void);
void spillfd(void *src, void *dst);
OpenPOWER on IntegriCloud