1 /** @file 2 Framework PEIM to initialize memory on a QuarkNcSocId Memory Controller. 3 4 Copyright (c) 2013-2015 Intel Corporation. 5 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 **/ 15 16 // 17 // Include common header file for this module. 18 // 19 #include "MemoryInit.h" 20 21 static PEI_QNC_MEMORY_INIT_PPI mPeiQNCMemoryInitPpi = 22 { MrcStart }; 23 24 static EFI_PEI_PPI_DESCRIPTOR PpiListPeiQNCMemoryInit = 25 { 26 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), 27 &gQNCMemoryInitPpiGuid, 28 &mPeiQNCMemoryInitPpi 29 }; 30 31 void Mrc( MRCParams_t *MrcData); 32 33 /** 34 35 Do memory initialization for QuarkNcSocId DDR3 SDRAM Controller 36 37 @param FfsHeader Not used. 38 @param PeiServices General purpose services available to every PEIM. 39 40 @return EFI_SUCCESS Memory initialization completed successfully. 41 All other error conditions encountered result in an ASSERT. 42 43 **/ 44 EFI_STATUS 45 PeimMemoryInit( 46 IN EFI_PEI_FILE_HANDLE FileHandle, 47 IN CONST EFI_PEI_SERVICES **PeiServices 48 ) 49 { 50 EFI_STATUS Status; 51 52 Status = (**PeiServices).InstallPpi(PeiServices, &PpiListPeiQNCMemoryInit); 53 54 return Status; 55 } 56 57 VOID 58 EFIAPI 59 MrcStart( 60 IN OUT MRCParams_t *MrcData 61 ) 62 { 63 64 Mrc(MrcData); 65 } 66