aarch64,vspace: Remove pud cap type

Now the vspace_cap is used for all vspace roots and all other page
tables are referred to by page table caps.

Signed-off-by: Kent McLeod <kent@kry10.com>
This commit is contained in:
Kent McLeod
2022-03-01 00:07:28 +11:00
committed by Kent McLeod
parent dc808b3d76
commit cb8ee83f0c
11 changed files with 65 additions and 356 deletions

View File

@@ -207,87 +207,4 @@
</error>
</method>
</interface>
<interface name="seL4_ARM_PageUpperDirectory" manual_name="Page Upper Directory"
cap_description="Capability to the upper page directory being operated on.">
<method id="ARMPageUpperDirectoryMap" name="Map">
<condition>
<not>
<and>
<config var="CONFIG_ARM_HYPERVISOR_SUPPORT"/>
<config var="CONFIG_ARM_PA_SIZE_BITS_40"/>
</and>
</not>
</condition>
<brief>
Map an upper page directory
</brief>
<description>
Map an upper page directory (level 1) to a top level translation table (level 0).
</description>
<param dir="in" name="vspace" type="seL4_CPtr"
description="Top level translation table. Must be assigned to an ASID pool."/>
<param dir="in" name="vaddr" type="seL4_Word"
description="Virtual address"/>
<param dir="in" name="attr" type="seL4_ARM_VMAttributes">
<description>
VM Attributes for the mapping.<docref>Possible values for this type are given in <autoref label="ch:vspace"/> .</docref>
</description>
</param>
<error name="seL4_DeleteFirst">
<description>
A mapping already exists for this level in <texttt text="vspace"/> at <texttt text="vaddr"/>.
</description>
</error>
<error name="seL4_FailedLookup">
<description>
The <texttt text="vspace"/> is not assigned to an ASID pool.
</description>
</error>
<error name="seL4_IllegalOperation">
<description>
The <texttt text="_service"/> is a CPtr to a capability of the wrong type.
</description>
</error>
<error name="seL4_InvalidArgument">
<description>
The <texttt text="vaddr"/> is in the kernel virtual address range.
</description>
</error>
<error name="seL4_InvalidCapability">
<description>
The <texttt text="_service"/> or <texttt text="vspace"/> is a CPtr to a capability of the wrong type.
Or, <texttt text="vspace"/> is not assigned to an ASID pool.
Or, <texttt text="_service"/> is already mapped in a VSpace.
</description>
</error>
</method>
<method id="ARMPageUpperDirectoryUnmap" name="Unmap">
<condition>
<not>
<and>
<config var="CONFIG_ARM_HYPERVISOR_SUPPORT"/>
<config var="CONFIG_ARM_PA_SIZE_BITS_40"/>
</and>
</not>
</condition>
<description>
TODO
</description>
<error name="seL4_IllegalOperation">
<description>
The <texttt text="_service"/> is a CPtr to a capability of the wrong type.
</description>
</error>
<error name="seL4_InvalidCapability">
<description>
The <texttt text="_service"/> is a CPtr to a capability of the wrong type.
</description>
</error>
<error name="seL4_RevokeFirst">
<description>
A copy of the <texttt text="_service"/> capability exists.
</description>
</error>
</method>
</interface>
</api>

View File

@@ -193,31 +193,18 @@ typedef enum {
#define seL4_IOPageTableBits 12
#define seL4_WordSizeBits 3
#define seL4_PUDEntryBits 3
#define seL4_VSpaceEntryBits 3
#if defined(CONFIG_ARM_HYPERVISOR_SUPPORT) && defined (CONFIG_ARM_PA_SIZE_BITS_40)
/* for a 3 level translation, we skip the PGD */
#define seL4_PGDBits 0
#define seL4_PGDEntryBits 0
#define seL4_PGDIndexBits 0
#define seL4_PUDBits 13
#define seL4_PUDIndexBits 10
#define seL4_VSpaceBits seL4_PUDBits
#define seL4_VSpaceIndexBits seL4_PUDIndexBits
#define seL4_ARM_VSpaceObject seL4_ARM_PageUpperDirectoryObject
#define seL4_VSpaceBits 13
#define seL4_VSpaceIndexBits 10
#else
#define seL4_PGDBits 12
#define seL4_PGDEntryBits 3
#define seL4_PGDIndexBits 9
#define seL4_PUDBits 12
#define seL4_PUDIndexBits 9
#define seL4_VSpaceBits seL4_PGDBits
#define seL4_VSpaceIndexBits seL4_PGDIndexBits
#define seL4_ARM_VSpaceObject seL4_ARM_PageGlobalDirectoryObject
#define seL4_VSpaceBits 12
#define seL4_VSpaceIndexBits 9
#endif
#define seL4_ARM_VCPUBits 12
@@ -233,8 +220,7 @@ typedef enum {
#ifndef __ASSEMBLER__
SEL4_SIZE_SANITY(seL4_PageTableEntryBits, seL4_PageTableIndexBits, seL4_PageTableBits);
SEL4_SIZE_SANITY(seL4_WordSizeBits, seL4_ASIDPoolIndexBits, seL4_ASIDPoolBits);
SEL4_SIZE_SANITY(seL4_PGDEntryBits, seL4_PGDIndexBits, seL4_PGDBits);
SEL4_SIZE_SANITY(seL4_PUDEntryBits, seL4_PUDIndexBits, seL4_PUDBits);
SEL4_SIZE_SANITY(seL4_VSpaceEntryBits, seL4_VSpaceIndexBits, seL4_VSpaceBits);
#endif
#ifdef CONFIG_ENABLE_BENCHMARKS

View File

@@ -16,3 +16,30 @@
#define seL4_PageDirEntryBits seL4_PageTableEntryBits
#define seL4_PageDirIndexBits seL4_PageTableIndexBits
#define seL4_ARM_PageDirectoryObject seL4_ARM_PageTableObject
#define seL4_PUDEntryBits 3
#if defined(CONFIG_ARM_HYPERVISOR_SUPPORT) && defined (CONFIG_ARM_PA_SIZE_BITS_40)
#define seL4_PGDBits 0
#define seL4_PGDEntryBits 0
#define seL4_PGDIndexBits 0
#define seL4_PUDBits 13
#define seL4_PUDIndexBits 10
#define seL4_ARM_PageUpperDirectoryObject seL4_ARM_VSpaceObject
#else
#define seL4_PGDBits 12
#define seL4_PGDEntryBits 3
#define seL4_PGDIndexBits 9
#define seL4_PUDBits 12
#define seL4_PUDIndexBits 9
#define seL4_ARM_PageGlobalDirectoryObject seL4_ARM_VSpaceObject
#define seL4_ARM_PageUpperDirectoryObject seL4_ARM_PageTableObject
#define seL4_ARM_PageUpperDirectory seL4_ARM_PageTable;
#define seL4_ARM_PageUpperDirectory_Map seL4_ARM_PageTable_Map
#define seL4_ARM_PageUpperDirectory_Unmap seL4_ARM_PageTable_Unmap
#endif

View File

@@ -8,7 +8,6 @@
typedef enum _mode_object {
seL4_ARM_HugePageObject = seL4_NonArchObjectTypeCount,
seL4_ARM_PageUpperDirectoryObject,
seL4_ARM_PageGlobalDirectoryObject,
seL4_ARM_VSpaceObject,
seL4_ModeObjectTypeCount
} seL4_ModeObjectType;