]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c
Fixed the issue in which local variable "Status" is used but not defined.
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplPeim / Ipf / DxeLoadFunc.c
CommitLineData
878ddf1f 1/*++\r
2\r
eeb1cd5a 3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
878ddf1f 11\r
12Module Name:\r
13\r
14 IpfDxeLoad.c\r
15\r
16Abstract:\r
17\r
18 Ipf-specifc functionality for DxeLoad.\r
19\r
20--*/\r
21\r
abb26634 22#include "DxeIpl.h"\r
878ddf1f 23\r
657d3918 24VOID\r
25HandOffToDxeCore (\r
26 IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,\r
3d109491 27 IN EFI_PEI_HOB_POINTERS HobList,\r
28 IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal\r
878ddf1f 29 )\r
878ddf1f 30{\r
657d3918 31 VOID *BaseOfStack;\r
32 VOID *TopOfStack;\r
33 VOID *BspStore;\r
1d67f00e 34 EFI_STATUS Status;\r
878ddf1f 35\r
657d3918 36 //\r
37 // Allocate 128KB for the Stack\r
38 //\r
39 BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));\r
40 ASSERT (BaseOfStack != NULL);\r
878ddf1f 41\r
42 //\r
43 // Allocate 16KB for the BspStore\r
44 //\r
657d3918 45 BspStore = AllocatePages (EFI_SIZE_TO_PAGES (BSP_STORE_SIZE));\r
46 ASSERT (BspStore != NULL);\r
47 //\r
48 // Build BspStoreHob\r
49 //\r
50 BuildBspStoreHob ((EFI_PHYSICAL_ADDRESS) (UINTN) BspStore, BSP_STORE_SIZE, EfiBootServicesData);\r
eeb1cd5a 51\r
657d3918 52 //\r
53 // Compute the top of the stack we were allocated. Pre-allocate a UINTN\r
54 // for safety.\r
55 //\r
56 TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);\r
57 TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
eeb1cd5a 58\r
3d109491 59 //\r
60 // End of PEI phase singal\r
61 //\r
62 Status = PeiServicesInstallPpi (EndOfPeiSignal);\r
63 ASSERT_EFI_ERROR (Status);\r
64\r
eeb1cd5a 65 AsmSwitchStackAndBackingStore (\r
657d3918 66 (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,\r
67 HobList.Raw,\r
68 NULL,\r
69 TopOfStack,\r
70 BspStore\r
eeb1cd5a 71 );\r
72}\r