diff options
author | Olivier Martin <olivier.martin@arm.com> | 2013-06-27 18:16:06 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-06-27 18:16:06 +0000 |
commit | 6f050ad6bf16f3f2ae2f0b62e93404230de575cc (patch) | |
tree | 0a71ac274cf21011bd82f9a1cd0eea5037cdbde9 /ArmPkg/Library/ArmLib/Arm9 | |
parent | ca79c798217775368b6c6a0d0720f221ed2a62ef (diff) | |
download | edk2-platforms-6f050ad6bf16f3f2ae2f0b62e93404230de575cc.tar.xz |
ArmPkg: Made ArmConfigureMmu() returns a status code
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14445 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Library/ArmLib/Arm9')
-rw-r--r-- | ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c b/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c index c92f9159c6..1acb158019 100644 --- a/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c +++ b/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c @@ -1,6 +1,7 @@ /** @file
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+ Copyright (c) 2011 - 2013, ARM Limited. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -62,18 +63,21 @@ FillTranslationTable ( }
}
-VOID
+RETURN_STATUS
EFIAPI
ArmConfigureMmu (
IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable,
- OUT VOID **TranslationTableBase OPTIONAL,
- OUT UINTN *TranslationTableSize OPTIONAL
+ OUT VOID **TranslationTableBase OPTIONAL,
+ OUT UINTN *TranslationTableSize OPTIONAL
)
{
VOID *TranslationTable;
// Allocate pages for translation table.
- TranslationTable = AllocatePages(EFI_SIZE_TO_PAGES(TRANSLATION_TABLE_SIZE + TRANSLATION_TABLE_ALIGNMENT));
+ TranslationTable = AllocatePages (EFI_SIZE_TO_PAGES (TRANSLATION_TABLE_SIZE + TRANSLATION_TABLE_ALIGNMENT));
+ if (TranslationTable == NULL) {
+ return RETURN_OUT_OF_RESOURCES;
+ }
TranslationTable = (VOID *)(((UINTN)TranslationTable + TRANSLATION_TABLE_ALIGNMENT_MASK) & ~TRANSLATION_TABLE_ALIGNMENT_MASK);
if (TranslationTableBase != NULL) {
@@ -125,7 +129,6 @@ ArmConfigureMmu ( ArmEnableInstructionCache();
ArmEnableDataCache();
ArmEnableMmu();
-}
-
-
+ return RETURN_SUCCESS;
+}
|