]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Core/DxeIplPeim/Ipf/DxeLoadFunc.c
1. Rename PeiCoreLib to PeiServicesLib and rename all the interfaces from PeiCoreXXX...
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplPeim / Ipf / DxeLoadFunc.c
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. 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
8
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.
11
12 Module Name:
13
14 IpfDxeLoad.c
15
16 Abstract:
17
18 Ipf-specifc functionality for DxeLoad.
19
20 --*/
21
22 #include <DxeIpl.h>
23
24 EFI_STATUS
25 CreateArchSpecificHobs (
26 OUT EFI_PHYSICAL_ADDRESS *BspStore
27 )
28 /*++
29
30 Routine Description:
31
32 Creates architecture-specific HOBs.
33
34 Note: New parameters should NOT be added for any HOBs that are added to this
35 function. BspStore is a special case because it is required for the
36 call to SwitchStacks() in DxeLoad().
37
38 Arguments:
39
40 BspStore - The address of the BSP Store for those architectures that need
41 it. Otherwise 0.
42
43 Returns:
44
45 EFI_SUCCESS - The HOBs were created successfully.
46
47 --*/
48 {
49 EFI_STATUS Status;
50
51 Status = EFI_SUCCESS;
52
53 ASSERT (NULL != BspStore);
54
55 //
56 // Allocate 16KB for the BspStore
57 //
58 Status = PeiServicesAllocatePages (EfiBootServicesData, EFI_SIZE_TO_PAGES (BSP_STORE_SIZE), BspStore);
59 if (EFI_ERROR (Status)) {
60 return Status;
61 }
62
63 BuildBspStoreHob (
64 *BspStore,
65 BSP_STORE_SIZE,
66 EfiBootServicesData
67 );
68
69 return EFI_SUCCESS;
70 }