PlatformSsaInitPeim.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /** @file
  2. Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. PlatformSsaInitPeim.c
  6. Abstract:
  7. --*/
  8. #include "PlatformEarlyInit.h"
  9. /**
  10. Perform SSA related platform initialization.
  11. **/
  12. VOID
  13. PlatformSsaInit (
  14. IN SYSTEM_CONFIGURATION *SystemConfiguration,
  15. IN CONST EFI_PEI_SERVICES **PeiServices
  16. )
  17. {
  18. DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - Start\n"));
  19. DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - SystemConfiguration->ISPDevSel 0x%x\n",SystemConfiguration->ISPDevSel));
  20. if(SystemConfiguration->ISPDevSel == 0x02)
  21. {
  22. //
  23. // Device 3 Interrupt Route
  24. //
  25. MmioWrite16 (
  26. (ILB_BASE_ADDRESS + R_PCH_ILB_D3IR),
  27. V_PCH_ILB_DXXIR_IAR_PIRQH // For IUNIT
  28. );
  29. MmioRead16(ILB_BASE_ADDRESS + R_PCH_ILB_D3IR); // Read Posted Writes Register
  30. DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - Device 3 Interrupt Route Done\n"));
  31. }
  32. //
  33. // Device 2 Interrupt Route
  34. //
  35. MmioWrite16 (
  36. (ILB_BASE_ADDRESS + R_PCH_ILB_D2IR),
  37. V_PCH_ILB_DXXIR_IAR_PIRQA // For IGD
  38. );
  39. MmioRead16(ILB_BASE_ADDRESS + R_PCH_ILB_D2IR); // Read Posted Writes Register
  40. DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - Device 2 Interrupt Route Done\n"));
  41. return;
  42. }