From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::141; helo=mail-it1-x141.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x141.google.com (mail-it1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D9FF1211982F4 for ; Sat, 22 Dec 2018 03:09:57 -0800 (PST) Received: by mail-it1-x141.google.com with SMTP id c9so10148087itj.1 for ; Sat, 22 Dec 2018 03:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cor6qLtnZJFlA90buW/zRVFmVqZNzjUVypVGAQcjiq8=; b=jxypPcu1SfdcbZjBuahKduSrDTxj139lEtq685tM1i8Siz7hiCGBlE+2HRTiBNy4Y7 pc9uZmp4lYUwzlUXx/rr1VbZWai4PFMlBFicLlY0ChWEBpGvLNr4VwEfIRQeWtnAp/RT u+REPfa6u+YIQ9mfLl3aTkKzD4qyekN8g+DIQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cor6qLtnZJFlA90buW/zRVFmVqZNzjUVypVGAQcjiq8=; b=QzDguwk/KXzRAd7TuxNCjvTO0l+9Z5kaSf7mx8lVJpUS5mGBxC7+DM9xHg6qBp4lu5 YOr3OeaOj0QKKsMEBfnDWKpz2EgBoGC555JL58dFUxzbFzZ0XciRWRSmcZPCNB9hx8V4 uzk3Yswj14h2JV/qFBydhsdbH9BZ4mBieLxsBkFCRcNXgkmOu++nYjr4JyZxO5POeCto FLCafN5PmXpcfoCAv281VJlcYw5wVaLOj3T7ro1Ym75621QM+c50wAV5lGmcq07WYJlF 5hoDlj/crJB1LVWqcybmObdD1KSqpzp8bvuKMr0Vglog4b78KLUNA5TB9U/K2R0t1D/k +L/w== X-Gm-Message-State: AA+aEWaqSfZNc6g/D4Z6YIA9U58jXAVdpbJBjbX7wToDJLmSa45fQBef 5aDFwhVlVOvUP6lBgdOzyYSGTeBl1Ebm6ll1wqNHpw== X-Google-Smtp-Source: AFSGD/V7mzpp7IVk48r1rRNiCnq75vlkmlmJ6BEw8mcbrEqMw3zlrCNspjONA6a/HSdMW7Qq22mJDW5hnreIQN7psxg= X-Received: by 2002:a24:edc4:: with SMTP id r187mr4711700ith.158.1545476995657; Sat, 22 Dec 2018 03:09:55 -0800 (PST) MIME-Version: 1.0 References: <20181221170021.145024-1-sami.mujawar@arm.com> <20181221170021.145024-6-sami.mujawar@arm.com> In-Reply-To: From: Ard Biesheuvel Date: Sat, 22 Dec 2018 12:09:45 +0100 Message-ID: To: Sami Mujawar Cc: "edk2-devel@lists.01.org" , Arvind Chauhan , Daniil Egranov , Thomas Abraham , Leif Lindholm , "Kinney, Michael D" , Alexei Fedorov , Matteo Carlini , Stephanie Hughes-Fitt , nd Subject: Re: [PATCH edk2-platforms v1 5/6] Platform/ARM: Add OEM CPU generator for FVP X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2018 11:09:58 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 21 Dec 2018 at 19:14, Sami Mujawar wrote: > > Hi Ard, > > Please see my response inline. > > Regards, > > Sami Mujawar > > -----Original Message----- > From: Ard Biesheuvel > Sent: 21 December 2018 05:08 PM > To: Sami Mujawar > Cc: edk2-devel@lists.01.org; Arvind Chauhan ; Dan= iil Egranov ; Thomas Abraham ; Leif Lindholm ; Kinney, Michael D ; Alexei Fedorov ; Matteo Carlini = ; Stephanie Hughes-Fitt ; nd > Subject: Re: [PATCH edk2-platforms v1 5/6] Platform/ARM: Add OEM CPU gene= rator for FVP > > Hi Sami, > > On Fri, 21 Dec 2018 at 18:01, Sami Mujawar wrote: > > > > Add support for dynamic generation of ACPI CPU device information. > > This generator uses the compiled data from a template asl file and > > patches it at runtime to generate the CPU information based on the > > number of CPUs and their ACPI UID. This patched data is then installed > > as a SSDT table. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Sami Mujawar > > --- > > Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/A= cpiOemCpuASLLib.inf | 27 ++ > > Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/A= cpiOemCpuGeneratorLib.inf | 42 ++ > > Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/O= emCpuGenerator.c | 403 ++++++++++++++++++++ > > Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/O= emCpuGenerator.h | 23 ++ > > Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/S= sdtCpuTemplate.asl | 25 ++ > > 5 files changed, 520 insertions(+) > > > ... > > diff --git > > a/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib > > /OemCpuGenerator.c > > b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib > > /OemCpuGenerator.c > > new file mode 100644 > > index > > 0000000000000000000000000000000000000000..d544244bfbd566c128b57d80b0c8 > > c2bdc0cca374 > > --- /dev/null > > +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGenerato > > +++ rLib/OemCpuGenerator.c > > @@ -0,0 +1,403 @@ > > +/** @file > > + OEM CPU Table Generator > > + > > + Copyright (c) 2018, ARM Limited. All rights reserved. > > + This program and the accompanying materials are licensed and made > > + available under the terms and conditions of the BSD License which > > + accompanies this distribution. The full text of the license may be > > + found at http://opensource.org/licenses/bsd-license.php > > + > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > > +BASIS, > > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR= IMPLIED. > > +**/ > > + > > +#include > > +#include > > +#include > > +#include > > +#include #include > > + > > +#include > > + > > +// Module specific include files. > > +#include > > +#include #include > > + #include > > +#include > > +#include > > + > > +#include > > + > > +// AML Code Include files generated by iASL Compiler #include > > + > > + > > +// AML Code offsets file generated by iASL Compiler #include > > + > > + > > Apologies if I should have spotted this before, but this is a no-go. > We are relying on intermediate output of some version of the IASL compile= r here, which [AFAIK] is not formally specified or documented. > We cannot base an elaborate framework like DynamicTables on this. > > I guess this only affects DSDT/SSDT generation, right? > [SAMI] Yes. The last 2 patches in this series add this feature. We probab= ly need more discussion on this topic. > Until then can we proceed with review of the remaining patches, or should= I submit a new patch series that drops the last 2 patches? > No worries, if they are logically separate, there is no need to resend. > > +STATIC EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * mTableFactoryProtocol > > +=3D NULL; > > + > > +/** OEM CPU Generator > > + > > +Requirements: > > + The following Configuration Manager Object(s) are required by > > + this Generator: > > + - EArmObjGicCInfo > > +*/ > > + > > +/** This macro expands to a function that retrieves the GIC > > + CPU interface Information from the Configuration Manager. > > +*/ > > +GET_OBJECT_LIST ( > > + EObjNameSpaceArm, > > + EArmObjGicCInfo, > > + CM_ARM_GICC_INFO > > + ); > > + > > +STATIC > > +CHAR8 > > +AsciiFromHex ( > > + UINTN x > > + ) > > +{ > > + if (x < 10) { > > + return x + '0'; > > + } > > + > > + if (x < 16) { > > + return x - 10 + 'A'; > > + } > > + > > + ASSERT (FALSE); > > + return -1; > > +} > > + > > +/** Free any resources allocated for constructing the tables. > > + > > + @param [in] This Pointer to the ACPI table generator. > > + @param [in] AcpiTableInfo Pointer to the ACPI Table Info. > > + @param [in] CfgMgrProtocol Pointer to the Configuration Manager > > + Protocol Interface. > > + @param [in, out] Table Pointer to the list of ACPI Table(s)= . > > + @param [in] TableCount Number of ACPI table(s). > > + > > + @retval EFI_SUCCESS The resources were freed successfully. > > + @retval EFI_INVALID_PARAMETER The table pointer is NULL or invalid. > > +**/ > > +STATIC > > +EFI_STATUS > > +FreeOemCpuTableResourcesEx ( > > + IN CONST ACPI_TABLE_GENERATOR * CONST This, > > + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTab= leInfo, > > + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrP= rotocol, > > + IN OUT EFI_ACPI_DESCRIPTION_HEADER *** CONST Table, > > + IN CONST UINTN TableCo= unt > > + ) > > +{ > > + EFI_ACPI_DESCRIPTION_HEADER ** TableList =3D NULL; > > + UINTN Index; > > + > > + ASSERT (This !=3D NULL); > > + ASSERT (AcpiTableInfo !=3D NULL); > > + ASSERT (CfgMgrProtocol !=3D NULL); > > + ASSERT (AcpiTableInfo->TableGeneratorId =3D=3D This->GeneratorID); > > + ASSERT (AcpiTableInfo->AcpiTableSignature =3D=3D > > + This->AcpiTableSignature); > > + > > + if ((Table =3D=3D NULL) || (*Table =3D=3D NULL)) { > > + DEBUG ((DEBUG_ERROR, "ERROR: OEM-CPU: Invalid Table Pointer\n")); > > + ASSERT ((Table !=3D NULL) && (*Table !=3D NULL)); > > + return EFI_INVALID_PARAMETER; > > + } > > + > > + TableList =3D *Table; > > + > > + for (Index =3D 0; Index < TableCount; Index++) { > > + if (TableList[Index] !=3D NULL) { > > + // Free the table data > > + FreePool (TableList[Index]); > > + TableList[Index] =3D NULL; > > + } > > + } > > + > > + // Free the table list > > + FreePool (*Table); > > + *Table =3D NULL; > > + return EFI_SUCCESS; > > +} > > + > > +/** Construct the ACPI table using the ACPI table data provided. > > + > > + This function invokes the Configuration Manager protocol interface > > + to get the required hardware information for generating the ACPI > > + table. > > + > > + If this function allocates any resources then they must be freed > > + in the FreeXXXXTableResourcesEx function. > > + > > + @param [in] This Pointer to the table generator. > > + @param [in] AcpiTableInfo Pointer to the ACPI Table Info. > > + @param [in] CfgMgrProtocol Pointer to the Configuration Manager > > + Protocol Interface. > > + @param [out] Table Pointer to a list of generated ACPI tabl= e(s). > > + @param [out] TableCount Number of generated ACPI table(s). > > + > > + @retval EFI_SUCCESS Table generated successfully. > > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > > +**/ > > +STATIC > > +EFI_STATUS > > +EFIAPI > > +BuildOemCpuTableEx ( > > + IN CONST ACPI_TABLE_GENERATOR * This, > > + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableIn= fo, > > + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProto= col, > > + OUT EFI_ACPI_DESCRIPTION_HEADER *** Table, > > + OUT UINTN * CONST TableCount > > + ) > > +{ > > + EFI_STATUS Status; > > + UINT32 GicCCount; > > + CM_ARM_GICC_INFO * GicCInfo; > > + EFI_ACPI_DESCRIPTION_HEADER ** TableList =3D NULL; > > + CHAR8 * TableData; > > + CHAR8 * PatchData; > > + UINTN Index; > > + > > + ASSERT (This !=3D NULL); > > + ASSERT (AcpiTableInfo !=3D NULL); > > + ASSERT (CfgMgrProtocol !=3D NULL); > > + ASSERT (Table !=3D NULL); > > + ASSERT (AcpiTableInfo->TableGeneratorId =3D=3D This->GeneratorID); > > + > > + *Table =3D NULL; > > + > > + Status =3D GetEArmObjGicCInfo ( > > + CfgMgrProtocol, > > + CM_NULL_TOKEN, > > + &GicCInfo, > > + &GicCCount > > + ); > > + if (EFI_ERROR (Status)) { > > + DEBUG (( > > + DEBUG_ERROR, > > + "ERROR: OEM-CPU: Failed to get GICC Info. Status =3D %r\n", > > + Status > > + )); > > + goto error_handler; > > + } > > + > > + if (GicCCount =3D=3D 0) { > > + DEBUG (( > > + DEBUG_ERROR, > > + "ERROR: OEM-CPU: GIC CPU Interface information not provided.\n" > > + )); > > + ASSERT (GicCCount !=3D 0); > > + Status =3D EFI_INVALID_PARAMETER; > > + goto error_handler; > > + } > > + > > + // Update the table count > > + *TableCount =3D GicCCount; > > + > > + // Allocate storage for the Table list TableList =3D > > + (EFI_ACPI_DESCRIPTION_HEADER**) > > + AllocateZeroPool ( > > + (GicCCount * sizeof (EFI_ACPI_DESCRIPTION_HEADER*)) > > + ); > > + if (TableList =3D=3D NULL) { > > + Status =3D EFI_OUT_OF_RESOURCES; > > + DEBUG (( > > + DEBUG_ERROR, > > + "ERROR: OEM-CPU: Failed to allocate memory for Table List," \ > > + " Status =3D %r\n", > > + Status > > + )); > > + goto error_handler; > > + } > > + > > + // Update the table list pointer > > + *Table =3D TableList; > > + > > + for (Index =3D 0; Index < GicCCount; Index++) { > > + UINT32 AcpiProcessorUid =3D GicCInfo[Index].AcpiProcessorUid; > > + > > + // This generator implementation supports maximum 256 CPUs (IDS 0 = - 255) > > + if (AcpiProcessorUid > 0xFF) { > > + Status =3D EFI_INVALID_PARAMETER; > > + goto error_handler; > > + } > > + > > + TableData =3D (CHAR8*)AllocateZeroPool (sizeof (ssdtcputemplate_am= l_code)); > > + if (TableData =3D=3D NULL) { > > + Status =3D EFI_OUT_OF_RESOURCES; > > + DEBUG (( > > + DEBUG_ERROR, > > + "ERROR: OEM-CPU: Failed to allocate memory for Table," \ > > + " Status =3D %r\n", > > + Status > > + )); > > + goto error_handler; > > + } > > + > > + // Store the table data pointer in the list > > + TableList[Index] =3D (EFI_ACPI_DESCRIPTION_HEADER*)TableData; > > + // Copy from template > > + CopyMem ( > > + (VOID *)(UINTN)TableData, > > + (VOID *)(UINTN)ssdtcputemplate_aml_code, > > + sizeof (ssdtcputemplate_aml_code) > > + ); > > + > > + // Update relevent sections in the table > > + // 1. Update DEVICE name > > + // {"_SB_.CP5A", > > + // 0x5B82, 0x0000002D, 0x00, 0x00000000, 0x0000000000000000} > > + DEBUG (( > > + DEBUG_INFO, > > + "Pathname =3D %a, NamesegOffset =3D 0x%x, Offset =3D 0x%x, Value= =3D 0x%lx\n", > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_DEVICE_INDEX].Pathname, > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_DEVICE_INDEX].NamesegOffs= et, > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_DEVICE_INDEX].Offset, > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_DEVICE_INDEX].Value > > + )); > > + > > + PatchData =3D TableData + > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_DEVICE_INDEX].NamesegOffs= et; > > + // PatchData[0] - 'C' > > + // PatchData[1] - 'P' > > + // PatchData[2] - Tens Digit > > + // PatchData[3] - Units Digit > > + PatchData[2] =3D AsciiFromHex ((AcpiProcessorUid >> 4) & 0xF); > > + PatchData[3] =3D AsciiFromHex (AcpiProcessorUid & 0xF); > > + > > + // 2. Update UID value > > + // {"_SB_.CP5A._UID", > > + // 0x0008, 0x00000041, 0x0A, 0x00000046, 0x00000000000000A5} > > + DEBUG (( > > + DEBUG_INFO, > > + "Pathname =3D %a, NamesegOffset =3D 0x%x, Offset =3D 0x%x, Value= =3D 0x%lx\n", > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_UID_INDEX].Pathname, > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_UID_INDEX].NamesegOffset, > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_UID_INDEX].Offset, > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_UID_INDEX].Value > > + )); > > + > > + PatchData =3D TableData + > > + SSDT_ARM_VEXP_OffsetTable[OFFSET_TABLE_UID_INDEX].Offset; > > + PatchData[0] =3D AcpiProcessorUid; > > + } // for > > + > > + return Status; > > + > > +error_handler: > > + // Free up the allocated resources in case of an error > > + FreeOemCpuTableResourcesEx ( > > + This, > > + AcpiTableInfo, > > + CfgMgrProtocol, > > + Table, > > + *TableCount > > + ); > > + return Status; > > +} > > + > > +/** This macro defines the Raw Generator revision. > > +*/ > > +#define OEM_CPU_GENERATOR_REVISION CREATE_REVISION (1, 0) > > + > > +/** The interface for the Raw Table Generator. > > +*/ > > +STATIC > > +CONST > > +ACPI_TABLE_GENERATOR OemCpuGenerator =3D { > > + // Generator ID > > + CREATE_OEM_ACPI_TABLE_GEN_ID (OEM_ACPI_TABLE_ID_CPU), > > + // Generator Description > > + L"ACPI.OEM.CPU.GENERATOR", > > + // ACPI Table Signature - Unused > > + 0, > > + // ACPI Table Revision - Unused > > + 0, > > + // Creator ID > > + TABLE_GENERATOR_CREATOR_ID_ARM, > > + // Creator Revision > > + OEM_CPU_GENERATOR_REVISION, > > + // Build Table function not implemented > > + // as this generator implements the extended > > + // version > > + NULL, > > + NULL, > > + // Extended build table function > > + BuildOemCpuTableEx, > > + // Free resources allocated by extended build table interface > > + FreeOemCpuTableResourcesEx > > +}; > > + > > +/** Register the Generator with the ACPI Table Factory. > > + > > + @param [in] ImageHandle The handle to the image. > > + @param [in] SystemTable Pointer to the System Table. > > + > > + @retval EFI_SUCCESS The Generator is registered. > > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > > + @retval EFI_ALREADY_STARTED The Generator for the Table ID > > + is already registered. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +AcpiOemCpuGeneratorLibConstructor ( > > + IN CONST EFI_HANDLE ImageHandle, > > + IN EFI_SYSTEM_TABLE * CONST SystemTable > > + ) > > +{ > > + EFI_STATUS Status; > > + // Locate the Dynamic Table Factory > > + Status =3D gBS->LocateProtocol ( > > + &gEdkiiDynamicTableFactoryProtocolGuid, > > + NULL, > > + (VOID**)&mTableFactoryProtocol > > + ); > > + if (EFI_ERROR (Status)) { > > + DEBUG (( > > + DEBUG_ERROR, > > + "ERROR: Failed to find Dynamic Table Factory protocol." \ > > + " Status =3D %r\n", > > + Status > > + )); > > + return Status; > > + } > > + > > + Status =3D mTableFactoryProtocol->RegisterAcpiTableGenerator > > +(&OemCpuGenerator); > > + DEBUG ((DEBUG_INFO, "OEM-CPU: Register Generator. Status =3D %r\n", > > +Status)); > > + ASSERT_EFI_ERROR (Status); > > + return Status; > > +} > > + > > +/** Deregister the Generator from the ACPI Table Factory. > > + > > + @param [in] ImageHandle The handle to the image. > > + @param [in] SystemTable Pointer to the System Table. > > + > > + @retval EFI_SUCCESS The Generator is deregistered. > > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > > + @retval EFI_NOT_FOUND The Generator is not registered. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +AcpiOemCpuGeneratorLibDestructor ( > > + IN CONST EFI_HANDLE ImageHandle, > > + IN EFI_SYSTEM_TABLE * CONST SystemTable > > + ) > > +{ > > + EFI_STATUS Status; > > + if (mTableFactoryProtocol !=3D NULL) { > > + Status =3D mTableFactoryProtocol->DeregisterAcpiTableGenerator ( > > + &OemCpuGenerator > > + ); > > + } else { > > + Status =3D EFI_NOT_FOUND; > > + } > > + DEBUG ((DEBUG_INFO, "OEM-CPU: Deregister Generator. Status =3D %r\n"= , > > +Status)); > > + ASSERT_EFI_ERROR (Status); > > + return Status; > > +} > > diff --git > > a/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib > > /OemCpuGenerator.h > > b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib > > /OemCpuGenerator.h > > new file mode 100644 > > index > > 0000000000000000000000000000000000000000..49f75202840af3e37d3ac4b31a6d > > 9b1d9673072f > > --- /dev/null > > +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGenerato > > +++ rLib/OemCpuGenerator.h > > @@ -0,0 +1,23 @@ > > +/** @file > > + > > + Copyright (c) 2018, ARM Limited. All rights reserved. > > + > > + This program and the accompanying materials are licensed and made > > + available under the terms and conditions of the BSD License which > > + accompanies this distribution. The full text of the license may be > > + found at http://opensource.org/licenses/bsd-license.php > > + > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > > + BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXP= RESS OR IMPLIED. > > + > > +**/ > > + > > +#ifndef OEMCPUGENERATOR_H__ > > +#define OEMCPUGENERATOR_H__ > > + > > +#define OEM_ACPI_TABLE_ID_CPU 1 > > + > > +#define OFFSET_TABLE_DEVICE_INDEX 1 > > +#define OFFSET_TABLE_UID_INDEX 2 > > + > > +#endif // OEMCPUGENERATOR_H__ > > diff --git > > a/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib > > /SsdtCpuTemplate.asl > > b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib > > /SsdtCpuTemplate.asl > > new file mode 100644 > > index > > 0000000000000000000000000000000000000000..11d9025044e0b853af12e6cc3dd7 > > f3cfe87a1ecb > > --- /dev/null > > +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGenerato > > +++ rLib/SsdtCpuTemplate.asl > > @@ -0,0 +1,25 @@ > > +/** @file > > + SSDT Template for CPU > > + > > + Copyright (c) 2018, ARM Ltd. All rights reserved.
> > + This program and the accompanying materials are licensed and > > + made available under the terms and conditions of the BSD License > > + which accompanies this distribution. The full text of the license > > + may be found at http://opensource.org/licenses/bsd-license.php > > + > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > > + BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXP= RESS OR IMPLIED. > > + > > +**/ > > + > > +DefinitionBlock("SsdtCpu.aml", "SSDT", 1, "ARMLTD", "ARM-VEXP", 1) { > > + Scope(_SB) { > > + // > > + // Processor > > + // > > + Device(CP5A) { > > + Name(_HID, "ACPI0007") > > + Name(_UID, 0xA5) > > + } > > + } > > +} > > -- > > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' > > > >