SlotConfig.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*++
  2. Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. SlotConfig.c
  6. Abstract:
  7. Sets platform/SKU specific expansion slot information.
  8. --*/
  9. #include "PlatformDxe.h"
  10. #include <Protocol/SmbiosSlotPopulation.h>
  11. #include <IndustryStandard/Pci22.h>
  12. //
  13. // Default bus number for the bridge
  14. //
  15. #define DEF_BUS_CONFIG 0x0101
  16. #define DEF_BUS 0x01
  17. //
  18. // Data structures for slot information
  19. //
  20. typedef struct {
  21. UINT16 SmbiosSlotId;
  22. UINT8 Bus;
  23. UINT8 Dev;
  24. UINT8 Function;
  25. UINT8 TargetDevice;
  26. } EFI_PCI_SLOT_BRIDGE_INFO;
  27. //
  28. // Product specific bridge to slot routing information
  29. //
  30. EFI_PCI_SLOT_BRIDGE_INFO mSlotBridgeTable[] = {
  31. {
  32. 0x01, //PCIe x1 ICH (Bridge B0:D28:F1)
  33. DEFAULT_PCI_BUS_NUMBER_PCH,
  34. PCI_DEVICE_NUMBER_PCH_PCIE_ROOT_PORTS,
  35. PCI_FUNCTION_NUMBER_PCH_PCIE_ROOT_PORT_2,
  36. 0
  37. }
  38. };
  39. UINTN mSlotBridgeTableSize =
  40. sizeof(mSlotBridgeTable) / sizeof(EFI_PCI_SLOT_BRIDGE_INFO);
  41. //
  42. // Slot entry table for IBX RVP
  43. //
  44. EFI_SMBIOS_SLOT_ENTRY mSlotEntries[] = {
  45. {0x06, FALSE, TRUE}, // PCIe x16 Slot 1 (NOT USED)
  46. {0x04, FALSE, TRUE}, // PCIe x16 Slot 2 (NOT USED)
  47. {0x03, FALSE, TRUE}, // PCIe x4 Slot (NOT USED)
  48. {0x02, FALSE, FALSE}, // Mini PCIe x1 Slot
  49. {0x15, FALSE, TRUE}, // PCIe x1 Slot 2 (NOT USED)
  50. {0x16, FALSE, TRUE}, // PCIe x1 Slot 3 (NOT USED)
  51. {0x07, FALSE, FALSE}, // PCI Slot 1
  52. {0x18, FALSE, TRUE}, // PCI Slot 2 (NOT USED)
  53. {0x17, FALSE, TRUE}, // PCI Slot 3 (NOT USED)
  54. };
  55. EFI_SMBIOS_SLOT_POPULATION_INFO mSlotInformation = {
  56. sizeof(mSlotEntries) / sizeof(EFI_SMBIOS_SLOT_ENTRY),
  57. mSlotEntries
  58. };