Skip to contentSkip to conversation

xen: define PADDR_BITS for riscv

PATCH In review Alistair Francis 2 participants 2 messages Dec 28, 2022 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: define PADDR_BITS for riscv

From: Alistair Francis <[email protected]>

Define PADDR_BITS and PAGE_SHIFT for the RISC-V 64-bit architecture.

---
 xen/arch/riscv/include/asm/page-bits.h | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/page-bits.h
xen/arch/riscv/include/asm/page-bits.h new file +7 -0
new file mode 100644
index 0000000000..d7bd7be098
@@ -0,0 +1,7 @@
+#ifndef __RISCV_PAGE_SHIFT_H__
+#define __RISCV_PAGE_SHIFT_H__
+
+#define PAGE_SHIFT              12 /* 4 KiB Pages */
+#define PADDR_BITS              56 /* 44-bit PPN */
+
+#endif /* __RISCV_PAGE_SHIFT_H__ */
Signature · 1 line
2.38.1
#1 lore raw
Quoted 5 lines · Alistair Francis

From: Alistair Francis <[email protected]>

Define PADDR_BITS and PAGE_SHIFT for the RISC-V 64-bit architecture.

Thanks.  I've committed this with a tweak to the subject (its not just PADDR_BITS your adding), and a tweak to the include guards (SHIFT->BITS to match the name of the file).

~Andrew

Quoted 18 lines
---
 xen/arch/riscv/include/asm/page-bits.h | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/page-bits.h
xen/arch/riscv/include/asm/page-bits.h new file +7 -0
new file mode 100644
index 0000000000..d7bd7be098
@@ -0,0 +1,7 @@
+#ifndef __RISCV_PAGE_SHIFT_H__
+#define __RISCV_PAGE_SHIFT_H__
+
+#define PAGE_SHIFT              12 /* 4 KiB Pages */
+#define PADDR_BITS              56 /* 44-bit PPN */
+
+#endif /* __RISCV_PAGE_SHIFT_H__ */