X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmPlatformPkg%2FMemoryInitPei%2FMemoryInitPeim.c;h=93ab16ca4a74cd9513e62b9857af91b205597c71;hb=40a3f38f67cee7046feb5a5666883cc75a6962ff;hp=c6a6fe64ba811d42ff5a0c386036c260558a3dd3;hpb=c357fd6a1f79e2d7b0a1bd01994b8d33925bfff5;p=mirror_edk2.git diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c index c6a6fe64ba..93ab16ca4a 100755 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c @@ -1,14 +1,14 @@ /** @file * * Copyright (c) 2011, 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 -* which accompanies this distribution. The full text of the license may be found at -* http://opensource.org/licenses/bsd-license.php * -* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +* This program and the accompanying materials +* are licensed and made available under the terms and conditions of the BSD License +* which accompanies this distribution. The full text of the license may be found at +* http://opensource.org/licenses/bsd-license.php +* +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. * **/ @@ -63,7 +63,7 @@ BuildMemoryTypeInformationHob ( Info[7].NumberOfPages = PcdGet32 (PcdMemoryTypeEfiLoaderCode); Info[8].Type = EfiLoaderData; Info[8].NumberOfPages = PcdGet32 (PcdMemoryTypeEfiLoaderData); - + // Terminator for the list Info[9].Type = EfiMaxMemoryType; Info[9].NumberOfPages = 0; @@ -75,13 +75,13 @@ BuildMemoryTypeInformationHob ( Routine Description: - + Arguments: FileHandle - Handle of the file being invoked. PeiServices - Describes the list of possible PEI Services. - + Returns: Status - EFI_SUCCESS if the boot mode could be set @@ -101,15 +101,7 @@ InitializeMemory ( UINTN FdTop; UINTN UefiMemoryBase; - DEBUG ((EFI_D_ERROR, "Memory Init PEIM Loaded\n")); - - // Ensure PcdSystemMemorySize has been set - ASSERT (FixedPcdGet64 (PcdSystemMemorySize) != 0); - - SystemMemoryBase = (UINTN)FixedPcdGet64 (PcdSystemMemoryBase); - SystemMemoryTop = SystemMemoryBase + (UINTN)FixedPcdGet64 (PcdSystemMemorySize); - FdBase = (UINTN)PcdGet32 (PcdFdBaseAddress); - FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize); + DEBUG ((EFI_D_LOAD | EFI_D_INFO, "Memory Init PEIM Loaded\n")); // // Initialize the System Memory (DRAM) @@ -119,6 +111,14 @@ InitializeMemory ( ArmPlatformInitializeSystemMemory (); } + // Ensure PcdSystemMemorySize has been set + ASSERT (PcdGet64 (PcdSystemMemorySize) != 0); + + SystemMemoryBase = (UINTN)PcdGet64 (PcdSystemMemoryBase); + SystemMemoryTop = SystemMemoryBase + (UINTN)PcdGet64 (PcdSystemMemorySize); + FdBase = (UINTN)PcdGet64 (PcdFdBaseAddress); + FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize); + // // Declare the UEFI memory to PEI //