EmuMagicPageLib.h 982 B

1234567891011121314151617181920212223242526272829303132
  1. /*++ @file
  2. The PCD, gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage, points to a magic page
  3. of memory that is like SRAM on an embedded system. This file defines what goes
  4. where in the magic page.
  5. Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
  6. SPDX-License-Identifier: BSD-2-Clause-Patent
  7. **/
  8. #ifndef __EMU_MAGIC_PAGE_LIB_H__
  9. #define __EMU_MAGIC_PAGE_LIB_H__
  10. #include <PiPei.h>
  11. #include <Library/PcdLib.h>
  12. #include <Protocol/EmuThunk.h>
  13. typedef struct {
  14. // Used by PEI Core and PEIMs to store the PEI Services pointer.
  15. // Privilege issues prevent using the PI mechanism in the emulator.
  16. CONST EFI_PEI_SERVICES **PeiServicesTablePointer;
  17. // Used by SecPeiServicesLib
  18. EFI_PEI_PPI_DESCRIPTOR *PpiList;
  19. // Needed by PEI PEI PeCoffLoaderExtraActionLib
  20. EMU_THUNK_PROTOCOL *Thunk;
  21. } EMU_MAGIC_PAGE_LAYOUT;
  22. #define EMU_MAGIC_PAGE() ((EMU_MAGIC_PAGE_LAYOUT *)((UINTN)PcdGet64 (PcdPeiServicesTablePage)))
  23. #endif