arm: Use constants instead of magic numbers Use object size definitions from libsel4 instead of magic numbers. Signed-off-by: Kent McLeod <kent@kry10.com> Change-Id: Ida3b2f723299c1f4463bf96022db4d5d783e6ae4
diff --git a/apps/sel4test-tests/sel4_arch/aarch32/arch_frame_type.h b/apps/sel4test-tests/sel4_arch/aarch32/arch_frame_type.h index 004ce62..d664ab7 100644 --- a/apps/sel4test-tests/sel4_arch/aarch32/arch_frame_type.h +++ b/apps/sel4test-tests/sel4_arch/aarch32/arch_frame_type.h
@@ -12,9 +12,9 @@ /* This list must be ordered by size - highest first */ static const frame_type_t frame_types[] = { - { seL4_ARM_SuperSectionObject, 0, 24, }, - { seL4_ARM_SectionObject, BIT(24), 20, }, - { seL4_ARM_LargePageObject, BIT(24) + BIT(20), 16, }, - { seL4_ARM_SmallPageObject, BIT(24) + BIT(20) + BIT(16), seL4_PageBits, }, + { seL4_ARM_SuperSectionObject, 0, seL4_SuperSectionBits, }, + { seL4_ARM_SectionObject, BIT(seL4_SuperSectionBits), seL4_SectionBits, }, + { seL4_ARM_LargePageObject, BIT(seL4_SuperSectionBits) + BIT(seL4_SectionBits), seL4_LargePageBits, }, + { seL4_ARM_SmallPageObject, BIT(seL4_SuperSectionBits) + BIT(seL4_SectionBits) + BIT(seL4_LargePageBits), seL4_PageBits, }, };
diff --git a/apps/sel4test-tests/sel4_arch/arm_hyp/arch_frame_type.h b/apps/sel4test-tests/sel4_arch/arm_hyp/arch_frame_type.h index bce0fc9..d664ab7 100644 --- a/apps/sel4test-tests/sel4_arch/arm_hyp/arch_frame_type.h +++ b/apps/sel4test-tests/sel4_arch/arm_hyp/arch_frame_type.h
@@ -12,9 +12,9 @@ /* This list must be ordered by size - highest first */ static const frame_type_t frame_types[] = { - { seL4_ARM_SuperSectionObject, 0, 25, }, - { seL4_ARM_SectionObject, BIT(25), 21, }, - { seL4_ARM_LargePageObject, BIT(25) + BIT(21), 16, }, - { seL4_ARM_SmallPageObject, BIT(25) + BIT(21) + BIT(16), seL4_PageBits, }, + { seL4_ARM_SuperSectionObject, 0, seL4_SuperSectionBits, }, + { seL4_ARM_SectionObject, BIT(seL4_SuperSectionBits), seL4_SectionBits, }, + { seL4_ARM_LargePageObject, BIT(seL4_SuperSectionBits) + BIT(seL4_SectionBits), seL4_LargePageBits, }, + { seL4_ARM_SmallPageObject, BIT(seL4_SuperSectionBits) + BIT(seL4_SectionBits) + BIT(seL4_LargePageBits), seL4_PageBits, }, };