Fixed the issue in which local variable "Status" is used but not defined.
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplPeim / X64 / DxeLoadFunc.c
CommitLineData
657d3918 1/*++\r
2\r
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
11\r
12Module Name:\r
13\r
14 DxeLoadFunc.c\r
15\r
16Abstract:\r
17\r
18 Ia32-specifc functionality for DxeLoad.\r
19\r
20--*/\r
21\r
22#include "DxeIpl.h"\r
23\r
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
657d3918 29 )\r
30{\r
31 VOID *BaseOfStack;\r
32 VOID *TopOfStack;\r
1d67f00e 33 EFI_STATUS Status;\r
657d3918 34\r
35 //\r
36 // Allocate 128KB for the Stack\r
37 //\r
38 BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));\r
39 ASSERT (BaseOfStack != NULL);\r
40\r
41 //\r
42 // Compute the top of the stack we were allocated. Pre-allocate a UINTN\r
43 // for safety.\r
44 //\r
45 TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);\r
46 TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
47\r
3d109491 48 //\r
49 // End of PEI phase singal\r
50 //\r
51 Status = PeiServicesInstallPpi (EndOfPeiSignal);\r
52 ASSERT_EFI_ERROR (Status);\r
53\r
657d3918 54 SwitchStack (\r
55 (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,\r
56 HobList.Raw,\r
57 NULL,\r
58 TopOfStack\r
59 );\r
60}\r