riscv: Remove VMNoAccess mapping type
A frame cannot be mapped without any access permissions, as this encoding is used to represent a page table mapping.
This commit is contained in:
parent
1d43202cb2
commit
61df56a7f3
2 changed files with 7 additions and 11 deletions
|
|
@ -50,11 +50,10 @@ typedef struct arch_tcb {
|
|||
} arch_tcb_t;
|
||||
|
||||
enum vm_rights {
|
||||
VMNoAccess = 0,
|
||||
VMKernelOnly = 1,
|
||||
VMReadOnly = 2,
|
||||
VMWriteOnly = 3,
|
||||
VMReadWrite = 4
|
||||
VMKernelOnly = 0,
|
||||
VMReadOnly = 1,
|
||||
VMWriteOnly = 2,
|
||||
VMReadWrite = 3
|
||||
};
|
||||
typedef uint32_t vm_rights_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static exception_t performPageGetAddress(void *vbase_ptr);
|
|||
static word_t CONST
|
||||
RISCVGetWriteFromVMRights(vm_rights_t vm_rights)
|
||||
{
|
||||
return (vm_rights != VMNoAccess) && (vm_rights != VMReadOnly);
|
||||
return vm_rights != VMReadOnly;
|
||||
}
|
||||
|
||||
static word_t RISCVGetUserFromVMRights(vm_rights_t vm_rights)
|
||||
|
|
@ -59,7 +59,7 @@ static word_t RISCVGetUserFromVMRights(vm_rights_t vm_rights)
|
|||
static inline word_t CONST
|
||||
RISCVGetReadFromVMRights(vm_rights_t vm_rights)
|
||||
{
|
||||
return (vm_rights != VMNoAccess) && (vm_rights != VMWriteOnly);
|
||||
return vm_rights != VMWriteOnly;
|
||||
}
|
||||
|
||||
/* ==================== BOOT CODE STARTS HERE ==================== */
|
||||
|
|
@ -664,9 +664,6 @@ checkValidIPCBuffer(vptr_t vptr, cap_t cap)
|
|||
vm_rights_t CONST
|
||||
maskVMRights(vm_rights_t vm_rights, seL4_CapRights_t cap_rights_mask)
|
||||
{
|
||||
if (vm_rights == VMNoAccess) {
|
||||
return VMNoAccess;
|
||||
}
|
||||
if (vm_rights == VMReadOnly &&
|
||||
seL4_CapRights_get_capAllowRead(cap_rights_mask)) {
|
||||
return VMReadOnly;
|
||||
|
|
@ -688,7 +685,7 @@ maskVMRights(vm_rights_t vm_rights, seL4_CapRights_t cap_rights_mask)
|
|||
if (vm_rights == VMKernelOnly) {
|
||||
return VMKernelOnly;
|
||||
}
|
||||
return VMNoAccess;
|
||||
return VMKernelOnly;
|
||||
}
|
||||
|
||||
/* The rest of the file implements the RISCV object invocations */
|
||||
|
|
|
|||
Loading…
Reference in a new issue