diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-31 13:06:48 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-31 13:06:48 +0000 |
commit | 2e3650d97ddfd3a4fcfac4c50058267d64bb414e (patch) | |
tree | ccad9840647cf816321defb9d2d1dae3748e1479 /ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c | |
parent | 4e7b7318c0138e40d763c3bdb74f10beb9bb4a29 (diff) | |
download | edk2-platforms-2e3650d97ddfd3a4fcfac4c50058267d64bb414e.tar.xz |
ArmPkg/Arm9Lib: Assert if memory region size is TT_DESCRIPTOR_SECTION_SIZE aligned
The current code does not support memory region size that is not
aligned on TT_DESCRIPTOR_SECTION_SIZE boundary.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11490 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c')
-rw-r--r-- | ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c b/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c index 1bdc439258..6b698a3356 100644 --- a/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c +++ b/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c @@ -52,6 +52,9 @@ FillTranslationTable ( Entry = TRANSLATION_TABLE_ENTRY_FOR_VIRTUAL_ADDRESS(TranslationTable, MemoryRegion->VirtualBase); Sections = MemoryRegion->Length / TT_DESCRIPTOR_SECTION_SIZE; + // The current code does not support memory region size that is not aligned on TT_DESCRIPTOR_SECTION_SIZE boundary + ASSERT (MemoryRegion->Length % TT_DESCRIPTOR_SECTION_SIZE == 0); + for (Index = 0; Index < Sections; Index++) { *Entry++ = TT_DESCRIPTOR_SECTION_BASE_ADDRESS(PhysicalBase) | Attributes; |