Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: AArch64: remove VSpace object types, seL4_ARM_PageDirectory and seL4_ARM_PageUpperDirectory #59

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <allocman/allocman.h>

static inline void allocman_sel4_arch_configure_reservations(allocman_t *alloc) {
allocman_configure_utspace_reserve(alloc, (struct allocman_utspace_chunk) {vka_get_object_size(seL4_ARM_PageDirectoryObject, 0), seL4_ARM_PageDirectoryObject, 1});
allocman_configure_utspace_reserve(alloc, (struct allocman_utspace_chunk) {vka_get_object_size(seL4_ARM_PageUpperDirectoryObject, 0), seL4_ARM_PageUpperDirectoryObject, 1});
allocman_configure_utspace_reserve(alloc, (struct allocman_utspace_chunk) {vka_get_object_size(seL4_ARCH_PageTableObject, 0), seL4_ARCH_PageTableObject, 3});
}

2 changes: 2 additions & 0 deletions libsel4allocman/src/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,9 @@ void bootstrap_configure_virtual_pool(allocman_t *alloc, void *vstart, size_t vs
/* assume we are using 4k pages. maybe this should be a Kconfig option at some point?
* we ignore any errors */
allocman_configure_utspace_reserve(alloc, (struct allocman_utspace_chunk) {vka_get_object_size(seL4_ARCH_4KPage, 0), seL4_ARCH_4KPage, 3});
#ifndef CONFIG_ARCH_AARCH64
allocman_configure_utspace_reserve(alloc, (struct allocman_utspace_chunk) {vka_get_object_size(seL4_ARCH_PageTableObject, 0), seL4_ARCH_PageTableObject, 1});
#endif
allocman_sel4_arch_configure_reservations(alloc);
mspace_dual_pool_attach_virtual(
(mspace_dual_pool_t*)alloc->mspace.mspace,
Expand Down
2 changes: 0 additions & 2 deletions libsel4vka/arch_include/arm/vka/arch/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ vka_arch_get_object_size(seL4_Word objectType)
return seL4_LargePageBits;
case seL4_ARM_PageTableObject:
return seL4_PageTableBits;
case seL4_ARM_PageDirectoryObject:
return seL4_PageDirBits;
case seL4_ARM_VCPUObject:
return seL4_ARM_VCPUBits;
#ifdef CONFIG_TK1_SMMU
Expand Down
2 changes: 2 additions & 0 deletions libsel4vka/sel4_arch_include/aarch32/vka/sel4_arch/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ static inline unsigned long vka_arm_mode_get_object_size(seL4_Word objectType)
return seL4_SectionBits;
case seL4_ARM_SuperSectionObject:
return seL4_SuperSectionBits;
case seL4_ARM_PageDirectoryObject:
return seL4_PageDirBits;
default:
/* Unknown object type. */
ZF_LOGE("Unknown object type");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ static inline seL4_Word arm_mode_kobject_get_type(kobject_t type, seL4_Word obje
return -1;
}
case KOBJECT_PAGE_GLOBAL_DIRECTORY:
#if defined(CONFIG_ARM_HYPERVISOR_SUPPORT) && defined (CONFIG_ARM_PA_SIZE_BITS_40)
/* This object type is invalid under this configuration. */
return -1;
#else
return seL4_ARM_PageGlobalDirectoryObject;
#endif
case KOBJECT_PAGE_UPPER_DIRECTORY:
return seL4_ARM_PageUpperDirectoryObject;
default:
Expand Down
6 changes: 2 additions & 4 deletions libsel4vka/sel4_arch_include/aarch64/vka/sel4_arch/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ vka_arm_mode_get_object_size(seL4_Word objectType)
switch (objectType) {
case seL4_ARM_HugePageObject:
return seL4_HugePageBits;
case seL4_ARM_PageGlobalDirectoryObject:
return seL4_PGDBits;
case seL4_ARM_PageUpperDirectoryObject:
return seL4_PUDBits;
case seL4_ARM_VSpaceObject:
return seL4_VSpaceBits;
default:
/* Unknown object type. */
ZF_LOGE("Unknown object type");
Expand Down
Loading