1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / Ipf / DxeLoadFunc.c
CommitLineData
95276127 1/*++\r
2\r
3Copyright (c) 2006 - 2007, 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 IpfDxeLoad.c\r
15\r
16Abstract:\r
17\r
18 Ipf-specifc functionality for DxeLoad.\r
19\r
20--*/\r
21\r
95276127 22#include "DxeIpl.h"\r
23\r
24VOID\r
25HandOffToDxeCore (\r
26 IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,\r
27 IN EFI_PEI_HOB_POINTERS HobList,\r
28 IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal\r
29 )\r
30{\r
31 VOID *BaseOfStack;\r
32 VOID *TopOfStack;\r
33 VOID *BspStore;\r
34 EFI_STATUS Status;\r
35\r
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
41\r
42 //\r
43 // Allocate 16KB for the BspStore\r
44 //\r
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
51\r
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
58\r
59 //\r
60 // End of PEI phase singal\r
61 //\r
62 Status = PeiServicesInstallPpi (EndOfPeiSignal);\r
63 ASSERT_EFI_ERROR (Status);\r
64\r
65 SwitchStack (\r
66 (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,\r
67 HobList.Raw,\r
68 NULL,\r
69 TopOfStack,\r
70 BspStore\r
71 );\r
72}\r