Skip to content

Commit 643581b

Browse files
goodnorningRbb666
authored andcommitted
fix[bsp][ultrarisc]: Add RISC-V Standard Svpbmt Extension macro definition;
1 parent 315ec5b commit 643581b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bsp/ultrarisc/arch/ur-cp100/riscv_mmu.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@
1919

2020
#undef PAGE_SIZE
2121

22+
/*
23+
* RISC-V Standard Svpbmt Extension (Bit 61-62)
24+
* 00: PMA (Normal Memory, Cacheable, No change to implied PMA memory type)
25+
* 01: NC (Non-cacheable, Weakly-ordered)
26+
* 10: IO (Strongly-ordered, Non-cacheable, Non-idempotent)
27+
* 11: Reserved
28+
*/
29+
#define PTE_PBMT_PMA (0UL << 61)
30+
#define PTE_PBMT_NC (1UL << 61)
31+
#define PTE_PBMT_IO (2UL << 61)
32+
#define PTE_PBMT_MASK (3UL << 61)
33+
2234
#define PAGE_OFFSET_SHIFT 0
2335
#define PAGE_OFFSET_BIT 12
2436
#define PAGE_SIZE __SIZE(PAGE_OFFSET_BIT)

0 commit comments

Comments
 (0)