From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.471.1588215457962842330 for ; Wed, 29 Apr 2020 19:57:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=tyz2jZNs; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: chasel.chiu@intel.com) IronPort-SDR: e6Y159DMp8kBGww/b5JPER+50mg4pRytTD0vFW7SVWgWPicYy3oW+j4z3m+WR82U/3r2PsK98H wYqjnGYIQ0tQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 19:57:37 -0700 IronPort-SDR: HrJN23C2EGgKJ34vIS//Y9DTjmzWZV+oUdSP3VMS6DF2dAaRhRYKoaTYUpKkSqEjEkP4WHER3L QxfqWyuLlkxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,333,1583222400"; d="scan'208";a="258155504" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 29 Apr 2020 19:57:36 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 19:57:36 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 19:57:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfCcaorM86RaASwMIHNq1/1BPKXbf0o7IzldzjVLOrUheYCiH1dMgBZEXcD9X/pM6/H+0EqJECsCJME0cuMFZ8LL6BC4PulfG0ufURv5D84K+3Ub/jjLZCWO8mctyToZnMmu9xy+xGVxZBiuNBZFLsgVNHPa7UGJs5DRJpn06hqCNfs0FIWEAxI+J2l1NSNe1QZHBm5h5QtWiFTSKx/c2/BN6hRegTNjBYg26XxAAh0UkI2LwlE9Kr5ENri50633hBa7gQDgj8meUb0wMKw5V8UK/sCiL8sp0Wp40NCbaZ+s4qlTbEd1PlMR5J3fApWvEkaTmmFHeGK4x21Pzop3Yw== 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=DtnPCG0dGSO/pJS/78Q/82y6+3qXAqO4enhtYL5LEQk=; b=aZ6Wd4xmUge2kmiWFNDVUW0BlnrYQAqvukijSvyZcUUdlBogZnZDXb3bBU5wHuVqsO/mR+S74OWzH02zzSBPmtRuKf9eERmPgQ2rP7rdDvab15Ys+aDwTFi8UetsG9cmp1dCvIPrSHESwajcIBzb8bBn3UAjPvv8uwJyvW45kWOkkCLwzMfwHulwNbCKcBWs+F60ZZ7ScZolrmypmDkRrNDC01grPWByjuBXS2tGaIQqOmLSxPDFyc4raB7uA9XpqfA3N2wOchnyX80PwFFs8a5SGZ46ZMOvEjyRh93jt+YrMxYnzDmZazE81r1zwKsEeG2jdP1Qh1dk11+14OpfTw== 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=DtnPCG0dGSO/pJS/78Q/82y6+3qXAqO4enhtYL5LEQk=; b=tyz2jZNsI06rUwKceaC3qcRyJHeVWjnUUhNxwZQnb9zgVxGY9bj+jeC+BMLp5mbS/i90IRMd6ThXSVip72Hf1AUnHGo+HCRK4VHTLpg6jhAImywDnzD4iNm05pB4Smk81VAizk0mlHPk6GhmWGo+YKk6DNvHksLvBOTmddo3kuc= Received: from SN6PR11MB2814.namprd11.prod.outlook.com (2603:10b6:805:55::15) by SN6PR11MB3053.namprd11.prod.outlook.com (2603:10b6:805:d9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Thu, 30 Apr 2020 02:56:50 +0000 Received: from SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::152f:df2:6370:1584]) by SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::152f:df2:6370:1584%4]) with mapi id 15.20.2937.023; Thu, 30 Apr 2020 02:56:50 +0000 From: "Chiu, Chasel" To: "Shindo, Miki" , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" , "Desimone, Nathaniel L" , "Agyeman, Prince" , "Ni, Ray" Subject: Re: [edk2-platforms:PATCH v4 4/7] MinPlatformPkg/DxeAslUpdateLib: Cleans up APIs Thread-Topic: [edk2-platforms:PATCH v4 4/7] MinPlatformPkg/DxeAslUpdateLib: Cleans up APIs Thread-Index: AQHWHc5+9i5iYhRHb0uk4iR3ZQF7p6iQ+lfg Date: Thu, 30 Apr 2020 02:56:50 +0000 Message-ID: References: <20200429023203.37544-1-miki.shindo@intel.com> <20200429023203.37544-5-miki.shindo@intel.com> In-Reply-To: <20200429023203.37544-5-miki.shindo@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.193] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6459552f-7054-4d3d-1cc1-08d7ecb22194 x-ms-traffictypediagnostic: SN6PR11MB3053: 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:1332; x-forefront-prvs: 0389EDA07F x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2814.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(39860400002)(346002)(136003)(396003)(366004)(376002)(478600001)(26005)(5660300002)(33656002)(186003)(107886003)(71200400001)(8676002)(6506007)(76116006)(966005)(2906002)(54906003)(66946007)(55016002)(53546011)(316002)(110136005)(66476007)(66556008)(8936002)(9686003)(66446008)(86362001)(64756008)(52536014)(7696005)(30864003)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kKrNw44sWk/MHsuRGMUcvQeSRFFkGUjgtWCO8O75YDY9Iq2mZSzAN/QXLXJuG16wRxn4DmSPzsYemRRBrXS6Jf1ZNeZ7yVNfZ+Hsj9hE8QSDGoLLz/XgO3oG+yHuNuIeWSzr8DamTQOad98mSw7w0+vtfZfw5cONE0JWTay7BXKTvaQs0dBVIMYjI5crREILTQhs+EAj33Y4vCg3MfP9VsJuIlGlHiM6EjNDzIPQQChyu14FxXQmJfKR/igHkTYXIBnuo3qR1aZyVi/tdFp0D5aN6BGIGTOKk8mYnCK5JTLkVhOcCDYPquL7WooeaaJoA4CYWA+QRbNCX6mDrAkrraVwZykTouc4Lk1V8a84oLV/N05vXUtwm/2su7cerLNPY1CdAJA/zIoWyYDk/on/nsX04lHCZulGkeeZsQCy1PDXn5T51boN/QehNGyxdEKxLFVJ7zoARdc2WiDCm97mqSb363ZyRSrbBZhVmttln9ET3BuuxLmaNZbeuyxWM2diCkku3YFlZwToJ8JEbCaKzw== x-ms-exchange-antispam-messagedata: nhMhQlvnbmNX5snIlANFKSfwcSrNfv2CxvltCiTag32mFMlZ7+TKiU+a4wSSSZqTq4azxftjsoSL2pdLwgD6qcHElWpuV/FQKHJzes7coisZXUb8IdS5DzTG01e9HDf6akl77iIetwVYb2VSpvf4ncwOu+iUz6TApR/mOC5X0TzvGxpprRZb2rfml8p6rhhuM7WRO44CiF445Y9ipUN2tKcLD+INaXnSFXq4/FqnJxDzgURGV43GrHBlL6eqDOsNV75+/2/9hI4RU1O1TointI3qHHcup8vQQ+IdQSOOyuKYFNqvdh4iVEZhyOd0zxPK2OADjz/Mxzntbe1HGiYxiV8z4Vv6mQGWemJD+gzcfV7WSSKMJw4t0NMfdF8v0gjAFhsOWOJRdBYQgSzWNWbkfkOvuHJx0izrNToM6xH47wk1WJlqY+BWSCQy1Od77+Mn1SkYmyrnzcJwvuPjRU0RXSnP5CiNglWVNDokrl6yNHKfD4gkKIG2wtKXfN/DOk/cKSvdlhKG3Ztkjy070L3T1aJFxTayKs9sWp9yMWeJUriFfTedCKQyqt2IGu0oYjzDKiV9/vN6XYS4GNJ1uOHCFmnn9zIygZOTeb2ReY2HinZYXenrZEGVgNrvuigqPe2h76BsAxlDiIiBjs0PAjlois/aNZv3mFLTXqmmLc6KYBeVKHuraH4ZeazDg5HipX93YZEpH+ZoKz5ir+01yH4hDpUuIXm/OhlgD87QWaI4ORB4gqFvrdgDkAYcsgb4t6eu4r9vW1rpS+elVavr/aC+ki7fkTeEOd/8aK5D0iojZOLFGxvNIc4m4fw92BXX1NBX MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6459552f-7054-4d3d-1cc1-08d7ecb22194 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 02:56:50.6523 (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: BHU8UA6LI3e4wvbEc9FSugXVXWxzztFKTZrOseWZKR/Hv/z98UMhh7vnQRUQI1E++L/GCH+22E+EBE8cbF6UOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3053 Return-Path: chasel.chiu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chasel Chiu > -----Original Message----- > From: Shindo, Miki > Sent: Wednesday, April 29, 2020 10:32 AM > To: devel@edk2.groups.io > Cc: Chaganty, Rangasai V ; Chiu, Chasel > ; Desimone, Nathaniel L > ; Agyeman, Prince > ; Ni, Ray > Subject: [edk2-platforms:PATCH v4 4/7] MinPlatformPkg/DxeAslUpdateLib: > Cleans up APIs >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2536 >=20 > Callers of DxeAslUpdateLib don't have to call InitializeAslUpdateLib() bu= t the > library itself runs it internally. This commit makes it an internal call. > LocateAcpiTableByOemTableId() is unreferenced externally so this commit > makes it an internal call. > PSS_PACKAGE_LAYOUT and AML_RESRC_TEMP_END_TAG are both > unreferenced so they are removed. > AslUpdateLib.h is cleaned up accordingly. >=20 > Signed-off-by: Miki Shindo > Cc: Sai Chaganty > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Prince Agyeman > Cc: Ray Ni > --- >=20 > Platform/Intel/MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdate > Lib.c | 209 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++------------------------------= ----- > ------------------------------------------------------------------- > Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h > | 131 > ++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------- > ----------------------------------------------------------- > 2 files changed, 159 insertions(+), 181 deletions(-) >=20 > diff --git > a/Platform/Intel/MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpda > teLib.c > b/Platform/Intel/MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpda > teLib.c > index e6ab43db6d..1ba51a7c55 100644 > --- > a/Platform/Intel/MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpda > teLib.c > +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslU > +++ pdateLib.c > @@ -6,7 +6,7 @@ >=20 > This library uses the ACPI Support protocol. >=20 > -Copyright (c) 2017, Intel Corporation. All rights reserved.
> +Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -50,6 +50,62 @@ InitializeAslUpdateLib ( > return Status; > } >=20 > +/** > + This function uses the ACPI SDT protocol to locate an ACPI SSDT table. > + > + @param[in] TableId - Pointer to an ASCII string containing > the OEM Table ID from the ACPI table header > + @param[in] TableIdSize - Length of the TableId to match. Table > ID are 8 bytes long, this function > + will consider it a match if the first > TableIdSize bytes match > + @param[in, out] Table - Updated with a pointer to the table > + @param[in, out] Handle - AcpiSupport protocol table handle for > the table found > + > + @retval EFI_SUCCESS - The function completed successfully. > + @retval EFI_NOT_FOUND - Failed to locate AcpiTable. > + @retval EFI_NOT_READY - Not ready to locate AcpiTable. > +**/ > +EFI_STATUS > +LocateAcpiTableByOemTableId ( > + IN UINT8 *TableId, > + IN UINT8 TableIdSize, > + IN OUT EFI_ACPI_DESCRIPTION_HEADER **Table, > + IN OUT UINTN *Handle > + ) > +{ > + EFI_STATUS Status; > + INTN Index; > + EFI_ACPI_TABLE_VERSION Version; > + EFI_ACPI_DESCRIPTION_HEADER *OrgTable; > + > + if (mAcpiSdt =3D=3D NULL) { > + InitializeAslUpdateLib (); > + if (mAcpiSdt =3D=3D NULL) { > + return EFI_NOT_READY; > + } > + } > + /// > + /// Locate table with matching ID > + /// > + Version =3D 0; > + Index =3D 0; > + do { > + Status =3D mAcpiSdt->GetAcpiTable (Index, (EFI_ACPI_SDT_HEADER > **)&OrgTable, &Version, Handle); > + if (Status =3D=3D EFI_NOT_FOUND) { > + break; > + } > + ASSERT_EFI_ERROR (Status); > + Index++; > + } while (CompareMem (&(OrgTable->OemTableId), TableId, TableIdSize)); > + > + if (Status !=3D EFI_NOT_FOUND) { > + *Table =3D AllocateCopyPool (OrgTable->Length, OrgTable); > + ASSERT (*Table); > + } > + > + /// > + /// If we found the table, there will be no error. > + /// > + return Status; > +} >=20 > /** > This procedure will update immediate value assigned to a Name @@ > -59,8 +115,11 @@ InitializeAslUpdateLib ( > @param[in] Length - length of data to be overwritten >=20 > @retval EFI_SUCCESS - The function completed successfully. > + @retval EFI_NOT_FOUND - Failed to locate AcpiTable. > + @retval EFI_NOT_READY - Not ready to locate AcpiTable. > **/ > EFI_STATUS > +EFIAPI > UpdateNameAslCode ( > IN UINT32 AslSignature, > IN VOID *Buffer, > @@ -149,6 +208,50 @@ UpdateNameAslCode ( > return EFI_NOT_FOUND; > } >=20 > +/** > + This procedure will update the name of ASL Method > + > + @param[in] TableId - Pointer to an ASCII string containing > the OEM Table ID from the ACPI table header > + @param[in] TableIdSize - Length of the TableId to match. Table > ID are 8 bytes long, this function > + will consider it a match if the first > TableIdSize bytes match > + @param[in] AslSignature - The signature of Operation Region that > we want to update. > + @param[in] Buffer - source of data to be written over > original aml > + @param[in] Length - length of data to be overwritten > + > + @retval EFI_UNSUPPORTED - The function is not supported in this > library. > +**/ > +EFI_STATUS > +EFIAPI > +UpdateSsdtNameAslCode ( > + IN UINT8 *TableId, > + IN UINT8 TableIdSize, > + IN UINT32 AslSignature, > + IN VOID *Buffer, > + IN UINTN Length > + ) > +{ > + return EFI_UNSUPPORTED; > +} > + > +/** > + This procedure will update the name of ASL Method > + > + @param[in] AslSignature - The signature of Operation Region that > we want to update. > + @param[in] Buffer - source of data to be written over > original aml > + @param[in] Length - length of data to be overwritten > + > + @retval EFI_UNSUPPORTED - The function is not supported in this > library. > +**/ > +EFI_STATUS > +EFIAPI > +UpdateMethodAslCode ( > + IN UINT32 AslSignature, > + IN VOID *Buffer, > + IN UINTN Length > + ) > +{ > + return EFI_UNSUPPORTED; > +} >=20 > /** > This function uses the ACPI SDT protocol to locate an ACPI table. > @@ -161,8 +264,11 @@ UpdateNameAslCode ( > @param[in, out] Version - The version of the table desired >=20 > @retval EFI_SUCCESS - The function completed > successfully. > + @retval EFI_NOT_FOUND - Failed to locate AcpiTable. > + @retval EFI_NOT_READY - Not ready to locate AcpiTable. > **/ > EFI_STATUS > +EFIAPI > LocateAcpiTableBySignature ( > IN UINT32 Signature, > IN OUT EFI_ACPI_DESCRIPTION_HEADER **Table, > @@ -205,104 +311,3 @@ LocateAcpiTableBySignature ( > /// > return Status; > } > - > -/** > - This function uses the ACPI SDT protocol to locate an ACPI SSDT table. > - > - @param[in] TableId - Pointer to an ASCII string containing > the OEM Table ID from the ACPI table header > - @param[in] TableIdSize - Length of the TableId to match. Table > ID are 8 bytes long, this function > - will consider it a match if the first > TableIdSize bytes match > - @param[in, out] Table - Updated with a pointer to the table > - @param[in, out] Handle - AcpiSupport protocol table handle for > the table found > - @param[in, out] Version - See AcpiSupport protocol, GetAcpiTable > function for use > - > - @retval EFI_SUCCESS - The function completed successfully. > -**/ > -EFI_STATUS > -LocateAcpiTableByOemTableId ( > - IN UINT8 *TableId, > - IN UINT8 TableIdSize, > - IN OUT EFI_ACPI_DESCRIPTION_HEADER **Table, > - IN OUT UINTN *Handle > - ) > -{ > - EFI_STATUS Status; > - INTN Index; > - EFI_ACPI_TABLE_VERSION Version; > - EFI_ACPI_DESCRIPTION_HEADER *OrgTable; > - > - if (mAcpiSdt =3D=3D NULL) { > - InitializeAslUpdateLib (); > - if (mAcpiSdt =3D=3D NULL) { > - return EFI_NOT_READY; > - } > - } > - /// > - /// Locate table with matching ID > - /// > - Version =3D 0; > - Index =3D 0; > - do { > - Status =3D mAcpiSdt->GetAcpiTable (Index, (EFI_ACPI_SDT_HEADER > **)&OrgTable, &Version, Handle); > - if (Status =3D=3D EFI_NOT_FOUND) { > - break; > - } > - ASSERT_EFI_ERROR (Status); > - Index++; > - } while (CompareMem (&(OrgTable->OemTableId), TableId, TableIdSize)); > - > - if (Status !=3D EFI_NOT_FOUND) { > - *Table =3D AllocateCopyPool (OrgTable->Length, OrgTable); > - ASSERT (*Table); > - } > - > - /// > - /// If we found the table, there will be no error. > - /// > - return Status; > -} > - > -/** > - This function calculates and updates an UINT8 checksum. > - > - @param[in] Buffer Pointer to buffer to checksum > - @param[in] Size Number of bytes to checksum > - @param[in] ChecksumOffset Offset to place the checksum result in > - > - @retval EFI_SUCCESS The function completed successfully. > -**/ > -EFI_STATUS > -AcpiChecksum ( > - IN VOID *Buffer, > - IN UINTN Size, > - IN UINTN ChecksumOffset > - ) > -{ > - UINT8 Sum; > - UINT8 *Ptr; > - > - Sum =3D 0; > - /// > - /// Initialize pointer > - /// > - Ptr =3D Buffer; > - > - /// > - /// set checksum to 0 first > - /// > - Ptr[ChecksumOffset] =3D 0; > - > - /// > - /// add all content of buffer > - /// > - while (Size--) { > - Sum =3D (UINT8) (Sum + (*Ptr++)); > - } > - /// > - /// set checksum > - /// > - Ptr =3D Buffer; > - Ptr[ChecksumOffset] =3D (UINT8) (0xff - Sum + 1); > - > - return EFI_SUCCESS; > -} > diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h > b/Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h > index d58b6d6458..0be8df6469 100644 > --- a/Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h > +++ b/Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h > @@ -5,7 +5,7 @@ > Make sure you meet the requirements for the library (protocol > dependencies, use > restrictions, etc). >=20 > -Copyright (c) 2017, Intel Corporation. All rights reserved.
> +Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -16,61 +16,70 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // > Include files // > +#include > #include > #include > #include >=20 > -// > -// AML parsing definitions > -// > -#define AML_RESRC_TEMP_END_TAG 0x0079 > - > -// > -// ASL PSS package structure layout > -// > -#pragma pack (1) > -typedef struct { > - UINT8 NameOp; // 12h ;First opcode is a NameOp. > - UINT8 PackageLead; // 20h ;First opcode is a NameOp. > - UINT8 NumEntries; // 06h ;First opcode is a NameOp. > - UINT8 DwordPrefix1; // 0Ch > - UINT32 CoreFrequency; // 00h > - UINT8 DwordPrefix2; // 0Ch > - UINT32 Power; // 00h > - UINT8 DwordPrefix3; // 0Ch > - UINT32 TransLatency; // 00h > - UINT8 DwordPrefix4; // 0Ch > - UINT32 BmLatency; // 00h > - UINT8 DwordPrefix5; // 0Ch > - UINT32 Control; // 00h > - UINT8 DwordPrefix6; // 0Ch > - UINT32 Status; // 00h > -} PSS_PACKAGE_LAYOUT; > -#pragma pack() > - > /** > - Initialize the ASL update library state. > - This must be called prior to invoking other library functions. > + This procedure will update immediate value assigned to a Name >=20 > + @param[in] AslSignature The signature of Operation > Region that we want to update. > + @param[in] Buffer source of data to be written > over original aml > + @param[in] Length length of data to be > overwritten >=20 > @retval EFI_SUCCESS The function completed > successfully. > + @retval EFI_NOT_FOUND Failed to locate AcpiTable. > + @retval EFI_NOT_READY Not ready to locate > AcpiTable. > + @retval EFI_UNSUPPORTED The function is not > supported in this library > **/ > EFI_STATUS > -InitializeAslUpdateLib ( > - VOID > +EFIAPI > +UpdateNameAslCode( > + IN UINT32 AslSignature, > + IN VOID *Buffer, > + IN UINTN Length > ); >=20 > /** > - This procedure will update immediate value assigned to a Name > + This procedure will update the name of ASL Method > + > + @param[in] TableId - Pointer to an ASCII string containing > the OEM Table ID from the ACPI table header > + @param[in] TableIdSize - Length of the TableId to match. Table > ID are 8 bytes long, this function > + @param[in] AslSignature - The signature of Operation Region that > we want to update. > + @param[in] Buffer - source of data to be written over > original aml > + @param[in] Length - length of data to be overwritten > + > + @retval EFI_SUCCESS - The function completed successfully. > + @retval EFI_NOT_FOUND - Failed to locate AcpiTable. > + @retval EFI_NOT_READY - Not ready to locate AcpiTable. > + @retval EFI_UNSUPPORTED - The function is not supported in this > library > +**/ > +EFI_STATUS > +EFIAPI > +UpdateSsdtNameAslCode ( > + IN UINT8 *TableId, > + IN UINT8 TableIdSize, > + IN UINT32 AslSignature, > + IN VOID *Buffer, > + IN UINTN Length > + ); >=20 > - @param[in] AslSignature The signature of Operation > Region that we want to update. > - @param[in] Buffer source of data to be written > over original aml > - @param[in] Length length of data to be > overwritten > +/** > + This procedure will update the name of ASL Method >=20 > - @retval EFI_SUCCESS The function completed > successfully. > + @param[in] AslSignature - The signature of Operation Region that > we want to update. > + @param[in] Buffer - source of data to be written over > original aml > + @param[in] Length - length of data to be overwritten > + > + @retval EFI_SUCCESS - The function completed successfully. > + @retval EFI_NOT_FOUND - Failed to locate AcpiTable. > + @retval EFI_NOT_READY - Not ready to locate AcpiTable. > + @retval EFI_UNSUPPORTED - The function is not supported in this > library > **/ > EFI_STATUS > -UpdateNameAslCode( > +EFIAPI > +UpdateMethodAslCode ( > IN UINT32 AslSignature, > IN VOID *Buffer, > IN UINTN Length > @@ -86,55 +95,19 @@ UpdateNameAslCode( > @param[in] Signature Pointer to an ASCII string > containing the Signature to match > @param[in, out] Table Updated with a pointer to the > table > @param[in, out] Handle AcpiSupport protocol table > handle for the table found > - @param[in, out] Version On input, the version of the > table desired, > - on output, the versions the > table belongs to > @see AcpiSupport protocol > for details >=20 > @retval EFI_SUCCESS The function completed > successfully. > + @retval EFI_NOT_FOUND Failed to locate AcpiTable. > + @retval EFI_NOT_READY Not ready to locate > AcpiTable. > + @retval EFI_UNSUPPORTED The function is not > supported in this library > **/ > EFI_STATUS > +EFIAPI > LocateAcpiTableBySignature ( > IN UINT32 Signature, > IN OUT EFI_ACPI_DESCRIPTION_HEADER **Table, > IN OUT UINTN *Handle > ); >=20 > -/** > - This function uses the ACPI support protocol to locate an ACPI SSDT ta= ble. > - The table is located by searching for a matching OEM Table ID field. > - Partial match searches are supported via the TableIdSize parameter. > - > - @param[in] TableId Pointer to an ASCII string > containing the OEM Table ID from the ACPI table header > - @param[in] TableIdSize Length of the TableId to match. > Table ID are 8 bytes long, this function > - will consider it a match if > the first TableIdSize bytes match > - @param[in, out] Table Updated with a pointer to the > table > - @param[in, out] Handle AcpiSupport protocol table > handle for the table found > - @param[in, out] Version See AcpiSupport protocol, > GetAcpiTable function for use > - > - @retval EFI_SUCCESS The function completed > successfully. > -**/ > -EFI_STATUS > -LocateAcpiTableByOemTableId ( > - IN UINT8 *TableId, > - IN UINT8 TableIdSize, > - IN OUT EFI_ACPI_DESCRIPTION_HEADER **Table, > - IN OUT UINTN *Handle > - ); > - > -/** > - This function calculates and updates an UINT8 checksum. > - > - @param[in] Buffer Pointer to buffer to checksum > - @param[in] Size Number of bytes to checksum > - @param[in] ChecksumOffset Offset to place the checksum > result in > - > - @retval EFI_SUCCESS The function completed > successfully. > -**/ > -EFI_STATUS > -AcpiChecksum ( > - IN VOID *Buffer, > - IN UINTN Size, > - IN UINTN ChecksumOffset > - ); > - > #endif > -- > 2.16.2.windows.1