]> git.proxmox.com Git - mirror_edk2.git/blob - UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.c
Finish spliting SecDispatchTableLib into two functions so it can be a BaseLib
[mirror_edk2.git] / UnixPkg / Library / SecDispatchTableLib / SecDispatchTableLib.c
1 /** @file
2 Allows an override of the SEC SEC PPI Dispatch Table. This allows
3 customized PPIs to be passed into the PEI Core.
4
5 Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
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 #include <PiPei.h>
17 #include <Library/BaseMemoryLib.h>
18 #include <Library/SecDispatchTableLib.h>
19
20
21 /**
22 Return the number of bytes that OverrideDispatchTable() will append to
23 the dispatch table.
24
25 @return Size of table in bytes OverrideDispatchTable() will return
26
27 **/
28 UINTN
29 EFIAPI
30 OverrideDispatchTableExtraSize (
31 )
32 {
33 return 0;
34 }
35
36
37 /**
38 Allow an override of the Sec PPI Dispatch Table. This table contains PPIs passed
39 up from SEC to PEI.
40
41 @param OriginalTable SECs default PPI dispatch table
42 @param OriginalTableSize Size of SECs default PPI dispatch table
43 @param NewTable New dispatch table
44 @param NewTableSize Size of of the NewTable in bytes
45
46 @return EFI_SUCCESS table was copied
47
48 **/
49 EFI_STATUS
50 EFIAPI
51 OverrideDispatchTable (
52 IN CONST EFI_PEI_PPI_DESCRIPTOR *OriginalTable,
53 IN UINTN OriginalTableSize,
54 IN OUT EFI_PEI_PPI_DESCRIPTOR *NewTable,
55 IN UINTN NewTableSize
56 )
57 {
58 CopyMem (NewTable, OriginalTable, OriginalTableSize);
59
60 return EFI_SUCCESS;
61 }