From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.75]) by mx.groups.io with SMTP id smtpd.web10.17209.1597245838020599223 for ; Wed, 12 Aug 2020 08:23:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=jJpd4qxX; spf=pass (domain: arm.com, ip: 40.107.6.75, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pj3bzoZJjBZABuA2N3XH/8tYKHrFVb3AfhYIzecXyoA=; b=jJpd4qxXo/FaCYYQ0EZUANBEDhwNyYUSvsMO5ttlOKJ221njpNSXx77NNEQfQUM8zGLEYQH4O0jEnj00BY1A4NTpKOl+GbX4T1FOTxhWqlIZMFA3LL9rCM6SFpe/0i4f5Y+y9ZrDlaxpfrgkTpwkKAKg7gmWih5BgKsmz4Y144M= Received: from AM5PR0402CA0022.eurprd04.prod.outlook.com (2603:10a6:203:90::32) by VI1PR08MB4064.eurprd08.prod.outlook.com (2603:10a6:803:e5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Wed, 12 Aug 2020 15:23:54 +0000 Received: from AM5EUR03FT046.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:90:cafe::30) by AM5PR0402CA0022.outlook.office365.com (2603:10a6:203:90::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16 via Frontend Transport; Wed, 12 Aug 2020 15:23:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT046.mail.protection.outlook.com (10.152.16.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16 via Frontend Transport; Wed, 12 Aug 2020 15:23:54 +0000 Received: ("Tessian outbound 7fc8f57bdedc:v64"); Wed, 12 Aug 2020 15:23:54 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b82936d6c6370133 X-CR-MTA-TID: 64aa7808 Received: from 01952ed791eb.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F2D98007-9F3D-43BC-A4D6-BE447B56B0FF.1; Wed, 12 Aug 2020 15:23:48 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 01952ed791eb.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 12 Aug 2020 15:23:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f3xOreTgnVzcdgOf5F44/6gS/0PM0YiBhxTco/bXRv1TY9mDxyMDUlm2WHjtM+/imecK/dR8C4WKVTkRzrc1UemacKZ3pGQ1p7YTtD38hE/koD1nyq5wJtN5HQSjBxND2ddJMyKy55EY64U27VaBLJxuqU/loXTBg5Cc6poERkECahUUH9zl/QYZL25EGiMhYfOjBer0hk1Glq5mLHKzfA0xLGD5tAJURZGiGix+vcaNnFFDqclILQFm2C7Od28vfOWX5805tSfH5NmGtxZ+516uzNsna5G6/tt/UfMshp/LYViDa+5t8apdXJu7lLODgBGQ3iiIUdv80v96ik0taQ== 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=pj3bzoZJjBZABuA2N3XH/8tYKHrFVb3AfhYIzecXyoA=; b=T+zj9W6xODXgvR0F8HEoHTU9S/9qzsd1Cr6iJZPrpyCevUUUNzv7oHk3gmfT3P8nCAosCitTo0XW3D2M8p9RkX4ISSn5gejEUu4qKxcNVeSuIQjz7OYLlndataK3BtG7dv/F6anFStzw58Dd65QKQNiKFVJwnLbwJ/WTkt3sdaOel1Q3W0Si76G8fp/1n9dDhVBCXtPvVCXzpSd9+OkQWkynEgrtPRZmHeuzMo7QpAZ3gbtW1s/6MVN8Wg2sFhM2h9PpPp9komtlUhzJJf7QAq2++KKv3EmYx9Md/nwIB6nrGEcTIHCeFiLkYhHHWxQRU/4SO44Bu/oLJykV6FY/jA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pj3bzoZJjBZABuA2N3XH/8tYKHrFVb3AfhYIzecXyoA=; b=jJpd4qxXo/FaCYYQ0EZUANBEDhwNyYUSvsMO5ttlOKJ221njpNSXx77NNEQfQUM8zGLEYQH4O0jEnj00BY1A4NTpKOl+GbX4T1FOTxhWqlIZMFA3LL9rCM6SFpe/0i4f5Y+y9ZrDlaxpfrgkTpwkKAKg7gmWih5BgKsmz4Y144M= Received: from AM6PR10CA0089.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:8c::30) by AM6PR08MB3510.eurprd08.prod.outlook.com (2603:10a6:20b:48::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.17; Wed, 12 Aug 2020 15:23:47 +0000 Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8c:cafe::9a) by AM6PR10CA0089.outlook.office365.com (2603:10a6:209:8c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Wed, 12 Aug 2020 15:23:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3283.16 via Frontend Transport; Wed, 12 Aug 2020 15:23:47 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Wed, 12 Aug 2020 15:23:43 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Wed, 12 Aug 2020 15:23:42 +0000 Received: from E107187.Arm.com (10.57.41.222) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Wed, 12 Aug 2020 15:23:41 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [PATCH v1 27/30] DynamicTablesPkg: SSDT Serial Port Fixup library Date: Wed, 12 Aug 2020 16:22:33 +0100 Message-ID: <20200812152236.31164-28-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20200812152236.31164-1-sami.mujawar@arm.com> References: <20200812152236.31164-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2cda7776-c26b-44c1-5e7b-08d83ed3b972 X-MS-TrafficTypeDiagnostic: AM6PR08MB3510:|VI1PR08MB4064: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:2958;OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: GHibF5gJ+uS/KX/zC2omY9egbwI9SpSIipn/7D9cmcZwonq94Qew0ovK1ybEwU1Ca4zL7gblmpzFy972lI+nr0R+dKsQNYNSUibRsA3tx9jJxkizgDtDVTUrtYHRzdklC91Irxlbt8hc/epeXWomM6h3vLLNtlD9yqYlBbXHKiTdFOxzKfXCEbGCNc4/LrEVjVRw3q/2QM19rhoNULjZHXHZKiXb2HeOZJ1q2O0Gw2eYzFS6Vgy40IXAwyUzGthmFi+l3j+fQ31vEos7/ePagwm7JRJdRRLuW9E8OgNlVkte6EvBlk1HF1y5XC0qqIuRJMFz1jchKxadcxVhtyR/GMeSmxxp8E45jcsggHMe4B3d7TWEPp7kzz8cnS6iqu4YW0OdR04JtUYfKBx1JgIINA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(376002)(346002)(396003)(136003)(46966005)(30864003)(47076004)(8676002)(82740400003)(186003)(1076003)(5660300002)(54906003)(36756003)(6666004)(8936002)(44832011)(82310400002)(4326008)(26005)(2616005)(336012)(70206006)(6916009)(45080400002)(7696005)(81166007)(70586007)(83380400001)(356005)(316002)(2906002)(86362001)(426003)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3510 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT046.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 19c69b36-b247-47ed-187d-08d83ed3b526 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V7ld2FZuBOLUpYNx9s1XU22nqNppMf0E9oYG2kbsTJ3kffXsR7o2RS8PX5bUjoatoqjcol8COQWKvEI4U5T/8vgGVaRmori/im6MB/DUh3FkilXk2Rmtz4SKLICLv4uKPElZfrBNKv8ou2uGeZ47fROEInM5bnm5ZmmdlWWdhMyxOp5woQf9N7nQeEpr8QHd9WfIHa8biOsS5c0rd5gV/u6RSIc87gSy4lyf+3ck0Tl98Sd0/msYgsUdLk05T4YsJv+Ie9Mj2zVxK0ViwJNczWIWDZIqjLnr10HbrFnCUClY0mriE6paI0jHY22WXxkzce/E1bZSg4o4XX+LC5etdKA6T4ljJ658DgZls1iyQvlCR4ZNq3nb4QUgWrRWXyrAGDUKytvf8M/BmyFCVDD6fw== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(4636009)(396003)(376002)(39860400002)(136003)(346002)(46966005)(86362001)(7696005)(36906005)(70206006)(54906003)(6666004)(2906002)(316002)(2616005)(426003)(45080400002)(8936002)(5660300002)(1076003)(336012)(6916009)(70586007)(186003)(26005)(44832011)(30864003)(4326008)(82310400002)(81166007)(47076004)(82740400003)(36756003)(478600001)(8676002)(83380400001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2020 15:23:54.2477 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2cda7776-c26b-44c1-5e7b-08d83ed3b972 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT046.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4064 Content-Type: text/plain From: Pierre Gondois According to Arm Server Base Boot Requirements, Platform Design Document version 1.2 revision D, September 2, 2019, section '4.2.1.8 SPCR'; The SPCR console device must be included in the DSDT. Additionally, it is often desirable to describe the serial ports available on a platform so that they are available for use by a rich OS. To facilitate the description of serial ports on a platform a common SSDT Serial Port Fixup library is introduced. It provides interfaces to build a SSDT serial port definition block table based on the serial port information. The SSDT Serial Port Fixup library is used by the SPCR, DBG2 and SSDT Serial Port generator to describe the serial port information in a definition block. +------------+ +------------+ +------------+ | SPCR Gen | | DBG2 Gen | | SERIAL Gen | +------------+ +------------+ +------------+ +----------------------------------+ | SSDT Serial Port Fixup library | +----------------------------------+ The SSDT Serial Port Fixup library: - Parses the SSDT Serial Port template using the AmlLib library to generate an AML tree. - Updates the _UID, _HID and _CID values. - Fixes up the Serial port base address, length and the interrupt number in the _CRS descriptor. - Fixes up the serial-port name. - Serialises the AML Tree to a buffer containing the definition block data. The definition block data is then installed by the corresponding table generator. Signed-off-by: Pierre Gondois Signed-off-by: Sami Mujawar --- DynamicTablesPkg/DynamicTables.dsc.inc | 1 + DynamicTablesPkg/DynamicTablesPkg.ci.yaml | 3 + DynamicTablesPkg/DynamicTablesPkg.dec | 3 + DynamicTablesPkg/DynamicTablesPkg.dsc | 1 + DynamicTablesPkg/Include/AcpiTableGenerator.h | 7 +- DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 9 +- DynamicTablesPkg/Include/Library/SsdtSerialPortFixupLib.h | 68 +++ DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c | 524 ++++++++++++++++++++ DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf | 30 ++ DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortTemplate.asl | 60 +++ 10 files changed, 703 insertions(+), 3 deletions(-) diff --git a/DynamicTablesPkg/DynamicTables.dsc.inc b/DynamicTablesPkg/DynamicTables.dsc.inc index 928529f797b49f2f0dd52508a9aad557f568719a..0063fc3c671f4ae6089dd4df76074445364c6011 100644 --- a/DynamicTablesPkg/DynamicTables.dsc.inc +++ b/DynamicTablesPkg/DynamicTables.dsc.inc @@ -14,6 +14,7 @@ [BuildOptions] [LibraryClasses.common] AmlLib|DynamicTablesPkg/Library/Common/AmlLib/AmlLib.inf + SsdtSerialPortFixupLib|DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf TableHelperLib|DynamicTablesPkg/Library/Common/TableHelperLib/TableHelperLib.inf [Components.common] diff --git a/DynamicTablesPkg/DynamicTablesPkg.ci.yaml b/DynamicTablesPkg/DynamicTablesPkg.ci.yaml index 5ee20357326f4b79444d63418f56aae0b00508de..c0d09e79fdf7f6003b5bbda45abc82a0caf4e53f 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.ci.yaml +++ b/DynamicTablesPkg/DynamicTablesPkg.ci.yaml @@ -69,6 +69,8 @@ "IgnoreFiles": [], # use gitignore syntax to ignore errors # in matching files "ExtendWords": [ + "ARMHB", # ARMHB000 + "ARMLTD", "EISAID", "CCIDX", "CCSIDR", @@ -81,6 +83,7 @@ "MPIDR", "pytool", "Roadmap", + "ssdtserialporttemplate", "SMMUV", "standardised", "TABLEEX", diff --git a/DynamicTablesPkg/DynamicTablesPkg.dec b/DynamicTablesPkg/DynamicTablesPkg.dec index 57e6815fa159c5ce8d5cb0c930375e7322bff211..f36a6e8bb7c17f82acff3c766b15202b064a64b5 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.dec +++ b/DynamicTablesPkg/DynamicTablesPkg.dec @@ -20,6 +20,9 @@ [LibraryClasses] ## @libraryclass Defines a set of APIs for Dynamic AML generation. AmlLib|Include/Library/AmlLib/AmlLib.h + ## @libraryclass Defines a set of methods for fixing up a SSDT Serial Port. + SsdtSerialPortFixupLib|Include/Library/SsdtSerialPortFixupLib.h + ## @libraryclass Defines a set of helper methods. TableHelperLib|Include/Library/TableHelperLib.h diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc b/DynamicTablesPkg/DynamicTablesPkg.dsc index add6b192ad4187e2769b374ef68f93a65a1af8b6..0232bda459c87016e1e62f52a5c98347e551b14c 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.dsc +++ b/DynamicTablesPkg/DynamicTablesPkg.dsc @@ -37,6 +37,7 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64] [Components.common] DynamicTablesPkg/Library/Common/AmlLib/AmlLib.inf + DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf DynamicTablesPkg/Library/Common/TableHelperLib/TableHelperLib.inf [BuildOptions] diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h b/DynamicTablesPkg/Include/AcpiTableGenerator.h index b55feb4e7507f0e4e1e0a64c3c4b8068f17dad47..ef5018c312c1abbc205a06b037ffd6063cf02f0a 100644 --- a/DynamicTablesPkg/Include/AcpiTableGenerator.h +++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. + Copyright (c) 2017 - 2020, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -55,6 +55,10 @@ The Dynamic Tables Framework implements the following ACPI table generators: the Configuration Manager and builds the PPTT table. - SRAT : The SRAT generator collates the system resource affinity information from the Configuration Manager and builds the SRAT table. + - SSDT Serial-Port: + The SSDT Serial generator collates the Serial port information + from the Configuration Manager and patches the SSDT Serial Port + template to build the SSDT Serial port table. */ /** The ACPI_TABLE_GENERATOR_ID type describes ACPI table generator ID. @@ -78,6 +82,7 @@ typedef enum StdAcpiTableId { EStdAcpiTableIdIort, ///< IORT Generator EStdAcpiTableIdPptt, ///< PPTT Generator EStdAcpiTableIdSrat, ///< SRAT Generator + EStdAcpiTableIdSsdtSerialPort, ///< SSDT Serial-Port Generator EStdAcpiTableIdMax } ESTD_ACPI_TABLE_ID; diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h index 57a282d5cb6883d0dabb74ceac7c8905ed3ef43a..b2534a6505d6fb695f0751bbb09d365bd93d092e 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2017 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2017 - 2020, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -56,6 +56,7 @@ typedef enum ArmObjectID { EArmObjDeviceHandleAcpi, ///< 32 - Device Handle Acpi EArmObjDeviceHandlePci, ///< 33 - Device Handle Pci EArmObjGenericInitiatorAffinityInfo, ///< 34 - Generic Initiator Affinity + EArmObjSerialPortInfo, ///< 35 - Generic Serial Port Info EArmObjMax } EARM_OBJECT_ID; @@ -270,7 +271,8 @@ typedef struct CmArmGicItsInfo { Serial Port information for the Platform. ID: EArmObjSerialConsolePortInfo or - EArmObjSerialDebugPortInfo + EArmObjSerialDebugPortInfo or + EArmObjSerialPortInfo */ typedef struct CmArmSerialPortInfo { /// The physical base address for the serial port @@ -287,6 +289,9 @@ typedef struct CmArmSerialPortInfo { /// Serial Port subtype UINT16 PortSubtype; + + /// The Base address length + UINT64 BaseAddressLength; } CM_ARM_SERIAL_PORT_INFO; /** A structure that describes the diff --git a/DynamicTablesPkg/Include/Library/SsdtSerialPortFixupLib.h b/DynamicTablesPkg/Include/Library/SsdtSerialPortFixupLib.h new file mode 100644 index 0000000000000000000000000000000000000000..4605f3f34b1d9a2a3af975f801077d6f523e0530 --- /dev/null +++ b/DynamicTablesPkg/Include/Library/SsdtSerialPortFixupLib.h @@ -0,0 +1,68 @@ +/** @file + Ssdt Serial Port Fixup Library + + Copyright (c) 2020, Arm Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef SSDT_SERIAL_PORT_LIB_H_ +#define SSDT_SERIAL_PORT_LIB_H_ + +/** Build a SSDT table describing the input serial port. + + The table created by this function must be freed by FreeSsdtSerialTable. + + @param [in] AcpiTableInfo Pointer to the ACPI table information. + @param [in] SerialPortInfo Serial port to describe in the SSDT table. + @param [in] Name The Name to give to the Device. + Must be a NULL-terminated ASL NameString + e.g.: "DEV0", "DV15.DEV0", etc. + @param [in] Uid UID for the Serial Port. + @param [out] Table If success, pointer to the created SSDT table. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND Could not find information. + @retval EFI_OUT_OF_RESOURCES Could not allocate memory. +**/ +EFI_STATUS +EFIAPI +BuildSsdtSerialPortTable ( + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * AcpiTableInfo, + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo, + IN CONST CHAR8 * Name, + IN CONST UINT64 Uid, + OUT EFI_ACPI_DESCRIPTION_HEADER ** Table + ); + +/** Free an SSDT table previously created by + the BuildSsdtSerialTable function. + + @param [in] Table Pointer to a SSDT table allocated by + the BuildSsdtSerialTable function. + + @retval EFI_SUCCESS Success. +**/ +EFI_STATUS +EFIAPI +FreeSsdtSerialPortTable ( + IN EFI_ACPI_DESCRIPTION_HEADER * Table + ); + +/** Validate the Serial Port Information. + + @param [in] SerialPortInfoTable Table of CM_ARM_SERIAL_PORT_INFO. + @param [in] SerialPortCount Count of SerialPort in the table. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER Invalid parameter. +**/ +EFI_STATUS +EFIAPI +ValidateSerialPortInfo ( + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfoTable, + IN UINT32 SerialPortCount + ); + +#endif // SSDT_SERIAL_PORT_LIB_H_ diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c new file mode 100644 index 0000000000000000000000000000000000000000..944bfd6eaaabc9dbc7223c9888fb5f11eeb1bda9 --- /dev/null +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c @@ -0,0 +1,524 @@ +/** @file + SSDT Serial Port Fixup Library. + + Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Reference(s): + - Arm Server Base Boot Requirements (SBBR), s4.2.1.8 "SPCR". + - Microsoft Debug Port Table 2 (DBG2) Specification - December 10, 2015. +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +// Module specific include files. +#include +#include +#include +#include +#include +#include + +/** C array containing the compiled AML template. + This symbol is defined in the auto generated C file + containing the AML bytecode array. +*/ +extern CHAR8 ssdtserialporttemplate_aml_code[]; + +/** UART address range length. +*/ +#define MIN_UART_ADDRESS_LENGTH 0x1000U + +/** Validate the Serial Port Information. + + @param [in] SerialPortInfoTable Table of CM_ARM_SERIAL_PORT_INFO. + @param [in] SerialPortCount Count of SerialPort in the table. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER Invalid parameter. +**/ +EFI_STATUS +EFIAPI +ValidateSerialPortInfo ( + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfoTable, + IN UINT32 SerialPortCount + ) +{ + UINT32 Index; + CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo; + + if ((SerialPortInfoTable == NULL) || + (SerialPortCount == 0)) { + ASSERT (0); + return EFI_INVALID_PARAMETER; + } + + for (Index = 0; Index < SerialPortCount; Index++) { + SerialPortInfo = &SerialPortInfoTable[Index]; + ASSERT (SerialPortInfo != NULL); + + if ((SerialPortInfo == NULL ) || + (SerialPortInfo->BaseAddress == 0)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: UART port base address is invalid. BaseAddress = 0x%llx\n", + SerialPortInfo->BaseAddress + )); + return EFI_INVALID_PARAMETER; + } + + if ((SerialPortInfo->PortSubtype != + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART) && + (SerialPortInfo->PortSubtype != + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART_2X) && + (SerialPortInfo->PortSubtype != + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART) && + (SerialPortInfo->PortSubtype != + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_DCC) && + (SerialPortInfo->PortSubtype != + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: UART port subtype is invalid." + " UART Base = 0x%llx, PortSubtype = 0x%x\n", + SerialPortInfo->BaseAddress, + SerialPortInfo->PortSubtype + )); + return EFI_INVALID_PARAMETER; + } + + DEBUG ((DEBUG_INFO, "UART Configuration:\n")); + DEBUG (( + DEBUG_INFO, + " UART Base = 0x%llx\n", SerialPortInfo->BaseAddress + )); + DEBUG (( + DEBUG_INFO, + " Length = 0x%llx\n", + SerialPortInfo->BaseAddressLength + )); + DEBUG ((DEBUG_INFO, " Clock = %lu\n", SerialPortInfo->Clock)); + DEBUG ((DEBUG_INFO, " BaudRate = %llu\n", SerialPortInfo->BaudRate)); + DEBUG ((DEBUG_INFO, " Interrupt = %lu\n", SerialPortInfo->Interrupt)); + } // for + + return EFI_SUCCESS; +} + +/** Fixup the Serial Port Ids (_UID, _HID, _CID). + + @param [in] RootNodeHandle Pointer to the root of an AML tree. + @param [in] Uid UID for the Serial Port. + @param [in] SerialPortInfo Pointer to a Serial Port Information + structure. + Get the Serial Port Information from there. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_INVALID_PARAMETER Invalid parameter. + @retval EFI_NOT_FOUND Could not find information. + @retval EFI_OUT_OF_RESOURCES Out of resources. +**/ +STATIC +EFI_STATUS +EFIAPI +FixupIds ( + IN OUT AML_ROOT_NODE_HANDLE RootNodeHandle, + IN CONST UINT64 Uid, + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo + ) +{ + EFI_STATUS Status; + AML_OBJECT_NODE_HANDLE NameOpIdNode; + CONST CHAR8 * HidString; + CONST CHAR8 * CidString; + + // Get the _CID and _HID value to write. + switch (SerialPortInfo->PortSubtype) { + case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550: + { + HidString = "PNP0501"; + CidString = "PNP0500"; + break; + } + case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART: + { + HidString = "ARMH0011"; + CidString = "ARMHB000"; + break; + } + case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART: + case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART_2X: + { + HidString = "ARMH0011"; + CidString = ""; + break; + } + default: + { + return EFI_INVALID_PARAMETER; + } + } // switch + + // Get the _UID NameOp object defined by the "Name ()" statement, + // and update its value. + Status = AmlFindNode ( + RootNodeHandle, + "\\_SB_.COM0._UID", + &NameOpIdNode + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Status = AmlNameOpUpdateInteger (NameOpIdNode, (UINT64)Uid); + if (EFI_ERROR (Status)) { + return Status; + } + + // Get the _HID NameOp object defined by the "Name ()" statement, + // and update its value. + Status = AmlFindNode ( + RootNodeHandle, + "\\_SB_.COM0._HID", + &NameOpIdNode + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Status = AmlNameOpUpdateString (NameOpIdNode, HidString); + if (EFI_ERROR (Status)) { + return Status; + } + + // Get the _CID NameOp object defined by the "Name ()" statement, + // and update its value. + Status = AmlFindNode ( + RootNodeHandle, + "\\_SB_.COM0._CID", + &NameOpIdNode + ); + if (EFI_ERROR (Status)) { + return Status; + } + + // If we have a CID then update a _CID node else delete the node. + if (AsciiStrLen (CidString) != 0) { + Status = AmlNameOpUpdateString (NameOpIdNode, CidString); + } else { + // First detach the node from the tree. + Status = AmlDetachNode (NameOpIdNode); + if (EFI_ERROR (Status)) { + return Status; + } + + // Delete the detached node. + Status = AmlDeleteTree (NameOpIdNode); + } + + return Status; +} + +/** Fixup the Serial Port _CRS values (BaseAddress, ...). + + @param [in] RootNodeHandle Pointer to the root of an AML tree. + @param [in] SerialPortInfo Pointer to a Serial Port Information + structure. + Get the Serial Port Information from there. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_INVALID_PARAMETER Invalid parameter. + @retval EFI_NOT_FOUND Could not find information. + @retval EFI_OUT_OF_RESOURCES Out of resources. +**/ +STATIC +EFI_STATUS +EFIAPI +FixupCrs ( + IN OUT AML_ROOT_NODE_HANDLE RootNodeHandle, + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo + ) +{ + EFI_STATUS Status; + AML_OBJECT_NODE_HANDLE NameOpCrsNode; + AML_DATA_NODE_HANDLE QWordRdNode; + AML_DATA_NODE_HANDLE InterruptRdNode; + + // Get the "_CRS" object defined by the "Name ()" statement. + Status = AmlFindNode ( + RootNodeHandle, + "\\_SB_.COM0._CRS", + &NameOpCrsNode + ); + if (EFI_ERROR (Status)) { + return Status; + } + + // Get the first Rd node in the "_CRS" object. + Status = AmlNameOpCrsGetFirstRdNode (NameOpCrsNode, &QWordRdNode); + if (EFI_ERROR (Status)) { + return Status; + } + + if (QWordRdNode == NULL) { + return EFI_INVALID_PARAMETER; + } + + // Update the Serial Port base address and length. + Status = AmlUpdateRdQWord ( + QWordRdNode, + SerialPortInfo->BaseAddress, + ((SerialPortInfo->BaseAddressLength < MIN_UART_ADDRESS_LENGTH) ? + MIN_UART_ADDRESS_LENGTH: SerialPortInfo->BaseAddressLength) + ); + if (EFI_ERROR (Status)) { + return Status; + } + + // Get the Interrupt node. + // It is the second Resource Data element in the NameOpCrsNode's + // variable list of arguments. + Status = AmlNameOpCrsGetNextRdNode (QWordRdNode, &InterruptRdNode); + if (EFI_ERROR (Status)) { + return Status; + } + + if (InterruptRdNode == NULL) { + return EFI_INVALID_PARAMETER; + } + + // Update the interrupt number. + return AmlUpdateRdInterrupt (InterruptRdNode, SerialPortInfo->Interrupt); +} + +/** Fixup the Serial Port device name. + + @param [in] RootNodeHandle Pointer to the root of an AML tree. + @param [in] SerialPortInfo Pointer to a Serial Port Information + structure. + Get the Serial Port Information from there. + @param [in] Name The Name to give to the Device. + Must be a NULL-terminated ASL NameString + e.g.: "DEV0", "DV15.DEV0", etc. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_INVALID_PARAMETER Invalid parameter. + @retval EFI_NOT_FOUND Could not find information. + @retval EFI_OUT_OF_RESOURCES Out of resources. +**/ +STATIC +EFI_STATUS +EFIAPI +FixupName ( + IN OUT AML_ROOT_NODE_HANDLE RootNodeHandle, + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo, + IN CONST CHAR8 * Name + ) +{ + EFI_STATUS Status; + AML_OBJECT_NODE_HANDLE DeviceNode; + + // Get the COM0 variable defined by the "Device ()" statement. + Status = AmlFindNode (RootNodeHandle, "\\_SB_.COM0", &DeviceNode); + if (EFI_ERROR (Status)) { + return Status; + } + + // Update the Device's name. + return AmlDeviceOpUpdateName (DeviceNode, (CHAR8*)Name); +} + +/** Fixup the Serial Port Information in the AML tree. + + For each template value: + - find the node to update; + - update the value. + + @param [in] RootNodeHandle Pointer to the root of the AML tree. + @param [in] SerialPortInfo Pointer to a Serial Port Information + structure. + Get the Serial Port Information from there. + @param [in] Name The Name to give to the Device. + Must be a NULL-terminated ASL NameString + e.g.: "DEV0", "DV15.DEV0", etc. + @param [in] Uid UID for the Serial Port. + @param [out] Table If success, contains the serialized + SSDT table. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_INVALID_PARAMETER Invalid parameter. + @retval EFI_NOT_FOUND Could not find information. + @retval EFI_OUT_OF_RESOURCES Out of resources. +**/ +STATIC +EFI_STATUS +EFIAPI +FixupSerialPortInfo ( + IN OUT AML_ROOT_NODE_HANDLE RootNodeHandle, + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo, + IN CONST CHAR8 * Name, + IN CONST UINT64 Uid, + OUT EFI_ACPI_DESCRIPTION_HEADER ** Table + ) +{ + EFI_STATUS Status; + + ASSERT (RootNodeHandle != NULL); + ASSERT (SerialPortInfo != NULL); + ASSERT (Name != NULL); + ASSERT (Table != NULL); + + // Fixup the _UID, _HID and _CID values. + Status = FixupIds (RootNodeHandle, Uid, SerialPortInfo); + if (EFI_ERROR (Status)) { + return Status; + } + + // Fixup the _CRS values. + Status = FixupCrs (RootNodeHandle, SerialPortInfo); + if (EFI_ERROR (Status)) { + return Status; + } + + // Fixup the serial-port name. + // This MUST be done at the end, otherwise AML paths won't be valid anymore. + return FixupName (RootNodeHandle, SerialPortInfo, Name); +} + +/** Free an SSDT table previously created by + the BuildSsdtSerialTable function. + + @param [in] Table Pointer to a SSDT table allocated by + the BuildSsdtSerialTable function. + + @retval EFI_SUCCESS Success. +**/ +EFI_STATUS +EFIAPI +FreeSsdtSerialPortTable ( + IN EFI_ACPI_DESCRIPTION_HEADER * Table + ) +{ + ASSERT (Table != NULL); + FreePool (Table); + return EFI_SUCCESS; +} + +/** Build a SSDT table describing the input serial port. + + The table created by this function must be freed by FreeSsdtSerialTable. + + @param [in] AcpiTableInfo Pointer to the ACPI table information. + @param [in] SerialPortInfo Serial port to describe in the SSDT table. + @param [in] Name The Name to give to the Device. + Must be a NULL-terminated ASL NameString + e.g.: "DEV0", "DV15.DEV0", etc. + @param [in] Uid UID for the Serial Port. + @param [out] Table If success, pointer to the created SSDT table. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND Could not find information. + @retval EFI_OUT_OF_RESOURCES Could not allocate memory. +**/ +EFI_STATUS +EFIAPI +BuildSsdtSerialPortTable ( + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * AcpiTableInfo, + IN CONST CM_ARM_SERIAL_PORT_INFO * SerialPortInfo, + IN CONST CHAR8 * Name, + IN CONST UINT64 Uid, + OUT EFI_ACPI_DESCRIPTION_HEADER ** Table + ) +{ + EFI_STATUS Status; + EFI_STATUS Status1; + AML_ROOT_NODE_HANDLE RootNodeHandle; + + ASSERT (AcpiTableInfo != NULL); + ASSERT (SerialPortInfo != NULL); + ASSERT (Name != NULL); + ASSERT (Table != NULL); + + // Validate the Serial Port Info. + Status = ValidateSerialPortInfo (SerialPortInfo, 1); + if (EFI_ERROR (Status)) { + return Status; + } + + // Parse the SSDT Serial Port Template. + Status = AmlParseDefinitionBlock ( + (EFI_ACPI_DESCRIPTION_HEADER*)ssdtserialporttemplate_aml_code, + &RootNodeHandle + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: SSDT-SERIAL-PORT-FIXUP:" + " Failed to parse SSDT Serial Port Template. Status = %r\n", + Status + )); + return Status; + } + + // Fixup the template values. + Status = FixupSerialPortInfo ( + RootNodeHandle, + SerialPortInfo, + Name, + Uid, + Table + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: SSDT-SERIAL-PORT-FIXUP: Failed to fixup SSDT Serial Port Table." + " Status = %r\n", + Status + )); + goto exit_handler; + } + + // Serialize the tree. + Status = AmlSerializeDefinitionBlock ( + RootNodeHandle, + Table + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: SSDT-SERIAL-PORT-FIXUP: Failed to Serialize SSDT Table Data." + " Status = %r\n", + Status + )); + } + +exit_handler: + // Cleanup + if (RootNodeHandle != NULL) { + Status1 = AmlDeleteTree (RootNodeHandle); + if (EFI_ERROR (Status1)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: SSDT-SERIAL-PORT-FIXUP: Failed to cleanup AML tree." + " Status = %r\n", + Status1 + )); + // If Status was success but we failed to delete the AML Tree + // return Status1 else return the original error code, i.e. Status. + if (!EFI_ERROR (Status)) { + return Status1; + } + } + } + + return Status; +} diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf new file mode 100644 index 0000000000000000000000000000000000000000..af3d404393f5f1385ab2d40f45f7222ab66f9b3a --- /dev/null +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf @@ -0,0 +1,30 @@ +## @file +# SSDT Serial Port fixup Library +# +# Copyright (c) 2020, Arm Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + INF_VERSION = 0x0001001B + BASE_NAME = DynamicSsdtSerialPortFixupLib + FILE_GUID = AC5978CC-5B62-4466-AD04-23644C2C38C2 + VERSION_STRING = 1.0 + MODULE_TYPE = DXE_DRIVER + LIBRARY_CLASS = SsdtSerialPortFixupLib + +[Sources] + SsdtSerialPortFixupLib.c + SsdtSerialPortTemplate.asl + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + EmbeddedPkg/EmbeddedPkg.dec + DynamicTablesPkg/DynamicTablesPkg.dec + +[LibraryClasses] + AmlLib + BaseLib + diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortTemplate.asl b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortTemplate.asl new file mode 100644 index 0000000000000000000000000000000000000000..fcae2160ac3df6c3e9e48115b0b7195c3001c782 --- /dev/null +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortTemplate.asl @@ -0,0 +1,60 @@ +/** @file + SSDT Serial Template + + Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Reference(s): + - Arm Server Base Boot Requirements (SBBR), s4.2.1.8 "SPCR". + + @par Glossary: + - {template} - Data fixed up using AML Fixup APIs. +**/ + +DefinitionBlock ("SsdtSerialPortTemplate.aml", "SSDT", 2, "ARMLTD", "SERIAL", 1) { + Scope (_SB) { + // UART PL011 + Device (COM0) { // {template} + Name (_UID, 0x0) // {template} + Name (_HID, "HID0000") // {template} + Name (_CID, "CID0000") // {template} + + Method(_STA) { + Return(0xF) + } + + Name (_CRS, ResourceTemplate() { + QWordMemory ( + , // ResourceUsage + , // Decode + , // IsMinFixed + , // IsMaxFixed + , // Cacheable + ReadWrite, // ReadAndWrite + 0x0, // AddressGranularity + 0xA0000000, // AddressMinimum // {template} + 0xAFFFFFFF, // AddressMaximum // {template} + 0, // AddressTranslation + 0x10000000, // RangeLength // {template} + , // ResourceSourceIndex + , // ResourceSource + , // DescriptorName + , // MemoryRangeType + // TranslationType + ) // QWordMemory + Interrupt ( + ResourceConsumer, // ResourceUsage + Level, // EdgeLevel + ActiveHigh, // ActiveLevel + Exclusive, // Shared + , // ResourceSourceIndex + , // ResourceSource + // DescriptorName + ) { + 0xA5 // {template} + } // Interrupt + }) // Name + } // Device + } // Scope (_SB) +} -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'