PciHostResource.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /** @file
  2. @copyright
  3. Copyright 1999 - 2021 Intel Corporation. <BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _PCI_HOST_RESOURCE_H_
  7. #define _PCI_HOST_RESOURCE_H_
  8. #include <PiDxe.h>
  9. #include <UncoreCommonIncludes.h>
  10. #define EFI_RESOURCE_NONEXISTENT 0xFFFFFFFFFFFFFFFF
  11. #define EFI_RESOURCE_LESS 0xFFFFFFFFFFFFFFFE
  12. typedef struct {
  13. UINTN BusBase;
  14. UINTN BusLimit;
  15. UINTN BusReserve;
  16. UINT32 Mem32Base;
  17. UINT32 Mem32Limit;
  18. UINT64 Mem64Base;
  19. UINT64 Mem64Limit;
  20. UINTN IoBase;
  21. UINTN IoLimit;
  22. } PCI_ROOT_BRIDGE_RESOURCE_APERTURE;
  23. typedef enum {
  24. TypeIo = 0,
  25. TypeMem32,
  26. TypePMem32,
  27. TypeMem64,
  28. TypePMem64,
  29. TypeBus,
  30. TypeMax
  31. } PCI_RESOURCE_TYPE;
  32. typedef enum {
  33. ResNone,
  34. ResSubmitted,
  35. ResRequested,
  36. ResAllocated,
  37. ResStatusMax
  38. } RES_STATUS;
  39. typedef struct {
  40. PCI_RESOURCE_TYPE Type;
  41. //
  42. // Base is a host address
  43. //
  44. UINT64 Base;
  45. UINT64 Length;
  46. UINT64 Alignment;
  47. RES_STATUS Status;
  48. } PCI_RES_NODE;
  49. #endif // _PCI_HOST_RESOURCE_H_