From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.3253.1574404399285073315 for ; Thu, 21 Nov 2019 22:33:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=cLlcVvUQ; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: michael.a.kubacki@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2019 22:33:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,228,1571727600"; d="scan'208";a="201406607" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga008.jf.intel.com with ESMTP; 21 Nov 2019 22:33:17 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 22:33:18 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 22:33:17 -0800 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (104.47.49.54) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 22:33:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ID+TJAPshOMfR1/zkHBOqw84qXf25owaLT0hA/mm73SpF4oF6SU8BmNTBSr4IwDwVAnSUkzqgZ+IBjJW8H9G8riQnSd2hZKivDsv2benDQ2LS18HeETOWLDVc12b/0dQ11Xx3jWm5i9Dbph0UzX7teN+nOw3S2KhVK8rR86ZS5KWFe2qyROJ8fgfRVxtQGgIEq/DFRu+A337PVoeNJ61qY6ha1OSB/pmQ/11r9Q6fZ1oOv76COC1j6e4AZhr1Pr41pc9j7/dR1z/RQtlsRB53O6FwHavudAwefcyH6fHPD0E2Oa0tZqU2oU1bu8yA8m9uCZXbnqxI6MwMNqRrJakwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3EQMZP4eWW6f365f5S3P2oR7CWWTRubpB3zCk4785qA=; b=iyQUDiVx8B6rML/Laa60VokK9waRG2bC8zwZPQX7GUALe4ey10wTqy7mBagMI3xY4mv1EwebBgrTZiZsytJVeSZd4qhGNA9Wwn1S/gNiuNPvazxANbahXvTlR7l4DADGv+3YTjx0AzEtK8llh1RxUegHxgXrl5GlFy1+iNlO4Lufav9wcVjs55CYEg2WYOWPhanahVGUg+6a0CqOJQfJpoM7+qKi2iLOVdSa07TC7mSjffyImtxrc1ndqHqLsqwS8IQXchPkQbb+HMtSv0y/iIJOsyBO+GGUhWhxQdqSdP2mubKiW3PpMcQiPnB/T90GvekwquxHZkXQoD0SD/Q1aw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3EQMZP4eWW6f365f5S3P2oR7CWWTRubpB3zCk4785qA=; b=cLlcVvUQHf7xBjpzg+B7KyCyBmlo5IvbU6LEw3tTCygdqVYWMtf2HxMPZUDiCxHPqHQ+kmxiYGA84AU32E6ZvZTDuOxVOwboiDC7hsnfmTRgatBmV35Kx1dRQOm3JJE0qGwL+8Vf3nA/ncaAzQlK6KOXmmta0ZwEAiArj1fdv5Q= Received: from BY5PR11MB4484.namprd11.prod.outlook.com (52.132.254.155) by BY5PR11MB4053.namprd11.prod.outlook.com (10.255.72.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.19; Fri, 22 Nov 2019 06:32:59 +0000 Received: from BY5PR11MB4484.namprd11.prod.outlook.com ([fe80::a114:604b:7ca3:5420]) by BY5PR11MB4484.namprd11.prod.outlook.com ([fe80::a114:604b:7ca3:5420%7]) with mapi id 15.20.2474.019; Fri, 22 Nov 2019 06:32:59 +0000 From: "Kubacki, Michael A" To: "Desimone, Nathaniel L" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , Jeremy Soller Subject: Re: [edk2-platforms] [PATCH V2 13/14] KabylakeOpenBoardPkg: Remove SecFspWrapperPlatformSecLib override Thread-Topic: [edk2-platforms] [PATCH V2 13/14] KabylakeOpenBoardPkg: Remove SecFspWrapperPlatformSecLib override Thread-Index: AQHVoEoNPoonkWy0DUWZ4NSo2abVCKeWuARg Date: Fri, 22 Nov 2019 06:32:59 +0000 Message-ID: References: <20191121085853.2626-1-nathaniel.l.desimone@intel.com> <20191121085853.2626-14-nathaniel.l.desimone@intel.com> In-Reply-To: <20191121085853.2626-14-nathaniel.l.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjFiYjA5NTItZWQ4ZC00MDJiLWE0YjctZWNkZGZiZWJjOTY5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQkpQVm9VUVNpYkFoWFI2TG41dEdNUEhtWUNHbWE4bWR1WDNpUFJoWFlCR1dyRnNuZE45R1JkTzcydGwzU2RUUCJ9 dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=michael.a.kubacki@intel.com; x-originating-ip: [134.134.136.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f0004367-44d1-45bb-dc2d-08d76f15d142 x-ms-traffictypediagnostic: BY5PR11MB4053: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 02296943FF x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(1496009)(396003)(136003)(366004)(346002)(376002)(39860400002)(13464003)(189003)(199004)(3846002)(26005)(7736002)(76176011)(76116006)(229853002)(66066001)(102836004)(9686003)(6116002)(86362001)(6506007)(305945005)(66946007)(11346002)(14444005)(256004)(64756008)(66446008)(2906002)(66556008)(53546011)(74316002)(8676002)(8936002)(19627235002)(66476007)(81166006)(446003)(81156014)(6436002)(25786009)(52536014)(2501003)(14454004)(71200400001)(71190400001)(30864003)(7696005)(186003)(55016002)(4326008)(54906003)(316002)(110136005)(99286004)(6246003)(33656002)(5660300002)(508600001)(213903007)(579004)(559001)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:BY5PR11MB4053;H:BY5PR11MB4484.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Uncy0Rx78HoiF/0gpNR7YkWwlrE0eGFJ9Cp6PRTgbAUEu9NlPkO4BpvnxTnx1E9pFDBHDFzHfh2yumD8l1oUTMJ4ncNXDZo49BKAipiujC64POJfP5qO/enca3VHiVxv4bYw3i8EE1r9lDzxLIZOhpirmbwSW7jNm4lkSaAjIMw3tabU0D0uck2GMvdKEzhXG7mL2GJxo8O1fgwFc/sDgwijKDSCq3iryM79Jt7/9l04NJ/ywpYURx6OcgaKB4j03lG9ZDZA0M3PtUavbusjU75/emLjf16DLfyHMb8ss/N36Psy3rmBpFT4K1v6+JyAAM2xaG2BNvLOMYfkw4nFlY8c2GfTYCpsa5n0DYKlJixZleUqRgu1RtGyvCR8JZKFNUfZa2chOt8gFUcf1dnPrW13vh0C131Ao7lPlzSt4LVU8GN35fWo6Vm8/ck0fShh MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f0004367-44d1-45bb-dc2d-08d76f15d142 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2019 06:32:59.0301 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lA0G5x2fLDuPA6p1u/swAJgB0TQOf8dqFU8++4cv+btPGvk/AUIX2wSrtWKUvIKqyumzMtr0A99lA7H+jc7PuP5NWO9IWTfBdpUXod0kRfQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4053 Return-Path: michael.a.kubacki@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael Kubacki > -----Original Message----- > From: Desimone, Nathaniel L > Sent: Thursday, November 21, 2019 12:59 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Kubacki, Michael A > ; Jeremy Soller > Subject: [edk2-platforms] [PATCH V2 13/14] KabylakeOpenBoardPkg: > Remove SecFspWrapperPlatformSecLib override >=20 > Cc: Chasel Chiu > Cc: Michael Kubacki > Cc: Jeremy Soller > Signed-off-by: Nate DeSimone > --- > .../FspWrapperPlatformSecLib.c | 186 --------- > .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 40 -- > .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h | 42 -- > .../Ia32/PeiCoreEntry.nasm | 130 ------- > .../Ia32/SecEntry.nasm | 361 ------------------ > .../Ia32/Stack.nasm | 72 ---- > .../PlatformInit.c | 47 --- > .../SecFspWrapperPlatformSecLib.inf | 97 ----- > .../SecGetPerformance.c | 89 ----- > .../SecPlatformInformation.c | 78 ---- > .../SecRamInitData.c | 36 -- > .../SecTempRamDone.c | 73 ---- > .../GalagoPro3/OpenBoardPkg.dsc | 2 +- > .../KabylakeRvp3/OpenBoardPkg.dsc | 2 +- > 14 files changed, 2 insertions(+), 1253 deletions(-) delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/FspWrapperPlatformSecLib.c > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/FsptCoreUpd.h > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/Ia32/Fsp.h > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/Ia32/PeiCoreEntry.nasm > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/Ia32/SecEntry.nasm > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/Ia32/Stack.nasm > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/PlatformInit.c > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/SecFspWrapperPlatformSecLib.inf > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/SecGetPerformance.c > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/SecPlatformInformation.c > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/SecRamInitData.c > delete mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapper > PlatformSecLib/SecTempRamDone.c >=20 > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/FspWrapperPlatformSecLib.c > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/FspWrapperPlatformSecLib.c > deleted file mode 100644 > index d40eecae95..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/FspWrapperPlatformSecLib.c > +++ /dev/null > @@ -1,186 +0,0 @@ > -/** @file- Provide FSP wrapper platform sec related function.--Copyrigh= t > (c) 2017 - 2019, Intel Corporation. All rights reserved.
-SPDX-License= - > Identifier: BSD-2-Clause-Patent--**/--#include --#include > -#include - > #include -#include > -#include -#include > --#include -#include > -#include -#include > --/**- This interface conveys state information out of = the > Security (SEC) phase into PEI.-- @param[in] PeiServices = Pointer to > the PEI Services Table.- @param[in,out] StructureSize Pointe= r to the > variable describing size of the input buffer.- @param[out] > PlatformInformationRecord Pointer to the > EFI_SEC_PLATFORM_INFORMATION_RECORD.-- @retval EFI_SUCCESS > The data was successfully returned.- @retval EFI_BUFFER_TOO_SMALL The > buffer was too small.--**/-EFI_STATUS-EFIAPI-SecPlatformInformation (- I= N > CONST EFI_PEI_SERVICES **PeiServices,- IN OUT UINT= 64 > *StructureSize,- OUT EFI_SEC_PLATFORM_INFORMATION_RECORD > *PlatformInformationRecord- );--/**- This interface conveys performance > information out of the Security (SEC) phase into PEI.-- This service is > published by the SEC phase. The SEC phase handoff has an optional- > EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed > from SEC into the- PEI Foundation. As such, if the platform supports > collecting performance data in SEC,- this information is encapsulated in= to the > data structure abstracted by this service.- This information is collecte= d for > the boot-strap processor (BSP) on IA-32.-- @param[in] PeiServices The > pointer to the PEI Services Table.- @param[in] This The pointer= to this > instance of the PEI_SEC_PERFORMANCE_PPI.- @param[out] Performance > The pointer to performance data collected in SEC phase.-- @retval > EFI_SUCCESS The data was successfully returned.--**/-EFI_STATUS-EFIAPI- > SecGetPerformance (- IN CONST EFI_PEI_SERVICES **PeiServices,- = IN > PEI_SEC_PERFORMANCE_PPI *This,- OUT > FIRMWARE_SEC_PERFORMANCE *Performance- );-- > PEI_SEC_PERFORMANCE_PPI mSecPerformancePpi =3D {- > SecGetPerformance-};--EFI_PEI_CORE_FV_LOCATION_PPI > mPeiCoreFvLocationPpi =3D {- (VOID *) (UINTN) FixedPcdGet32 > (PcdFspmBaseAddress)-};--EFI_PEI_PPI_DESCRIPTOR > mPeiCoreFvLocationPpiList[] =3D {- {- EFI_PEI_PPI_DESCRIPTOR_PPI,- > &gEfiPeiCoreFvLocationPpiGuid,- &mPeiCoreFvLocationPpi- }-};-- > EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformPpi[] =3D {- {- > EFI_PEI_PPI_DESCRIPTOR_PPI,- &gTopOfTemporaryRamPpiGuid,- NULL > // To be patched later.- },- {- EFI_PEI_PPI_DESCRIPTOR_PPI | > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,- > &gPeiSecPerformancePpiGuid,- &mSecPerformancePpi- },-};--#define > LEGACY_8259_MASK_REGISTER_MASTER 0x21-#define > LEGACY_8259_MASK_REGISTER_SLAVE 0xA1-#define > LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER 0x4D0-#define > LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE 0x4D1--/**- > Write to mask and edge/level triggered registers of master and slave 8259 > PICs.-- @param[in] Mask low byte for master PIC mask register,- > high byte for slave PIC mask register.- @param[in] EdgeLevel low byte = for > master PIC edge/level triggered register,- high b= yte for slave PIC > edge/level triggered register.--**/-VOID-Interrupt8259WriteMask (- IN > UINT16 Mask,- IN UINT16 EdgeLevel- )-{- IoWrite8 > (LEGACY_8259_MASK_REGISTER_MASTER, (UINT8) Mask);- IoWrite8 > (LEGACY_8259_MASK_REGISTER_SLAVE, (UINT8) (Mask >> 8));- IoWrite8 > (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER, (UINT8) > EdgeLevel);- IoWrite8 > (LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE, (UINT8) > (EdgeLevel >> 8));-}--/**- A developer supplied function to perform > platform specific operations.-- It's a developer supplied function to pe= rform > any operations appropriate to a- given platform. It's invoked just befor= e > passing control to PEI core by SEC- core. Platform developer may modify = the > SecCoreData passed to PEI Core.- It returns a platform specific PPI list= that > platform wishes to pass to PEI core.- The Generic SEC core module will > merge this list to join the final list passed to- PEI core.-- @param[in= ,out] > SecCoreData The same parameter as passing to PEI core. It- > could be overridden by this function.-- @return The platform specific PP= I list > to be passed to PEI core or- NULL if there is no need of such pl= atform > specific PPI list.--**/-EFI_PEI_PPI_DESCRIPTOR *-EFIAPI-SecPlatformMain (= - > IN OUT EFI_SEC_PEI_HAND_OFF *SecCoreData- )-{- > EFI_PEI_PPI_DESCRIPTOR *PpiList;- UINT8 > TopOfTemporaryRamPpiIndex;- UINT8 > *CopyDestinationPointer;-- DEBUG ((DEBUG_INFO, "FSP Wrapper > BootFirmwareVolumeBase - 0x%x\n", SecCoreData- > >BootFirmwareVolumeBase));- DEBUG ((DEBUG_INFO, "FSP Wrapper > BootFirmwareVolumeSize - 0x%x\n", SecCoreData- > >BootFirmwareVolumeSize));- DEBUG ((DEBUG_INFO, "FSP Wrapper > TemporaryRamBase - 0x%x\n", SecCoreData->TemporaryRamBase));- > DEBUG ((DEBUG_INFO, "FSP Wrapper TemporaryRamSize - 0x%x\n", > SecCoreData->TemporaryRamSize));- DEBUG ((DEBUG_INFO, "FSP Wrapper > PeiTemporaryRamBase - 0x%x\n", SecCoreData- > >PeiTemporaryRamBase));- DEBUG ((DEBUG_INFO, "FSP Wrapper > PeiTemporaryRamSize - 0x%x\n", SecCoreData->PeiTemporaryRamSize));- > DEBUG ((DEBUG_INFO, "FSP Wrapper StackBase - 0x%x\n", > SecCoreData->StackBase));- DEBUG ((DEBUG_INFO, "FSP Wrapper StackSize > - 0x%x\n", SecCoreData->StackSize));-- InitializeApicTimer (0, (UINT32) = -1, > TRUE, 5);-- //- // Set all 8259 interrupts to edge triggered and disabl= ed- //- > Interrupt8259WriteMask (0xFFFF, 0x0000);-- //- // Use middle of Heap as > temp buffer, it will be copied by caller.- // Do not use Stack, because = it will > cause wrong calculation on stack by PeiCore- //- PpiList =3D (VOID *)((= UINTN) > SecCoreData->PeiTemporaryRamBase + (UINTN) SecCoreData- > >PeiTemporaryRamSize/2);- CopyDestinationPointer =3D (UINT8 *) PpiList;- > TopOfTemporaryRamPpiIndex =3D 0;- if (PcdGet8 (PcdFspModeSelection) =3D= =3D > 0) {- //- // In Dispatch mode, wrapper should provide > PeiCoreFvLocationPpi.- //- CopyMem (CopyDestinationPointer, > mPeiCoreFvLocationPpiList, sizeof (mPeiCoreFvLocationPpiList));- > TopOfTemporaryRamPpiIndex =3D 1;- CopyDestinationPointer +=3D sizeof > (mPeiCoreFvLocationPpiList);- }- CopyMem (CopyDestinationPointer, > mPeiSecPlatformPpi, sizeof(mPeiSecPlatformPpi));- //- // Patch > TopOfTemporaryRamPpi- //- PpiList[TopOfTemporaryRamPpiIndex].Ppi =3D > (VOID *)((UINTN) SecCoreData->TemporaryRamBase + SecCoreData- > >TemporaryRamSize);-- return PpiList;-}diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/FsptCoreUpd.h > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/FsptCoreUpd.h > deleted file mode 100644 > index 7c0f605b92..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/FsptCoreUpd.h > +++ /dev/null > @@ -1,40 +0,0 @@ > -/** @file--Copyright (c) 2017, Intel Corporation. All rights reserved.- > SPDX-License-Identifier: BSD-2-Clause-Patent--**/--#ifndef > __FSPT_CORE_UPD_H__-#define __FSPT_CORE_UPD_H__--#pragma > pack(1)--/** Fsp T Core UPD-**/-typedef struct {--/** Offset 0x0020-**/- > UINT32 MicrocodeRegionBase;--/** Offset 0x0024-**/- = UINT32 > MicrocodeRegionSize;--/** Offset 0x0028-**/- UINT32 > CodeRegionBase;--/** Offset 0x002C-**/- UINT32 > CodeRegionSize;--/** Offset 0x0030-**/- UINT8 Rese= rved[16];-} > FSPT_CORE_UPD;--#pragma pack()--#endifdiff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/Fsp.h > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/Ia32/Fsp.h > deleted file mode 100644 > index 9f6cdcf476..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/Fsp.h > +++ /dev/null > @@ -1,42 +0,0 @@ > -/** @file- Fsp related definitions--Copyright (c) 2017, Intel Corporati= on. All > rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent--**/-- > #ifndef __FSP_H__-#define __FSP_H__--//-// Fv Header-//-#define > FVH_SIGINATURE_OFFSET 0x28-#define > FVH_SIGINATURE_VALID_VALUE 0x4856465F // valid signature:_FVH- > #define FVH_HEADER_LENGTH_OFFSET 0x30-#define > FVH_EXTHEADER_OFFSET_OFFSET 0x34-#define > FVH_EXTHEADER_SIZE_OFFSET 0x10--//-// Ffs Header-//-#define > FSP_HEADER_GUID_DWORD1 0x912740BE-#define > FSP_HEADER_GUID_DWORD2 0x47342284-#define > FSP_HEADER_GUID_DWORD3 0xB08471B9-#define > FSP_HEADER_GUID_DWORD4 0x0C3F3527-#define > FFS_HEADER_SIZE_VALUE 0x18--//-// Section Header-//-#define > SECTION_HEADER_TYPE_OFFSET 0x03-#define > RAW_SECTION_HEADER_SIZE_VALUE 0x04--//-// Fsp Header-//-#define > FSP_HEADER_IMAGEBASE_OFFSET 0x1C-#define > FSP_HEADER_TEMPRAMINIT_OFFSET 0x30--#endifdiff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/PeiCoreEntry.nasm > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/Ia32/PeiCoreEntry.nasm > deleted file mode 100644 > index 5c5b788085..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/PeiCoreEntry.nasm > +++ /dev/null > @@ -1,130 +0,0 @@ > -;-----------------------------------------------------------------------= --------;-; > Copyright (c) 2019, Intel Corporation. All rights reserved.
-; SPDX- > License-Identifier: BSD-2-Clause-Patent-;-; Module Name:-;-; > PeiCoreEntry.nasm-;-; Abstract:-;-; Find and call SecStartup-;-;-------= ---------- > ---------------------------------------------------------------SECTION .t= ext--extern > ASM_PFX(SecStartup)-extern ASM_PFX(PlatformInit)--global > ASM_PFX(CallPeiCoreEntryPoint)-ASM_PFX(CallPeiCoreEntryPoint):- ;- ; > Obtain the hob list pointer- ;- mov eax, [esp+4]- ;- ; Obtain the= stack > information- ; ECX: start of range- ; EDX: end of range- ;- mov = ecx, > [esp+8]- mov edx, [esp+0xC]-- ;- ; Platform init- ;- pushad- pu= sh edx- > push ecx- push eax- call ASM_PFX(PlatformInit)- pop eax- pop eax- = pop > eax- popad-- ;- ; Set stack top pointer- ;- mov esp, edx-- ;- = ; Push the > hob list pointer- ;- push eax-- ;- ; Save the value- ; ECX: sta= rt of range- ; > EDX: end of range- ;- mov ebp, esp- push ecx- push edx-- ;= - ; Push > processor count to stack first, then BIST status (AP then BSP)- ;- mov = eax, > 1- cpuid- shr ebx, 16- and ebx, 0xFF- cmp bl, 1- jae > PushProcessorCount-- ;- ; Some processors report 0 logical processors. > Effectively 0 =3D 1.- ; So we fix up the processor count- ;- inc e= bx-- > PushProcessorCount:- push ebx-- ;- ; We need to implement a long-te= rm > solution for BIST capture. For now, we just copy BSP BIST- ; for all pr= ocessor > threads- ;- xor ecx, ecx- mov cl, bl-PushBist:- movd eax, = mm0- push > eax- loop PushBist-- ; Save Time-Stamp Counter- movd eax, mm5- pus= h > eax-- movd eax, mm6- push eax-- ;- ; Pass entry point of the PEI core= - ;- > mov edi, 0xFFFFFFE0- push DWORD [edi]-- ;- ; Pass BFV into the = PEI > Core- ;- mov edi, 0xFFFFFFFC- push DWORD [edi]-- ;- ; Pass st= ack size > into the PEI Core- ;- mov ecx, [ebp - 4]- mov edx, [ebp - 8]- = push ecx > ; RamBase-- sub edx, ecx- push edx ; RamSize-- ;- ; Pass= Control into > the PEI Core- ;- call ASM_PFX(SecStartup)-diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/SecEntry.nasm > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/Ia32/SecEntry.nasm > deleted file mode 100644 > index 7f6d771e41..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/SecEntry.nasm > +++ /dev/null > @@ -1,361 +0,0 @@ > -;-----------------------------------------------------------------------= --------;-; > Copyright (c) 2019, Intel Corporation. All rights reserved.
-; SPDX- > License-Identifier: BSD-2-Clause-Patent-; Module Name:-;-; SecEntry.nasm= - > ;-; Abstract:-;-; This is the code that goes from real-mode to protected > mode.-; It consumes the reset vector, calls TempRamInit API from FSP > binary.-;-;--------------------------------------------------------------= ------------------ > #include "Fsp.h"--SECTION .text--extern ASM_PFX(CallPeiCoreEntryPoint)- > extern ASM_PFX(FsptUpdDataPtr)-extern > ASM_PFX(BoardBeforeTempRamInit)-; Pcds-extern ASM_PFX(PcdGet32 > (PcdFspTemporaryRamSize))-extern ASM_PFX(PcdGet32 > (PcdFsptBaseAddress))--;-------------------------------------------------= ------------- > ---------------;-; Procedure: _ModuleEntryPoint-;-; Input: None= -;-; > Output: None-;-; Destroys: Assume all registers-;-; Description= :-;-; > Transition to non-paged flat-model protected mode from a-; hard-coded > GDT that provides exactly two descriptors.-; This is a bare bones trans= ition > to protected mode only-; used for a while in PEI and possibly DXE.-;-; = After > enabling protected mode, a far jump is executed to-; transfer to PEI us= ing > the newly loaded GDT.-;-; Return: None-;-; MMX Usage:-; = MM0 =3D > BIST State-; MM5 =3D Save time-stamp counter value high32bit= -; > MM6 =3D Save time-stamp counter value low32bit.-;-;----------------------= --------- > -----------------------------------------------BITS 16-align 4-global > ASM_PFX(_ModuleEntryPoint)-ASM_PFX(_ModuleEntryPoint):- fninit > ; clear any pending Floating point exceptions- ;- ; Store the BIST valu= e in > mm0- ;- movd mm0, eax- cli-- ;- ; Check INIT# is asserted by port= 0xCF9- > ;- mov dx, 0CF9h- in al, dx- cmp al, 04h- jnz NotWarmStart--- ;- ;= @note > Issue warm reset, since if CPU only reset is issued not all MSRs are rest= ored > to their defaults- ;- mov dx, 0CF9h- mov al, 06h- out dx, al--NotWarm= Start:- > ;- ; Save time-stamp counter value- ; rdtsc load 64bit time-stamp count= er to > EDX:EAX- ;- rdtsc- movd mm5, edx- movd mm6, eax-- ;- ; Load t= he GDT > table in GdtDesc- ;- mov esi, GdtDesc- DB 66h- lgdt [cs:= si]-- ;- ; > Transition to 16 bit protected mode- ;- mov eax, cr0 = ; Get control > register 0- or eax, 00000003h ; Set PE bit (bit #0) & M= P bit (bit #1)- > mov cr0, eax ; Activate protected mode-- mov e= ax, cr4 > ; Get control register 4- or eax, 00000600h ; Set OSFXS= R bit (bit #9) & > OSXMMEXCPT bit (bit #10)- mov cr4, eax-- ;- ; Now we're in 16 bit > protected mode- ; Set up the selectors for 32 bit protected mode entry- = ;- > mov ax, SYS_DATA_SEL- mov ds, ax- mov es, ax- mov fs, = ax- mov > gs, ax- mov ss, ax-- ;- ; Transition to Flat 32 bit protected mode= - ; The > jump to a far pointer causes the transition to 32 bit mode- ;- mov esi, > ProtectedModeEntryLinearAddress- jmp dword far [cs:si]--;------------= ------ > -----------------------------------------------------------;-; Procedure: > ProtectedModeEntryPoint-;-; Input: None-;-; Output: None-;-; > Destroys: Assume all registers-;-; Description:-;-; This function han= dles:-; > Call two basic APIs from FSP binary-; Initializes stack with some early= data > (BIST, PEI entry, etc)-;-; Return: None-;-;------------------------= ----------------- > -------------------------------------BITS 32-align 4-ProtectedModeEntryPo= int:- ;- > ; Early board hooks- ;- mov esp, BoardBeforeTempRamInitRet- jmp > ASM_PFX(BoardBeforeTempRamInit)--BoardBeforeTempRamInitRet:-- ; > Find the fsp info header- mov edi, [ASM_PFX(PcdGet32 > (PcdFsptBaseAddress))]-- mov eax, dword [edi + > FVH_SIGINATURE_OFFSET]- cmp eax, FVH_SIGINATURE_VALID_VALUE- > jnz FspHeaderNotFound-- xor eax, eax- mov ax, word [edi + > FVH_EXTHEADER_OFFSET_OFFSET]- cmp ax, 0- jnz FspFvExtHeaderExist-- > xor eax, eax- mov ax, word [edi + FVH_HEADER_LENGTH_OFFSET] ; Bypass > Fv Header- add edi, eax- jmp FspCheckFfsHeader--FspFvExtHeaderExist:- > add edi, eax- mov eax, dword [edi + FVH_EXTHEADER_SIZE_OFFSET] ; > Bypass Ext Fv Header- add edi, eax-- ; Round up to 8 byte alignment- = mov > eax, edi- and al, 07h- jz FspCheckFfsHeader-- and edi, 0FFFFFFF8h= - add > edi, 08h--FspCheckFfsHeader:- ; Check the ffs guid- mov eax, dword [ed= i]- > cmp eax, FSP_HEADER_GUID_DWORD1- jnz FspHeaderNotFound-- mov > eax, dword [edi + 4]- cmp eax, FSP_HEADER_GUID_DWORD2- jnz > FspHeaderNotFound-- mov eax, dword [edi + 8]- cmp eax, > FSP_HEADER_GUID_DWORD3- jnz FspHeaderNotFound-- mov eax, dword > [edi + 0Ch]- cmp eax, FSP_HEADER_GUID_DWORD4- jnz > FspHeaderNotFound-- add edi, FFS_HEADER_SIZE_VALUE ; Bypass the > ffs header-- ; Check the section type as raw section- mov al, byte [ed= i + > SECTION_HEADER_TYPE_OFFSET]- cmp al, 019h- jnz FspHeaderNotFound-- > add edi, RAW_SECTION_HEADER_SIZE_VALUE ; Bypass the section header- > jmp FspHeaderFound--FspHeaderNotFound:- jmp $--FspHeaderFound:- ; > Get the fsp TempRamInit Api address- mov eax, dword [edi + > FSP_HEADER_IMAGEBASE_OFFSET]- add eax, dword [edi + > FSP_HEADER_TEMPRAMINIT_OFFSET]-- ; Setup the hardcode stack- mov > esp, TempRamInitStack-- ; Call the fsp TempRamInit Api- jmp eax-- > TempRamInitDone:- cmp eax, 8000000Eh ;Check if EFI_NOT_FOUND > returned. Error code for Microcode Update not found.- je CallSecFspInit > ;If microcode not found, don't hang, but continue.-- cmp eax, 0 = ;Check > if EFI_SUCCESS retuned.- jnz FspApiFailed-- ; ECX: start of range- ;= EDX: > end of range-CallSecFspInit:- sub edx, [ASM_PFX(PcdGet32 > (PcdFspTemporaryRamSize))] ; TemporaryRam for FSP- xor eax, eax- mo= v > esp, edx-- ; Align the stack at DWORD- add esp, 3- and esp, 0FFFFFF= FCh-- > push edx- push ecx- push eax ; zero - no hob list yet- call > ASM_PFX(CallPeiCoreEntryPoint)--FspApiFailed:- jmp $--align 10h- > TempRamInitStack:- DD TempRamInitDone- DD > ASM_PFX(FsptUpdDataPtr); TempRamInitParams--;-; ROM-based Global- > Descriptor Table for the Tiano PEI Phase-;-align 16-global > ASM_PFX(BootGdtTable)--;-; GDT[0]: 0x00: Null entry, never used.-;- > NULL_SEL EQU $ - GDT_BASE ; Selector [0]-GDT_BASE:- > ASM_PFX(BootGdtTable):- DD 0- DD = 0-;-; Linear data > segment descriptor-;-LINEAR_SEL EQU $ - GDT_BASE ; Selector [= 0x8]- > DW 0FFFFh ; limit 0xFFFFF- DW 0 = ; base 0- DB > 0- DB 092h ; present, ring 0, data, expand= -up, writable- DB > 0CFh ; page-granular, 32-bit- DB 0-;-; Lin= ear code segment > descriptor-;-LINEAR_CODE_SEL EQU $ - GDT_BASE ; Selector [0x10]- = DW > 0FFFFh ; limit 0xFFFFF- DW 0 = ; base 0- DB 0- > DB 09Bh ; present, ring 0, data, expand-up, n= ot-writable- DB > 0CFh ; page-granular, 32-bit- DB 0-;-; Sys= tem data segment > descriptor-;-SYS_DATA_SEL EQU $ - GDT_BASE ; Selector [0x18]- = DW > 0FFFFh ; limit 0xFFFFF- DW 0 = ; base 0- DB 0- > DB 093h ; present, ring 0, data, expand-up, n= ot-writable- DB > 0CFh ; page-granular, 32-bit- DB 0--;-; Sy= stem code segment > descriptor-;-SYS_CODE_SEL EQU $ - GDT_BASE ; Selector [0x20]- = DW > 0FFFFh ; limit 0xFFFFF- DW 0 = ; base 0- DB 0- > DB 09Ah ; present, ring 0, data, expand-up, w= ritable- DB 0CFh > ; page-granular, 32-bit- DB 0-;-; Spare segment descriptor-;- > SYS16_CODE_SEL EQU $ - GDT_BASE ; Selector [0x28]- DW 0FFFFh > ; limit 0xFFFFF- DW 0 ; base 0- DB = 0Eh ; > Changed from F000 to E000.- DB 09Bh ; pres= ent, ring 0, code, > expand-up, writable- DB 00h ; byte-granul= ar, 16-bit- DB 0-;-; > Spare segment descriptor-;-SYS16_DATA_SEL EQU $ - GDT_BASE ; > Selector [0x30]- DW 0FFFFh ; limit 0xFFFF- = DW 0 > ; base 0- DB 0- DB 093h ; present, rin= g 0, data, expand-up, > not-writable- DB 00h ; byte-granular, 16-= bit- DB 0--;-; Spare > segment descriptor-;-SPARE5_SEL EQU $ - GDT_BASE ; Selector [= 0x38]- > DW 0 ; limit 0- DW 0 = ; base 0- DB 0- DB 0 > ; present, ring 0, data, expand-up, writable- DB 0 = ; page- > granular, 32-bit- DB 0-GDT_SIZE EQU $ - GDT_BASE ; Size= , in bytes--;- > ; GDT Descriptor-;-GdtDesc: ; GDT descript= or- DW GDT_SIZE > - 1 ; GDT limit- DD GDT_BASE = ; GDT base address--- > ProtectedModeEntryLinearAddress:-ProtectedModeEntryLinear:- DD > ProtectedModeEntryPoint ; Offset of our 32 bit code- DW > LINEAR_CODE_SELdiff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/Stack.nasm > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/Ia32/Stack.nasm > deleted file mode 100644 > index 47db32d64c..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/Ia32/Stack.nasm > +++ /dev/null > @@ -1,72 +0,0 @@ > -;-----------------------------------------------------------------------= --------;-; > Copyright (c) 2019, Intel Corporation. All rights reserved.
-; SPDX- > License-Identifier: BSD-2-Clause-Patent-; Abstract:-;-; Switch the stac= k from > temporary memory to permanent memory.-;-;--------------------------------= ----- > ------------------------------------------- SECTION .text--;----------= ------------------ > ---------------------------------------------------; VOID-; EFIAPI-; SecS= witchStack (-; > UINT32 TemporaryMemoryBase,-; UINT32 PermanentMemoryBase-; );- > ;------------------------------------------------------------------------= -------global > ASM_PFX(SecSwitchStack)-ASM_PFX(SecSwitchStack):- ;- ; Save three > register: eax, ebx, ecx- ;- push eax- push ebx- push ecx- = push edx-- > ;- ; !!CAUTION!! this function address's is pushed into stack after- = ; > migration of whole temporary memory, so need save it to permanent- ; > memory at first!- ;-- mov ebx, [esp + 20] ; Save the fir= st parameter- > mov ecx, [esp + 24] ; Save the second parameter-- ;- ; S= ave this > function's return address into permanent memory at first.- ; Then, Fix= up > the esp point to permanent memory- ;- mov eax, esp- sub eax,= ebx- > add eax, ecx- mov edx, dword [esp] ; copy pushed register'= s value to > permanent memory- mov dword [eax], edx- mov edx, dword [esp + 4= ]- > mov dword [eax + 4], edx- mov edx, dword [esp + 8]- mov dword= [eax > + 8], edx- mov edx, dword [esp + 12]- mov dword [eax + 12], edx= - mov > edx, dword [esp + 16] ; Update this function's return address into > permanent memory- mov dword [eax + 16], edx- mov esp, eax > ; From now, esp is pointed to permanent memory-- ;- ; Fixup the ebp > point to permanent memory- ;- mov eax, ebp- sub eax, ebx- = add > eax, ecx- mov ebp, eax ; From now, ebp is pointed to = permanent > memory-- pop edx- pop ecx- pop ebx- pop eax- ret-d= iff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/PlatformInit.c > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/PlatformInit.c > deleted file mode 100644 > index ef89e3f310..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/PlatformInit.c > +++ /dev/null > @@ -1,47 +0,0 @@ > -/** @file- Provide platform init function.--Copyright (c) 2017, Intel > Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clau= se- > Patent--**/---#include -#include -#include > -#include -#include > --/**- Platform initialization.-- @param[i= n] > FspHobList HobList produced by FSP.- @param[in] StartOfRange Start of > temporary RAM.- @param[in] EndOfRange End of temporary RAM.-**/- > VOID-EFIAPI-PlatformInit (- IN VOID *FspHobList,- IN VO= ID > *StartOfRange,- IN VOID *EndOfRange- )-{- //- // Plat= form > initialization- // Enable Serial port here- //- if > (PcdGetBool(PcdSecSerialPortDebugEnable)) {- SerialPortInitialize ();-= }-- > DEBUG ((DEBUG_INFO, "PrintPeiCoreEntryPointParam in PlatformInit\n"));- > DEBUG ((DEBUG_INFO, "FspHobList - 0x%x\n", FspHobList));- DEBUG > ((DEBUG_INFO, "StartOfRange - 0x%x\n", StartOfRange));- DEBUG > ((DEBUG_INFO, "EndOfRange - 0x%x\n", EndOfRange));-- > BoardAfterTempRamInit ();-- TestPointTempMemoryFunction > (StartOfRange, EndOfRange);-}diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecFspWrapperPlatformSecLib.inf > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/SecFspWrapperPlatformSecLib.inf > deleted file mode 100644 > index c99dd5ecdd..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecFspWrapperPlatformSecLib.inf > +++ /dev/null > @@ -1,97 +0,0 @@ > -## @file-# Provide FSP wrapper platform sec related function.-#-# > Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
-#-= # > SPDX-License-Identifier: BSD-2-Clause-Patent-#-#-##-- > ########################################################## > ######################-#-# Defines Section - statements that will be > processed to create a Makefile.-#- > ########################################################## > ######################-[Defines]- INF_VERSION =3D > 0x00010005- BASE_NAME =3D SecFspWrapperPlatformSecL= ib- > FILE_GUID =3D 4E1C4F95-90EA-47de-9ACC-B8920189A1F5- > MODULE_TYPE =3D SEC- VERSION_STRING = =3D 1.0- > LIBRARY_CLASS =3D PlatformSecLib---#-# The following inf= ormation is > for reference only and not required by the build tools.-#-# > VALID_ARCHITECTURES =3D IA32 X64-#-- > ########################################################## > ######################-#-# Sources Section - list of files that are > required for the build to succeed.-#- > ########################################################## > ######################--[Sources]- FspWrapperPlatformSecLib.c- > SecRamInitData.c- SecPlatformInformation.c- SecGetPerformance.c- > SecTempRamDone.c- PlatformInit.c--[Sources.IA32]- Ia32/SecEntry.nasm- > Ia32/PeiCoreEntry.nasm- Ia32/Stack.nasm- Ia32/Fsp.h-- > ########################################################## > ######################-#-# Package Dependency Section - list of > Package files that are required for-# this m= odule.-#- > ########################################################## > ######################--[Packages]- MdePkg/MdePkg.dec- > MdeModulePkg/MdeModulePkg.dec- UefiCpuPkg/UefiCpuPkg.dec- > IntelFsp2Pkg/IntelFsp2Pkg.dec- > IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec- > MinPlatformPkg/MinPlatformPkg.dec- KabylakeSiliconPkg/SiPkg.dec-- > [LibraryClasses]- LocalApicLib- SerialPortLib- FspWrapperPlatformLib- > FspWrapperApiLib- BoardInitLib- SecBoardInitLib- TestPointCheckLib- > PeiServicesTablePointerLib--[Ppis]- gEfiSecPlatformInformationPpiGuid > ## CONSUMES- gPeiSecPerformancePpiGuid ## CONSUMES- > gTopOfTemporaryRamPpiGuid ## PRODUCES- > gEfiPeiFirmwareVolumeInfoPpiGuid ## PRODUCES- > gFspTempRamExitPpiGuid ## CONSUMES--[Pcd]- > gUefiCpuPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize ## > CONSUMES- gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress > ## CONSUMES- gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize > ## CONSUMES- > gMinPlatformPkgTokenSpaceGuid.PcdSecSerialPortDebugEnable ## > CONSUMES--[FixedPcd]- > gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress ## > CONSUMES- > gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize ## > CONSUMES- gIntelFsp2WrapperTokenSpaceGuid.PcdFlashMicrocodeOffset > ## CONSUMES- > gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheAddress ## > CONSUMES- gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheSize > ## CONSUMES- gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress > ## CONSUMES- gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection > ## CONSUMESdiff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecGetPerformance.c > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/SecGetPerformance.c > deleted file mode 100644 > index c4eeb2b188..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecGetPerformance.c > +++ /dev/null > @@ -1,89 +0,0 @@ > -/** @file- Sample to provide SecGetPerformance function.--Copyright (c) > 2017, Intel Corporation. All rights reserved.
-SPDX-License-Identifier= : > BSD-2-Clause-Patent--**/--#include --#include > -#include --#include > -#include -#include > --/**- This interface conveys performance informatio= n > out of the Security (SEC) phase into PEI.-- This service is published by= the SEC > phase. The SEC phase handoff has an optional- EFI_PEI_PPI_DESCRIPTOR lis= t > as its final argument when control is passed from SEC into the- PEI > Foundation. As such, if the platform supports collecting performance data= in > SEC,- this information is encapsulated into the data structure abstracte= d by > this service.- This information is collected for the boot-strap processo= r (BSP) > on IA-32.-- @param[in] PeiServices The pointer to the PEI Services Tab= le.- > @param[in] This The pointer to this instance of the > PEI_SEC_PERFORMANCE_PPI.- @param[out] Performance The pointer to > performance data collected in SEC phase.-- @retval EFI_SUCCESS The data > was successfully returned.--**/-EFI_STATUS-EFIAPI-SecGetPerformance (- > IN CONST EFI_PEI_SERVICES **PeiServices,- IN > PEI_SEC_PERFORMANCE_PPI *This,- OUT > FIRMWARE_SEC_PERFORMANCE *Performance- )-{- UINT32 Size;- > UINT32 Count;- UINT32 TopOfTemporaryRam;- UINT64 Ticker;= - > VOID *TopOfTemporaryRamPpi;- EFI_STATUS Status;-- DEBUG > ((DEBUG_INFO, "SecGetPerformance\n"));-- Status =3D (*PeiServices)- > >LocatePpi (- PeiServices,- > &gTopOfTemporaryRamPpiGuid,- 0,- = NULL,- > (VOID **) &TopOfTemporaryRamPpi- );- if (EFI= _ERROR > (Status)) {- return EFI_NOT_FOUND;- }- //- // |--------------| <- > TopOfTemporaryRam - BL- // | List Ptr |- // |--------------|- // |= BL RAM > Start |- // |--------------|- // | BL RAM End |- // |--------------|= - // |Number > of BSPs|- // |--------------|- // | BIST |- // |--------------= |- // | .... |- > // |--------------|- // | TSC[63:32] |- // |--------------|- // | T= SC[31:00] |- // > |--------------|- //- TopOfTemporaryRam =3D > (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof(UINT32);- > TopOfTemporaryRam -=3D sizeof(UINT32) * 2;- Count =3D *(UINT= 32 *) > (UINTN) (TopOfTemporaryRam - sizeof (UINT32));- Size =3D Co= unt * > sizeof (UINT32);-- Ticker =3D *(UINT64 *) (UINTN) (TopOfTemporaryRam - > sizeof (UINT32) - Size - sizeof (UINT32) * 2);- Performance->ResetEnd = =3D > GetTimeInNanoSecond (Ticker);-- return EFI_SUCCESS;-}diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecPlatformInformation.c > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/SecPlatformInformation.c > deleted file mode 100644 > index 5b94ed2bef..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecPlatformInformation.c > +++ /dev/null > @@ -1,78 +0,0 @@ > -/** @file- Provide SecPlatformInformation function.--Copyright (c) 2017= , > Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-= 2- > Clause-Patent--**/--#include --#include > -#include -- > #include -#include --/**- > This interface conveys state information out of the Security (SEC) phase = into > PEI.-- @param[in] PeiServices Pointer to the PEI Servi= ces Table.- > @param[in,out] StructureSize Pointer to the variable describi= ng size of > the input buffer.- @param[out] PlatformInformationRecord Pointer to t= he > EFI_SEC_PLATFORM_INFORMATION_RECORD.-- @retval EFI_SUCCESS > The data was successfully returned.- @retval EFI_BUFFER_TOO_SMALL The > buffer was too small.--**/-EFI_STATUS-EFIAPI-SecPlatformInformation (- I= N > CONST EFI_PEI_SERVICES **PeiServices,- IN OUT UINT= 64 > *StructureSize,- OUT EFI_SEC_PLATFORM_INFORMATION_RECORD > *PlatformInformationRecord- )-{- UINT32 *Bist;- UINT32 Size;= - UINT32 > Count;- UINT32 TopOfTemporaryRam;- VOID > *TopOfTemporaryRamPpi;- EFI_STATUS Status;-- DEBUG ((DEBUG_INFO, > "SecPlatformInformation\n"));-- Status =3D (*PeiServices)->LocatePpi (- > PeiServices,- &gTopOfTemporaryRamPpiGuid,- > 0,- NULL,- (VOID = **) &TopOfTemporaryRamPpi- > );- if (EFI_ERROR (Status)) {- return EFI_NOT_FOUND;- }-- //- // T= he > entries of BIST information, together with the number of them,- // resid= e in > the bottom of stack, left untouched by normal stack operation.- // This > routine copies the BIST information to the buffer pointed by- // > PlatformInformationRecord for output.- //- TopOfTemporaryRam =3D > (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof (UINT32);- > TopOfTemporaryRam -=3D sizeof(UINT32) * 2;- Count =3D *((UIN= T32 > *)(UINTN) (TopOfTemporaryRam - sizeof (UINT32)));- Size =3D= Count * > sizeof (IA32_HANDOFF_STATUS);-- if ((*StructureSize) < (UINT64) Size) {- > *StructureSize =3D Size;- return EFI_BUFFER_TOO_SMALL;- }-- > *StructureSize =3D Size;- Bist =3D (UINT32 *) (TopOfTemporar= yRam - sizeof > (UINT32) - Size);-- CopyMem (PlatformInformationRecord, Bist, Size);-- > return EFI_SUCCESS;-}diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecRamInitData.c > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/SecRamInitData.c > deleted file mode 100644 > index b356327b4c..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecRamInitData.c > +++ /dev/null > @@ -1,36 +0,0 @@ > -/** @file- Provide TempRamInitParams data.--Copyright (c) 2017, Intel > Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clau= se- > Patent--**/--#include -#include -#include > "FsptCoreUpd.h"--typedef struct {- FSP_UPD_HEADER FspUpdHeader;- > FSPT_CORE_UPD FsptCoreUpd;-} FSPT_UPD_CORE_DATA;-- > GLOBAL_REMOVE_IF_UNREFERENCED CONST FSPT_UPD_CORE_DATA > FsptUpdDataPtr =3D {- {- 0x4450555F54505346,- 0x00,- { 0x00, 0x= 00, 0x00, > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,- 0x00, 0x00, 0x00, 0x00, 0= x00, > 0x00, 0x00- }- },- {- ((UINT32)FixedPcdGet64 > (PcdCpuMicrocodePatchAddress) + FixedPcdGet32 > (PcdFlashMicrocodeOffset)),- ((UINT32)FixedPcdGet64 > (PcdCpuMicrocodePatchRegionSize) - FixedPcdGet32 > (PcdFlashMicrocodeOffset)),- 0, // Set CodeRegionBase as 0, s= o that > caching will be 4GB-(CodeRegionSize > LLCSize ? LLCSize : CodeRegionSize) > will be used.- FixedPcdGet32 (PcdFlashCodeCacheSize),- { 0x00, 0x00= , > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,- 0x00, 0x00, 0x00, 0= x00, > 0x00, 0x00- }- }-};-diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecTempRamDone.c > b/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrap > perPlatformSecLib/SecTempRamDone.c > deleted file mode 100644 > index 922e4ec204..0000000000 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecTempRamDone.c > +++ /dev/null > @@ -1,73 +0,0 @@ > -/** @file- Provide SecTemporaryRamDone function.--Copyright (c) 2017 - > 2019, Intel Corporation. All rights reserved.
-SPDX-License-Identifier= : > BSD-2-Clause-Patent--**/--#include --#include > -#include --#include > -#include -#include > -#include -#include > -#include > -#include -#include > --/**-This interface disables > temporary memory in SEC Phase.-**/-VOID-EFIAPI- > SecPlatformDisableTemporaryMemory (- VOID- )-{- EFI_STATUS > Status;- VOID *TempRamExitParam;- CONST EFI_PEI_SE= RVICES > **PeiServices;- FSP_TEMP_RAM_EXIT_PPI *TempRamExitPpi;-- DEBUG > ((DEBUG_INFO, "SecPlatformDisableTemporaryMemory enter\n"));-- Status > =3D BoardInitBeforeTempRamExit ();- ASSERT_EFI_ERROR (Status);-- if > (PcdGet8 (PcdFspModeSelection) =3D=3D 1) {- //- // FSP API mode- = //- > TempRamExitParam =3D UpdateTempRamExitParam ();- Status =3D > CallTempRamExit (TempRamExitParam);- DEBUG ((DEBUG_INFO, > "TempRamExit status: 0x%x\n", Status));- ASSERT_EFI_ERROR (Status);- = } > else {- //- // FSP Dispatch mode- //- PeiServices =3D > GetPeiServicesTablePointer ();- Status =3D (*PeiServices)->LocatePpi (= - > PeiServices,- &gFspTempRamExitPpiGuid,- = 0,- > NULL,- (VOID **) &TempRamExitPpi- = );- > ASSERT_EFI_ERROR (Status);- if (EFI_ERROR (Status)) {- return;- = }- > TempRamExitPpi->TempRamExit (NULL);- }-- Status =3D > BoardInitAfterTempRamExit ();- ASSERT_EFI_ERROR (Status);-- return ;-}d= iff > --git > a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > index 2bc2b4126b..acdc31e708 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > @@ -126,7 +126,7 @@ > ####################################### > GpioExpanderLib|$(PLATFORM_BOARD_PACKAGE)/Library/BaseGpioExpan > derLib/BaseGpioExpanderLib.inf > I2cAccessLib|$(PLATFORM_BOARD_PACKAGE)/Library/PeiI2cAccessLib/PeiI2 > cAccessLib.inf- > PlatformSecLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/SecFs > pWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf+ > PlatformSecLib|$(PLATFORM_PACKAGE)/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecFspWrapperPlatformSecLib.inf # Thunderbolt !if > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdTbtEnable =3D=3D TRUEdiff --git > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > index 77e4a6a610..4b07c0a684 100644 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > @@ -166,7 +166,7 @@ > EcLib|$(PLATFORM_BOARD_PACKAGE)/Library/BaseEcLib/BaseEcLib.inf > GpioExpanderLib|$(PLATFORM_BOARD_PACKAGE)/Library/BaseGpioExpan > derLib/BaseGpioExpanderLib.inf > I2cAccessLib|$(PLATFORM_BOARD_PACKAGE)/Library/PeiI2cAccessLib/PeiI2 > cAccessLib.inf- > PlatformSecLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/SecFs > pWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf+ > PlatformSecLib|$(PLATFORM_PACKAGE)/FspWrapper/Library/SecFspWrapp > erPlatformSecLib/SecFspWrapperPlatformSecLib.inf # Thunderbolt !if > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdTbtEnable =3D=3D TRUE-- > 2.24.0.windows.2