]> git.proxmox.com Git - mirror_edk2.git/blame - 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
CommitLineData
249383cf 1/** @file\r
2 Allows an override of the SEC SEC PPI Dispatch Table. This allows \r
3 customized PPIs to be passed into the PEI Core.\r
4\r
5Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
6This program and the accompanying materials \r
7are licensed and made available under the terms and conditions of the BSD License \r
8which accompanies this distribution. The full text of the license may be found at \r
9http://opensource.org/licenses/bsd-license.php \r
10 \r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
14--*/\r
15\r
16#include <PiPei.h>\r
69cf40e0 17#include <Library/BaseMemoryLib.h>\r
18#include <Library/SecDispatchTableLib.h>\r
19\r
249383cf 20\r
21/**\r
69cf40e0 22 Return the number of bytes that OverrideDispatchTable() will append to\r
23 the dispatch table.\r
249383cf 24\r
69cf40e0 25 @return Size of table in bytes OverrideDispatchTable() will return\r
249383cf 26\r
69cf40e0 27**/\r
28UINTN\r
29EFIAPI\r
30OverrideDispatchTableExtraSize (\r
31 )\r
32{\r
33 return 0;\r
34}\r
249383cf 35\r
69cf40e0 36\r
37/**\r
38 Allow an override of the Sec PPI Dispatch Table. This table contains PPIs passed\r
39 up from SEC to PEI. \r
40\r
41 @param OriginalTable SECs default PPI dispatch table\r
42 @param OriginalTableSize Size of SECs default PPI dispatch table\r
43 @param NewTable New dispatch table\r
44 @param NewTableSize Size of of the NewTable in bytes\r
45\r
46 @return EFI_SUCCESS table was copied\r
249383cf 47\r
48**/\r
69cf40e0 49EFI_STATUS\r
249383cf 50EFIAPI\r
51OverrideDispatchTable (\r
69cf40e0 52 IN CONST EFI_PEI_PPI_DESCRIPTOR *OriginalTable,\r
53 IN UINTN OriginalTableSize,\r
54 IN OUT EFI_PEI_PPI_DESCRIPTOR *NewTable,\r
55 IN UINTN NewTableSize\r
249383cf 56 )\r
57{\r
69cf40e0 58 CopyMem (NewTable, OriginalTable, OriginalTableSize);\r
59\r
60 return EFI_SUCCESS;\r
249383cf 61}\r