From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BF74C433DB for ; Wed, 23 Dec 2020 09:15:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6498C207A4 for ; Wed, 23 Dec 2020 09:15:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6498C207A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ks0Er-0001zG-7Z for qemu-devel@archiver.kernel.org; Wed, 23 Dec 2020 04:15:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks0A5-0003jh-LV for qemu-devel@nongnu.org; Wed, 23 Dec 2020 04:10:26 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks09s-0002aA-RI for qemu-devel@nongnu.org; Wed, 23 Dec 2020 04:10:22 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4D16pW0vHzzhwn7; Wed, 23 Dec 2020 17:09:23 +0800 (CST) Received: from localhost (10.174.184.155) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Wed, 23 Dec 2020 17:09:56 +0800 From: Jiahui Cen To: Subject: [PATCH v3 8/8] acpi: Update addr_trans and _DSM in expected files Date: Wed, 23 Dec 2020 17:08:36 +0800 Message-ID: <20201223090836.9075-9-cenjiahui@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201223090836.9075-1-cenjiahui@huawei.com> References: <20201223090836.9075-1-cenjiahui@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.174.184.155] X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.191; envelope-from=cenjiahui@huawei.com; helo=szxga05-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: xieyingtai@huawei.com, Jiahui Cen , Eduardo Habkost , "Michael S. Tsirkin" , Ard Biesheuvel , Richard Henderson , Paolo Bonzini , Igor Mammedov , Laszlo Ersek , wu.wubin@huawei.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Addr_trans in _CRS is changed and a new _DSM #5 method is added. Also the expected file for pxb for ARM virt does not match the source code. Update expected DSDT files accordingly, and re-enable their testing. Full diff of changed files disassembly: diff -ru /tmp/old/tests/data/acpi/microvm/DSDT.pcie.dsl /tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl --- /tmp/old/tests/data/acpi/microvm/DSDT.pcie.dsl 2020-12-23 15:49:57.161081285 +0800 +++ /tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl 2020-12-23 15:55:11.837769953 +0800 @@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x00000BCF (3023) + * Length 0x00000BD7 (3031) * Revision 0x02 - * Checksum 0x29 + * Checksum 0x99 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) @@ -1302,9 +1302,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One) diff -ru /tmp/old/tests/data/acpi/virt/DSDT.dsl /tmp/new/tests/data/acpi/virt/DSDT.dsl --- /tmp/old/tests/data/acpi/virt/DSDT.dsl 2020-12-23 15:49:57.421095066 +0800 +++ /tmp/new/tests/data/acpi/virt/DSDT.dsl 2020-12-23 15:55:12.267792771 +0800 @@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x0000144C (5196) + * Length 0x00001454 (5204) * Revision 0x02 - * Checksum 0xF0 + * Checksum 0x60 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) @@ -1838,9 +1838,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One) diff -ru /tmp/old/tests/data/acpi/virt/DSDT.memhp.dsl /tmp/new/tests/data/acpi/virt/DSDT.memhp.dsl --- /tmp/old/tests/data/acpi/virt/DSDT.memhp.dsl 2020-12-23 15:49:57.421095066 +0800 +++ /tmp/new/tests/data/acpi/virt/DSDT.memhp.dsl 2020-12-23 15:55:12.277793302 +0800 @@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x0000199D (6557) + * Length 0x000019A5 (6565) * Revision 0x02 - * Checksum 0x11 + * Checksum 0x90 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) @@ -1840,9 +1840,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One) diff -ru /tmp/old/tests/data/acpi/virt/DSDT.numamem.dsl /tmp/new/tests/data/acpi/virt/DSDT.numamem.dsl --- /tmp/old/tests/data/acpi/virt/DSDT.numamem.dsl 2020-12-23 15:49:57.431095596 +0800 +++ /tmp/new/tests/data/acpi/virt/DSDT.numamem.dsl 2020-12-23 15:55:12.287793832 +0800 @@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x0000144C (5196) + * Length 0x00001454 (5204) * Revision 0x02 - * Checksum 0xF0 + * Checksum 0x60 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) @@ -1838,9 +1838,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One) diff -ru /tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl /tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl --- /tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl 2020-12-23 15:49:57.441096126 +0800 +++ /tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl 2020-12-23 15:55:12.287793832 +0800 @@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x00001E7A (7802) + * Length 0x00001E09 (7689) * Revision 0x02 - * Checksum 0x57 + * Checksum 0x30 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) @@ -45,32 +45,6 @@ }) } - Device (FLS0) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - - Device (FLS1) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, One) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x04000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - Device (FWCF) { Name (_HID, "QEMU0002") // _HID: Hardware ID @@ -661,16 +635,15 @@ }) } - Device (PC80) + Device (PCI0) { Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID - Name (_ADR, Zero) // _ADR: Address - Name (_CCA, One) // _CCA: Cache Coherency Attribute Name (_SEG, Zero) // _SEG: PCI Segment - Name (_BBN, 0x80) // _BBN: BIOS Bus Number - Name (_UID, 0x80) // _UID: Unique ID - Name (_STR, Unicode ("pxb Device")) // _STR: Description String + Name (_BBN, Zero) // _BBN: BIOS Bus Number + Name (_UID, Zero) // _UID: Unique ID + Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String + Name (_CCA, One) // _CCA: Cache Coherency Attribute Name (_PRT, Package (0x80) // _PRT: PCI Routing Table { Package (0x04) @@ -1789,15 +1762,41 @@ } } + Method (_CBA, 0, NotSerialized) // _CBA: Configuration Base Address + { + Return (0x0000004010000000) + } + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity - 0x0080, // Range Minimum - 0x0080, // Range Maximum + 0x0000, // Range Minimum + 0x007F, // Range Maximum 0x0000, // Translation Offset - 0x0001, // Length + 0x0080, // Length ,, ) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x00000000, // Granularity + 0x10000000, // Range Minimum + 0x3EFEFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x2EFF0000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0x0000FFFF, // Range Maximum + 0x3EFF0000, // Translation Offset + 0x00010000, // Length + ,, , TypeStatic, DenseTranslation) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000008000000000, // Range Minimum + 0x000000FFFFFFFFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000008000000000, // Length + ,, , AddressRangeMemory, TypeStatic) }) Name (SUPP, Zero) Name (CTRL, Zero) @@ -1808,8 +1807,8 @@ { CreateDWordField (Arg3, 0x04, CDW2) CreateDWordField (Arg3, 0x08, CDW3) - SUPP = CDW2 /* \_SB_.PC80._OSC.CDW2 */ - CTRL = CDW3 /* \_SB_.PC80._OSC.CDW3 */ + SUPP = CDW2 /* \_SB_.PCI0._OSC.CDW2 */ + CTRL = CDW3 /* \_SB_.PCI0._OSC.CDW3 */ CTRL &= 0x1F If ((Arg1 != One)) { @@ -1821,7 +1820,7 @@ CDW1 |= 0x10 } - CDW3 = CTRL /* \_SB_.PC80.CTRL */ + CDW3 = CTRL /* \_SB_.PCI0.CTRL */ Return (Arg3) } Else @@ -1839,9 +1838,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One) @@ -1849,17 +1853,30 @@ 0x00 // . }) } + + Device (RES0) + { + Name (_HID, "PNP0C02" /* PNP Motherboard Resources */) // _HID: Hardware ID + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000004010000000, // Range Minimum + 0x000000401FFFFFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000000010000000, // Length + ,, , AddressRangeMemory, TypeStatic) + }) + } } - Device (PCI0) + Device (PC80) { Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID - Name (_SEG, Zero) // _SEG: PCI Segment - Name (_BBN, Zero) // _BBN: BIOS Bus Number - Name (_UID, "PCI0") // _UID: Unique ID - Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String - Name (_CCA, One) // _CCA: Cache Coherency Attribute + Name (_BBN, 0x80) // _BBN: BIOS Bus Number + Name (_UID, 0x80) // _UID: Unique ID + Name (_STR, Unicode ("pxb Device")) // _STR: Description String Name (_PRT, Package (0x80) // _PRT: PCI Routing Table { Package (0x04) @@ -2978,46 +2995,16 @@ } } - Method (_CBA, 0, NotSerialized) // _CBA: Configuration Base Address - { - Return (0x0000004010000000) - } - - Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { - Return (ResourceTemplate () - { - WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, - 0x0000, // Granularity - 0x0000, // Range Minimum - 0x007F, // Range Maximum - 0x0000, // Translation Offset - 0x0080, // Length - ,, ) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x00000000, // Granularity - 0x10000000, // Range Minimum - 0x3EFEFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x2EFF0000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, - 0x00000000, // Granularity - 0x00000000, // Range Minimum - 0x0000FFFF, // Range Maximum - 0x3EFF0000, // Translation Offset - 0x00010000, // Length - ,, , TypeStatic, DenseTranslation) - QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000008000000000, // Range Minimum - 0x000000FFFFFFFFFF, // Range Maximum - 0x0000000000000000, // Translation Offset - 0x0000008000000000, // Length - ,, , AddressRangeMemory, TypeStatic) - }) - } - + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0080, // Range Minimum + 0x0080, // Range Maximum + 0x0000, // Translation Offset + 0x0001, // Length + ,, ) + }) Name (SUPP, Zero) Name (CTRL, Zero) Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities @@ -3027,8 +3014,8 @@ { CreateDWordField (Arg3, 0x04, CDW2) CreateDWordField (Arg3, 0x08, CDW3) - SUPP = CDW2 /* \_SB_.PCI0._OSC.CDW2 */ - CTRL = CDW3 /* \_SB_.PCI0._OSC.CDW3 */ + SUPP = CDW2 /* \_SB_.PC80._OSC.CDW2 */ + CTRL = CDW3 /* \_SB_.PC80._OSC.CDW3 */ CTRL &= 0x1F If ((Arg1 != One)) { @@ -3040,7 +3027,7 @@ CDW1 |= 0x10 } - CDW3 = CTRL /* \_SB_.PCI0.CTRL */ + CDW3 = CTRL /* \_SB_.PC80.CTRL */ Return (Arg3) } Else @@ -3058,9 +3045,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One) @@ -3068,21 +3060,6 @@ 0x00 // . }) } - - Device (RES0) - { - Name (_HID, "PNP0C02" /* PNP Motherboard Resources */) // _HID: Hardware ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000004010000000, // Range Minimum - 0x000000401FFFFFFF, // Range Maximum - 0x0000000000000000, // Translation Offset - 0x0000000010000000, // Length - ,, , AddressRangeMemory, TypeStatic) - }) - } } Device (\_SB.GED) Signed-off-by: Jiahui Cen --- tests/data/acpi/microvm/DSDT.pcie | Bin 3023 -> 3031 bytes tests/data/acpi/virt/DSDT | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6557 -> 6565 bytes tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7689 bytes tests/qtest/bios-tables-test-allowed-diff.h | 5 ----- 6 files changed, 5 deletions(-) diff --git a/tests/data/acpi/microvm/DSDT.pcie b/tests/data/acpi/microvm/DSDT.pcie index 4b765541e372f4ba4e25529c14acf696516c8f61..e590b98f9960025f75dd0544492d3088781406dc 100644 GIT binary patch delta 59 zcmV-B0L1^#7uOdGL{mgm*9!mu0-2Et8v;SPu_reH0Z6l70pke>HD5$iO$4ARlS&I8 R2_c{dlWGbDqyUp@3uOk*5ZC|! delta 51 zcmcaEeqNl*CDBB@WX~y=AYLc8xe#;j-a&mF##=8XjvMf-X>?thI$T+!B G_%Q%yeGTXU diff --git a/tests/data/acpi/virt/DSDT.memhp b/tests/data/acpi/virt/DSDT.memhp index 54728e2b4b8b959f3f829386f6a388ef2600e747..897648637cc6c8af47c67a9a349477c0240f833b 100644 GIT binary patch delta 60 zcmV-C0K@;CGo>>ML{mgmr5OMK0+5jk8v=lsu_qV_0!FB#K?w>7HD5$iO$4ARlSvaF S2_c{dlWGbDqyV#N6Ep_<;t(eQ delta 52 zcmZ2#JlB}ZCDBB@WX~y=AYLc8xe#;j-a&mF##=8XjvMf-X>?thI$T+!B G_%Q%yeGTXU diff --git a/tests/data/acpi/virt/DSDT.pxb b/tests/data/acpi/virt/DSDT.pxb index d5f0533a02d62bc2ae2db9b9de9484e5c06652fe..f380e6023e7fc209a43280d71bf8a91286e35b63 100644 GIT binary patch delta 127 zcmexm(`m!y66_MfDaXLTWH6CSnyKa9MD>J?Z+CF8x~&Ls_ME(mQ+{%XF#qN`!fQEL zIpUpzf;R`r$TD)6#=8XjvMkV?Y%46!sknfBauyfs5{AjsWy2VqCokhv-h7)giW5Z@ QFI?3UL1xCuuVg0x0IJI-00000 delta 259 zcmeCQ`DMf966_LECC9+P6h4tlnyK~aMD>JvLpPsb1CDqPPZwSvzaW1D14B~=j`&bd z7a-{z6f7vn#n;Bkz{mgrER_t=O&~3X*t9UBYheNE0&B5w3wL&dXbE)n4K*+@Fanw% z9OAff!F&!z-^nM0mH8cAf