Răsfoiți Sursa

fix[bsp][xuantie]: Add RISC-V Standard Svpbmt Extension macro definition;

shuta.lst 10 ore în urmă
părinte
comite
315ec5baa7
1 a modificat fișierele cu 12 adăugiri și 0 ștergeri
  1. 12 0
      bsp/xuantie/virt64/c906/libcpu/riscv_mmu.h

+ 12 - 0
bsp/xuantie/virt64/c906/libcpu/riscv_mmu.h

@@ -18,6 +18,18 @@
 
 
 #undef PAGE_SIZE
 #undef PAGE_SIZE
 
 
+/*
+ * RISC-V Standard Svpbmt Extension (Bit 61-62)
+ * 00: PMA (Normal Memory, Cacheable, No change to implied PMA memory type)
+ * 01: NC  (Non-cacheable, Weakly-ordered)
+ * 10: IO  (Strongly-ordered, Non-cacheable, Non-idempotent)
+ * 11: Reserved
+ */
+#define PTE_PBMT_PMA  (0UL << 61)
+#define PTE_PBMT_NC   (1UL << 61)
+#define PTE_PBMT_IO   (2UL << 61)
+#define PTE_PBMT_MASK (3UL << 61)
+
 #define PAGE_OFFSET_SHIFT 0
 #define PAGE_OFFSET_SHIFT 0
 #define PAGE_OFFSET_BIT   12
 #define PAGE_OFFSET_BIT   12
 #define PAGE_SIZE         __SIZE(PAGE_OFFSET_BIT)
 #define PAGE_SIZE         __SIZE(PAGE_OFFSET_BIT)