
a portable SG_NOEXEC segment attribute was added to allow non-executable (physical) segments. which will set the PTENOEXEC bits for putmmu(). in the future, this can be used to make non-executable stack / bss segments. the SG_DEVICE attribute was added to distinguish between mmio regions and uncached memory. only matterns on arm64. on arm, theres the issue that PTEUNCACHED would have no bits set when using the hardware bit definitions. this is the reason bcm, kw, teg2 and omap kernels use arteficial PTE constants. on zynq, the XN bit was used as a hack to give PTEUNCACHED a non-zero value and when the bit is clear then cache attributes where added to the pte. to fix this, PTECACHED constant was added. the portable mmu code in fault.c will now explicitely set PTECACHED bits for cached memory and PTEUNCACHED for uncached memory. that way the hardware bit definitions can be used everywhere.
22 lines
551 B
C
22 lines
551 B
C
|
|
#define FLASHMEM (~0)
|
|
#define MEM1BASE 0
|
|
#define MEM1SIZE 0x02000000
|
|
#define MEM2BASE 0
|
|
#define MEM2SIZE 0
|
|
#define PLAN9INI (~0)
|
|
|
|
#define Saturn 0xf0000000
|
|
|
|
#define TLBENTRIES 128
|
|
|
|
/*
|
|
* PTE bits for fault.c. These belong to the second PTE word. Validity is
|
|
* implied for putmmu(), and we always set PTE0_V. PTEVALID is used
|
|
* here to set cache policy bits on a global basis.
|
|
*/
|
|
#define PTEVALID (PTE1_M|PTE1_W) /* write through */
|
|
#define PTEWRITE (PTE1_RW|PTE1_C)
|
|
#define PTERONLY PTE1_RO
|
|
#define PTEUNCACHED PTE1_I
|
|
#define PTECACHED 0
|