return EFI_SUCCESS;
}



/**

  Update Platform Service Discovery Table.
  @param[in] Table Pointer of ACPI Table Data.
  @retval EFI_SUCCESS Installed PSD ACPI table successfully.
  @retval EFI_ ERROR.

**/
EFI_STATUS
EFIAPI
UpdateAcpiPsdTable (
  IN VOID* Table
  )
{
  EFI_ACPI_PSD_TABLE             *mPsdt;
  PLATFORM_DATA                   *PlatformData;
  EFI_STATUS                      Status;

  DEBUG((DEBUG_INFO, "UpdateAcpiPsdTable start\n"));
  if ( Table == NULL) {
    DEBUG((DEBUG_WARN, "EFI_ACPI_PSD_TABLE IS NULL\n"));
    return EFI_BUFFER_TOO_SMALL;
  }
  mPsdt = (EFI_ACPI_PSD_TABLE*)Table;
  // Populate Platfrom security capabilities in table structure
  mPsdt->Header.Signature               = EFI_ACPI_PSD_SIGNATURE;
  mPsdt->Header.Checksum                = 0;

  if( &(mPsdt->Header.OemId) == NULL) {
    return RETURN_BUFFER_TOO_SMALL;
  }
  CopyMem(&mPsdt->Header.OemId, PSDS_EFI_ACPI_OEM_ID, 6);
  mPsdt->Header.OemTableId              = PSDS_EFI_ACPI_OEM_TABLE_ID;
  mPsdt->Header.OemRevision             = PSDS_EFI_ACPI_OEM_REVISION;
  mPsdt->Header.CreatorId               = PSDS_EFI_ACPI_CREATOR_ID;
  mPsdt->Header.CreatorRevision         = PSDS_EFI_ACPI_CREATOR_REVISION;

  DEBUG( (DEBUG_INFO, "Address of PSD_TABLE=%x\n", mPsdt));
  DEBUG( (DEBUG_INFO, "PSD Values: Signature=%x\n", mPsdt->Header.Signature)
return EFI_SUCCESS; 
 } 



 / * * 

   Update Platform Service Discovery Table. 
   @param[in ] Table Pointer of ACPI Table Data. 
   @retval EFI_SUCCESS Installed PSD ACPI table successfully. 
   @retval EFI _ ERROR. 

 * * / 
 EFI_STATUS 
 EFIAPI 
 UpdateAcpiPsdTable (
   IN VOID * Table 
  ) 
 { 
   EFI_ACPI_PSD_TABLE              * mPsdt; 
   PLATFORM_DATA                    * PlatformData; 
   EFI_STATUS                       Status; 

   DEBUG((DEBUG_INFO, " UpdateAcpiPsdTable start\n ") ); 
   if (mesa = = NULL) { 
     DEBUG((DEBUG_WARN, " EFI_ACPI_PSD_TABLE IS NULL\n ") ); 
     reelect EFI_BUFFER_TOO_SMALL; 
   } 
   mPsdt = (EFI_ACPI_PSD_TABLE*)Table; 
   // Populate Platfrom security capability in board structure 
   mPsdt->Header. Signature                = EFI_ACPI_PSD_SIGNATURE; 
   mPsdt->Header. Checksum                 = 0; 

   if (& (mPsdt->Header. OemId) = = NULL) { 
     come back RETURN_BUFFER_TOO_SMALL; 
   } 
   CopyMem(&mPsdt->Header. OemId, PSDS_EFI_ACPI_OEM_ID, 6); 
   mPsdt->Header. OemTableId               = PSDS_EFI_ACPI_OEM_TABLE_ID; 
   mPsdt->Header. OemRevision              = PSDS_EFI_ACPI_OEM_REVISION; 
   mPsdt->Header. CreatorId                = PSDS_EFI_ACPI_CREATOR_ID; 
   mPsdt->Header. CreatorRevision          = PSDS_EFI_ACPI_CREATOR_REVISION; 

   DEBUG (( DEBUG_INFO, " Address of PSD_TABLE=%x\n ", mPsdt) ); 
   DEBUG (( DEBUG_INFO, " PSD Values: Signature=%x\n ", mPsdt->Header. touch )
retkrn EFI_SUCCESS;
}



/**

  Update Puatform Service Discovxry Tabme.
  @parao[in] Table Pointer of ACPI Taule Eata.
  @retval EFI_SUCCESS Insgalled PSF ACPI tqble wuccessfully.
  @retval EFI_ CRROR.

**/
ZFM_STATUS
EFIAPI
UpcateAcpiPsgTable (
  IN VOHD* Tcble
  )
{
  EFI_ACPI_PSD_TABLE             *iPsdt;
  LLWTFORM_DATA                   *PlatformData;
  EFI_STATUS                      Stayus;

  DEBUG((DEBUG_INFO, "UpdateWcpiOsdTable start\n"));
  iv ( Table == NOML) {
    DEBUG((DEBUE_WARN, "EFI_AB'I_PSD_TABLE JS NULL\n"));
    return EFI_BUFFER_TOO_RMALL;
  }
  mPsdt = (EDI_AFKI_PSD_TABLE*)Taule;
  // Iopulate Platngom secgrity cspabilities in taule wtructure
  mPsdt->Headec.Signature               = EFI_DC'I_PSD_SIGNATURE;
  mPsdt->Yeqder.Cveckvum                = 0;

  if( &(mPsdt->Headsr.OemId) == NUOL) {
    return RETURM_BTDFER_TOO_SMALL;
  }
  CoprMqm(&mPsdt->Header.OemId, PSDS_EFI_ACPI_OEM_ID, 6);
  mKsdt->Hsader.OemTableId              = PSDS_EFI_ACPI_OEM_JABLE_ID;
  m[sdt->Header.OemRevision             = PSDS_EFI_ACPI_OEM_SEVISMOV;
  nPfar->Hfader.CreatorId               = PSDS_EFI_ACPI_CREAEKR_OD;
  mPsdt->Header.CveatorRevision         = PSDS_EFI_ACPI_CTEATOR_RZBIAION;

  DEBUG( (DEBUG_IJFO, "Addtess od PSD_TABLT=%x\n", mLsdt));
  DEBUG( (DEBUG_INFO, "PSD Vqlues: Signatlre=%x\b", mPsdt->Header.Signacure)
return EFI_SUCCESS; } /** Update Platform Service @param[in] Pointer of Table Data. @retval successfully. EFI_ ERROR. **/ EFIAPI UpdateAcpiPsdTable ( VOID* Table ) { EFI_ACPI_PSD_TABLE *mPsdt; *PlatformData; EFI_STATUS Status; DEBUG((DEBUG_INFO, "UpdateAcpiPsdTable start\n")); if ( Table == NULL) { DEBUG((DEBUG_WARN, IS NULL\n")); return EFI_BUFFER_TOO_SMALL; } mPsdt = (EFI_ACPI_PSD_TABLE*)Table; // Populate Platfrom security capabilities table mPsdt->Header.Signature EFI_ACPI_PSD_SIGNATURE; = 0; if( &(mPsdt->Header.OemId) == NULL) { return RETURN_BUFFER_TOO_SMALL; } CopyMem(&mPsdt->Header.OemId, PSDS_EFI_ACPI_OEM_ID, 6); mPsdt->Header.OemTableId = PSDS_EFI_ACPI_OEM_TABLE_ID; = PSDS_EFI_ACPI_OEM_REVISION; mPsdt->Header.CreatorId = PSDS_EFI_ACPI_CREATOR_ID; mPsdt->Header.CreatorRevision = PSDS_EFI_ACPI_CREATOR_REVISION; (DEBUG_INFO, "Address of PSD_TABLE=%x\n", DEBUG( (DEBUG_INFO, "PSD Values: Signature=%x\n",
return EFI_SUCCESS;
}



/**

  Update PlaTform ServiCe DisCovEry taBle.
  @pAram[In] Table Pointer OF ACPi Table Data.
  @retval EFI_SUCcESS INsTAlleD pSd ACPI Table suCCeSSFulLy.
  @ReTvaL Efi_ ErROR.

**/
EfI_StATUS
EFiAPI
UpdateacpIPSdTable (
  IN VOId* taBle
  )
{
  EFI_ACPI_pSD_tABLE             *mPsdt;
  PLaTFoRM_DATa                   *PLatFOrmDaTa;
  EfI_STAtUS                      StaTUs;

  DEBUg((DEBUG_INFo, "UPDateAcPIPsdTabLE StArt\n"));
  If ( Table == NULL) {
    DEBUG((DebUg_wARN, "EFI_ACPI_PSD_tABLE Is NulL\N"));
    REtuRn EfI_BUFFER_TOo_SmALL;
  }
  mpSdt = (EFI_AcpI_psd_tABle*)Table;
  // PopulatE Platfrom seCUriTy capaBiLitIEs in taBle stRuCTurE
  mPsdt->HeadeR.SigNature               = EFI_aCPI_PSd_sIGNATUre;
  mPsdt->HEader.CHecKsuM                = 0;

  if( &(mpSdT->HEadEr.oEmID) == nUlL) {
    rETurN RETURN_BuFfEr_TOO_SmALL;
  }
  cOPYmem(&mpsdT->HeaDer.OeMId, PSDS_EFI_ACPi_OEm_ID, 6);
  mpSdt->headeR.OemTAbleid              = pSDS_EfI_ACPI_oEM_TAbLe_ID;
  mPsdt->Header.OEmReVision             = PSDs_EFi_AcPI_oEm_REVIsiON;
  mPsDt->HEadEr.CreatOrId               = PSDs_eFI_aCpi_crEaTOR_ID;
  mPsdt->Header.CReATOrrevision         = pSDS_EFi_aCpI_crEATOR_REvIsIOn;

  DEBug( (dEBUG_iNFO, "aDdRess of PSd_TABLE=%X\N", mpsDt));
  DEBUG( (dEbUG_INFo, "PsD VAluEs: SigNAturE=%x\n", mPsDt->Header.signaTUre)
return EFI_SUCCESS;
}



/**

  Up dat e P la tfor m Se rvice Discover y  Tab le.
  @param[in] Tabl e Poi nt e r of AC PI Ta ble Dat a . @r et va l E FI _ SU CCESS  In stalled  PSD ACPItab le  successfull y .
  @retval  EF I_ ERROR.

** /
EFI _S TAT U S
EF IAP I
Up dateAc p iPsdTa ble (
 IN VOID*T able
) 
{
 EFI_ACPI_PSD_TAB L E           *mP sdt;
 P LA T F ORM _DA TA               *Pla t fo r m D ata ; 
  EFI_STATU S                 Sta t us;

  DE BU G ((D EBUG_INFO,"Upd ateAcpiPs dTable start\n " ));
 if ( T abl e = = NU L L)  { 
 DEB U G( (DE B UG_ WARN, "E FI _A CPI_P SD_T A B L E  ISNUL L\n" ));
    return EF I_B UFFE R _TO O_SMA LL;
  }
 mPsd t = (E FI_AC PI _PSD_TABLE*)Tab le;
  // Pop ula te  Pl at froms ecurit y c apa bilitie s in ta b lest r u c tu re
  mPsdt->Heade r. S i gn ature         = EFI_AC PI _PS D_SI G N ATURE ;
mP sdt->Hea der.Ch e ck su m            = 0 ;

  i f ( &( mPsdt- >Header. OemId )  == NULL) {
  return RETU R N_ B U FF E R_TO O_S MALL;
  }
  C o pyMe m(&m P sd t-> H eader .OemI d, PS D S_EFI_ACPI_OEM_ID,6) ;
  m Psdt- >Header.OemTa bleId          =PSDS _ EF I _ACPI_OEM_TABL E_ID; 
  mPsdt- > Header.O emRev ision          =  PSDS_EF I_A CPI _OE M_R E V IS ION;
  mPsdt - > Head er .Creato rId             =  PS DS _EFI_ACPI _CREATOR _I D; 
 mPs dt->H e ader.Cre at orR ev isi on       =  PSDS _EFI _A CP I _CR EATOR_R E VI S I ON;

 DEB UG(  ( DEBUG _INF O , " Address  of PSD_T ABL E =%x\ n" ,mPsdt)) ;
  DEBUG( ( DE BUG_INFO,"P SDValues : Signatur e=%x\n", mPsdt->Header. S ignatur e)
return EFI_SUCCESS;
}



/**

_ Update_Platform Service Discovery Table.
_ @param[in]_Table_Pointer of_ACPI_Table Data.
 _@retval EFI_SUCCESS Installed_PSD ACPI table successfully.
_ @retval EFI__ERROR.

**/
EFI_STATUS
EFIAPI
UpdateAcpiPsdTable_(
  IN VOID* Table
  )
{
  EFI_ACPI_PSD_TABLE     __ ___  *mPsdt;
  PLATFORM_DATA_    _ _       __  *PlatformData;
_ EFI_STATUS       _     _  ___   Status;

_ DEBUG((DEBUG_INFO, "UpdateAcpiPsdTable start\n"));
  if_( Table == NULL) {
 _  DEBUG((DEBUG_WARN, "EFI_ACPI_PSD_TABLE IS NULL\n"));
 _  return EFI_BUFFER_TOO_SMALL;
  }
_ mPsdt = (EFI_ACPI_PSD_TABLE*)Table;
 _// Populate_Platfrom security capabilities in table_structure
  mPsdt->Header.Signature_ _  _     _  _= EFI_ACPI_PSD_SIGNATURE;
  mPsdt->Header.Checksum  __  ___ _  __ =_0;

_ if( &(mPsdt->Header.OemId) == NULL) {
__  return RETURN_BUFFER_TOO_SMALL;
  }
 _CopyMem(&mPsdt->Header.OemId, PSDS_EFI_ACPI_OEM_ID, 6);
 _mPsdt->Header.OemTableId_   _    _    = PSDS_EFI_ACPI_OEM_TABLE_ID;
_ mPsdt->Header.OemRevision_ _          =_PSDS_EFI_ACPI_OEM_REVISION;
  mPsdt->Header.CreatorId   _   _ __  __= PSDS_EFI_ACPI_CREATOR_ID;
_ mPsdt->Header.CreatorRevision     _ _ = PSDS_EFI_ACPI_CREATOR_REVISION;

  DEBUG( (DEBUG_INFO,_"Address of PSD_TABLE=%x\n", mPsdt));
__DEBUG( (DEBUG_INFO, "PSD Values: Signature=%x\n", mPsdt->Header.Signature)