3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 PEIM to provide fake memory init
25 // The package level header files this module uses
29 // The protocols, PPI and GUID defintions for this module
31 #include <Ppi/MasterBootMode.h>
32 #include <Ppi/BootInRecoveryMode.h>
34 // The Library classes this module consumes
36 #include <Library/DebugLib.h>
37 #include <Library/PeimEntryPoint.h>
38 #include <Library/PcdLib.h>
39 #include <Library/HobLib.h>
40 #include <Library/PeiServicesLib.h>
50 IN EFI_PEI_FILE_HANDLE FileHandle
,
51 IN CONST EFI_PEI_SERVICES
**PeiServices
61 FileHandle - Handle of the file being invoked.
62 PeiServices - Describes the list of possible PEI Services.
66 Status - EFI_SUCCESS if the boot mode could be set
71 EFI_RESOURCE_ATTRIBUTE_TYPE Attributes
;
75 DEBUG ((EFI_D_ERROR
, "Memory Init PEIM Loaded\n"));
77 // NOTE: this needs to come from your memory controller initization process
79 MemorySize
= 0x10000000;
81 DEBUG ((EFI_D_ERROR
, "Installing hardcoded 256MB\n"));
82 Status
= PeiServicesInstallPeiMemory (MemoryBase
, MemorySize
);
83 ASSERT_EFI_ERROR (Status
);
87 EFI_RESOURCE_ATTRIBUTE_PRESENT
|
88 EFI_RESOURCE_ATTRIBUTE_INITIALIZED
|
89 EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE
|
90 EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE
|
91 EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE
|
92 EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
|
93 EFI_RESOURCE_ATTRIBUTE_TESTED
96 BuildResourceDescriptorHob (
97 EFI_RESOURCE_SYSTEM_MEMORY
,