projects
/
pdp11-memory-test
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add to MMU init: bypass cache in MMIO page
[pdp11-memory-test]
/
pdp11_mmu.c
diff --git
a/pdp11_mmu.c
b/pdp11_mmu.c
index
3fc8674
..
a06cf16
100644
(file)
--- a/
pdp11_mmu.c
+++ b/
pdp11_mmu.c
@@
-8,7
+8,7
@@
void
init_mmu(void)
{
init_mmu(void)
{
-
/*
+ /*
* First populate the relocation registers, all zero since we want an
* identity mapping, except the highest page that we remap to the physical MMIO
* range.
* First populate the relocation registers, all zero since we want an
* identity mapping, except the highest page that we remap to the physical MMIO
* range.
@@
-22,9
+22,9
@@
init_mmu(void)
SET(KISAR6,PAR_PAF,0000000);
SET(KISAR7,PAR_PAF,0177600);
SET(KISAR6,PAR_PAF,0000000);
SET(KISAR7,PAR_PAF,0177600);
-
/*
-
* Now populate the page descriptor registers. See EK-KDJ1B-UG page 1-19
-
* for details of each field.
+ /*
+ * Now populate the page descriptor registers. See EK-KDJ1B-UG page 1-19
+ * for details of each field.
*/
uint16_t data = 0;
SET(data,PDR_BYPASCACHE,0);
*/
uint16_t data = 0;
SET(data,PDR_BYPASCACHE,0);
@@
-40,12
+40,15
@@
init_mmu(void)
KISDR4 = data;
KISDR5 = data;
KISDR6 = data;
KISDR4 = data;
KISDR5 = data;
KISDR6 = data;
+
+ SET(data,PDR_BYPASCACHE,1);
+
KISDR7 = data;
KISDR7 = data;
-
/*
-
* Enable the MMU with a 22-bit mapping.
-
*/
-
SET(MMR3,MMR3_KRNSPLTID,0);
+ /*
+ * Enable the MMU with a 22-bit mapping.
+ */
+ SET(MMR3,MMR3_KRNSPLTID,0);
SET(MMR3,MMR3_EN_22BIT,1);
SET(MMR0,MMR0_EN_MMU,1);
}
SET(MMR3,MMR3_EN_22BIT,1);
SET(MMR0,MMR0_EN_MMU,1);
}