Skip to content

Commit 315ec5b

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

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

bsp/xuantie/virt64/c906/libcpu/riscv_mmu.h

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

1919
#undef PAGE_SIZE
2020

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

0 commit comments

Comments
 (0)