fix permission

This commit is contained in:
oscar 2024-09-26 04:37:54 +08:00
parent e96e5b0278
commit f92a26f9f7
2 changed files with 4 additions and 4 deletions

View File

@ -103,7 +103,7 @@ extern "C" {
__asm__ volatile ( \ __asm__ volatile ( \
METAL_RMR_GAS(reg, AARCH_REG_X0) \ METAL_RMR_GAS(reg, AARCH_REG_X0) \
"mov %x0, x0;"\ "mov %x0, x0;"\
: "=r" (var) \ : "+r" (var) \
: \ : \
: "x0" \ : "x0" \
); } while(0) ); } while(0)
@ -163,7 +163,7 @@ extern "C" {
\ \
METAL_WMR_GAS(METAL_REG_MR0, AARCH_REG_X1) \ METAL_WMR_GAS(METAL_REG_MR0, AARCH_REG_X1) \
METAL_WMR_GAS(METAL_REG_MR1, AARCH_REG_X2) \ METAL_WMR_GAS(METAL_REG_MR1, AARCH_REG_X2) \
: "=r" (var) \ : "+r" (var) \
: "r" (idxvar)\ : "r" (idxvar)\
: "x0", "x1", "x2" \ : "x0", "x1", "x2" \
); } while(0) ); } while(0)
@ -262,7 +262,7 @@ extern "C" {
"mov x2, #0;" \ "mov x2, #0;" \
cmd \ cmd \
"mov %x0, x0;" \ "mov %x0, x0;" \
: "=r" (var) \ : "+r" (var) \
: "r" (paddr) \ : "r" (paddr) \
: "x0", "x1", "x2" \ : "x0", "x1", "x2" \
); } while (0) ); } while (0)

View File

@ -74,7 +74,7 @@ _Static_assert(sizeof(struct vmpt) == VM_PTBUCKETS * sizeof(struct vmpte));
// #define VMPD_ATTR_CA_NORMAL (VMPD_ATTR_CA_MAKE(0ull)) // #define VMPD_ATTR_CA_NORMAL (VMPD_ATTR_CA_MAKE(0ull))
// #define VMPD_ATTR_CA_DEVICE (VMPD_ATTR_CA_MAKE(1ull)) // #define VMPD_ATTR_CA_DEVICE (VMPD_ATTR_CA_MAKE(1ull))
#define MTP_KERNEL (0b0011 | (0b0001 << 4) | (0b0001 << 8) | (0b0001 << 12)) #define MTP_KERNEL (0b0010 | (0b0000 << 4) | (0b0010 << 8) | (0b0000 << 12))
#define MTP_USER (0b0010 | (0b0000 << 4) | (0b0011 << 8) | (0b0010 << 12)) #define MTP_USER (0b0010 | (0b0000 << 4) | (0b0011 << 8) | (0b0010 << 12))
struct vmpd { struct vmpd {