PrePiHobListPointer.c 762 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /** @file
  2. *
  3. * Copyright (c) 2011, ARM Limited. All rights reserved.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause-Patent
  6. *
  7. **/
  8. #include <PiPei.h>
  9. #include <Library/ArmLib.h>
  10. #include <Library/PrePiHobListPointerLib.h>
  11. #include <Library/DebugLib.h>
  12. /**
  13. Returns the pointer to the HOB list.
  14. This function returns the pointer to first HOB in the list.
  15. @return The pointer to the HOB list.
  16. **/
  17. VOID *
  18. EFIAPI
  19. PrePeiGetHobList (
  20. VOID
  21. )
  22. {
  23. return (VOID *)ArmReadTpidrurw();
  24. }
  25. /**
  26. Updates the pointer to the HOB list.
  27. @param HobList Hob list pointer to store
  28. **/
  29. EFI_STATUS
  30. EFIAPI
  31. PrePeiSetHobList (
  32. IN VOID *HobList
  33. )
  34. {
  35. ArmWriteTpidrurw((UINTN)HobList);
  36. return EFI_SUCCESS;
  37. }