Home | History | Annotate | Download | only in PlatformInitPei
      1 /** @file
      2 
      3   Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
      4 
      5   This program and the accompanying materials are licensed and made available under
      7   the terms and conditions of the BSD License that accompanies this distribution.
      9   The full text of the license may be found at
     11   http://opensource.org/licenses/bsd-license.php.
     13 
     15   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     17   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     19 
     21 
     23 Module Name:
     24 
     25 
     26   PlatformSsaInitPeim.c
     27 
     28 Abstract:
     29 
     30 
     31 --*/
     32 
     33 #include "PlatformEarlyInit.h"
     34 
     35 /**
     36   Perform SSA related platform initialization.
     37 
     38 **/
     39 VOID
     40 PlatformSsaInit (
     41   IN SYSTEM_CONFIGURATION        *SystemConfiguration,
     42   IN CONST EFI_PEI_SERVICES          **PeiServices
     43   )
     44 {
     45 
     46   DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - Start\n"));
     47   DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - SystemConfiguration->ISPDevSel 0x%x\n",SystemConfiguration->ISPDevSel));
     48   if(SystemConfiguration->ISPDevSel == 0x02)
     49   {
     50     //
     51     // Device 3 Interrupt Route
     52     //
     53     MmioWrite16 (
     54       (ILB_BASE_ADDRESS + R_PCH_ILB_D3IR),
     55       V_PCH_ILB_DXXIR_IAR_PIRQH   // For IUNIT
     56     );
     57     MmioRead16(ILB_BASE_ADDRESS + R_PCH_ILB_D3IR); // Read Posted Writes Register
     58     DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - Device 3 Interrupt Route Done\n"));
     59   }
     60 
     61   //
     62   // Device 2 Interrupt Route
     63   //
     64   MmioWrite16 (
     65     (ILB_BASE_ADDRESS + R_PCH_ILB_D2IR),
     66     V_PCH_ILB_DXXIR_IAR_PIRQA   // For IGD
     67   );
     68   MmioRead16(ILB_BASE_ADDRESS + R_PCH_ILB_D2IR); // Read Posted Writes Register
     69   DEBUG ((EFI_D_ERROR, "PlatformSsaInit() - Device 2 Interrupt Route Done\n"));
     70 
     71   return;
     72 }
     73