Skip to content
Snippets Groups Projects
  1. Jan 08, 2022
  2. Dec 15, 2021
    • Jean-Philippe Brucker's avatar
      tests/acpi: add expected blob for VIOT test on virt machine · aed17655
      Jean-Philippe Brucker authored
      
      The VIOT blob contains the following:
      
      [000h 0000   4]                    Signature : "VIOT"    [Virtual I/O Translation Table]
      [004h 0004   4]                 Table Length : 00000058
      [008h 0008   1]                     Revision : 00
      [009h 0009   1]                     Checksum : 66
      [00Ah 0010   6]                       Oem ID : "BOCHS "
      [010h 0016   8]                 Oem Table ID : "BXPC    "
      [018h 0024   4]                 Oem Revision : 00000001
      [01Ch 0028   4]              Asl Compiler ID : "BXPC"
      [020h 0032   4]        Asl Compiler Revision : 00000001
      
      [024h 0036   2]                   Node count : 0002
      [026h 0038   2]                  Node offset : 0030
      [028h 0040   8]                     Reserved : 0000000000000000
      
      [030h 0048   1]                         Type : 03 [VirtIO-PCI IOMMU]
      [031h 0049   1]                     Reserved : 00
      [032h 0050   2]                       Length : 0010
      
      [034h 0052   2]                  PCI Segment : 0000
      [036h 0054   2]               PCI BDF number : 0008
      [038h 0056   8]                     Reserved : 0000000000000000
      
      [040h 0064   1]                         Type : 01 [PCI Range]
      [041h 0065   1]                     Reserved : 00
      [042h 0066   2]                       Length : 0018
      
      [044h 0068   4]               Endpoint start : 00000000
      [048h 0072   2]            PCI Segment start : 0000
      [04Ah 0074   2]              PCI Segment end : 0000
      [04Ch 0076   2]                PCI BDF start : 0000
      [04Eh 0078   2]                  PCI BDF end : 00FF
      [050h 0080   2]                  Output node : 0030
      [052h 0082   6]                     Reserved : 000000000000
      
      Acked-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Message-id: 20211210170415.583179-9-jean-philippe@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      aed17655
    • Jean-Philippe Brucker's avatar
      tests/acpi: add expected blobs for VIOT test on q35 machine · cf7a3488
      Jean-Philippe Brucker authored
      
      Add expected blobs of the VIOT and DSDT table for the VIOT test on the
      q35 machine.
      
      Since the test instantiates a virtio device and two PCIe expander
      bridges, DSDT.viot has more blocks than the base DSDT.
      
      The VIOT table generated for the q35 test is:
      
      [000h 0000   4]                    Signature : "VIOT"    [Virtual I/O Translation Table]
      [004h 0004   4]                 Table Length : 00000070
      [008h 0008   1]                     Revision : 00
      [009h 0009   1]                     Checksum : 3D
      [00Ah 0010   6]                       Oem ID : "BOCHS "
      [010h 0016   8]                 Oem Table ID : "BXPC    "
      [018h 0024   4]                 Oem Revision : 00000001
      [01Ch 0028   4]              Asl Compiler ID : "BXPC"
      [020h 0032   4]        Asl Compiler Revision : 00000001
      
      [024h 0036   2]                   Node count : 0003
      [026h 0038   2]                  Node offset : 0030
      [028h 0040   8]                     Reserved : 0000000000000000
      
      [030h 0048   1]                         Type : 03 [VirtIO-PCI IOMMU]
      [031h 0049   1]                     Reserved : 00
      [032h 0050   2]                       Length : 0010
      
      [034h 0052   2]                  PCI Segment : 0000
      [036h 0054   2]               PCI BDF number : 0010
      [038h 0056   8]                     Reserved : 0000000000000000
      
      [040h 0064   1]                         Type : 01 [PCI Range]
      [041h 0065   1]                     Reserved : 00
      [042h 0066   2]                       Length : 0018
      
      [044h 0068   4]               Endpoint start : 00003000
      [048h 0072   2]            PCI Segment start : 0000
      [04Ah 0074   2]              PCI Segment end : 0000
      [04Ch 0076   2]                PCI BDF start : 3000
      [04Eh 0078   2]                  PCI BDF end : 30FF
      [050h 0080   2]                  Output node : 0030
      [052h 0082   6]                     Reserved : 000000000000
      
      [058h 0088   1]                         Type : 01 [PCI Range]
      [059h 0089   1]                     Reserved : 00
      [05Ah 0090   2]                       Length : 0018
      
      [05Ch 0092   4]               Endpoint start : 00001000
      [060h 0096   2]            PCI Segment start : 0000
      [062h 0098   2]              PCI Segment end : 0000
      [064h 0100   2]                PCI BDF start : 1000
      [066h 0102   2]                  PCI BDF end : 10FF
      [068h 0104   2]                  Output node : 0030
      [06Ah 0106   6]                     Reserved : 000000000000
      
      And the DSDT diff is:
      
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/q35/DSDT, Fri Dec 10 15:03:08 2021
      + * Disassembly of /tmp/aml-H9Y5D1, Fri Dec 10 15:02:27 2021
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00002061 (8289)
      + *     Length           0x000024B6 (9398)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0xFA
      + *     Checksum         0xA7
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPC    "
        *     OEM Revision     0x00000001 (1)
      @@ -3114,6 +3114,339 @@
               }
           }
      
      +    Scope (\_SB)
      +    {
      +        Device (PC30)
      +        {
      +            Name (_UID, 0x30)  // _UID: Unique ID
      +            Name (_BBN, 0x30)  // _BBN: BIOS Bus Number
      +            Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
      +            Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
      +            Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
      +            {
      +                CreateDWordField (Arg3, Zero, CDW1)
      +                If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
      +                {
      +                    CreateDWordField (Arg3, 0x04, CDW2)
      +                    CreateDWordField (Arg3, 0x08, CDW3)
      +                    Local0 = CDW3 /* \_SB_.PC30._OSC.CDW3 */
      +                    Local0 &= 0x1F
      +                    If ((Arg1 != One))
      +                    {
      +                        CDW1 |= 0x08
      +                    }
      +
      +                    If ((CDW3 != Local0))
      +                    {
      +                        CDW1 |= 0x10
      +                    }
      +
      +                    CDW3 = Local0
      +                }
      +                Else
      +                {
      +                    CDW1 |= 0x04
      +                }
      +
      +                Return (Arg3)
      +            }
      +
      +            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
      +            {
      +                Local0 = Package (0x80){}
      +                Local1 = Zero
      +                While ((Local1 < 0x80))
      +                {
      +                    Local2 = (Local1 >> 0x02)
      +                    Local3 = ((Local1 + Local2) & 0x03)
      +                    If ((Local3 == Zero))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKD,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == One))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKA,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x02))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKB,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x03))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKC,
      +                                Zero
      +                            }
      +                    }
      +
      +                    Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF)
      +                    Local4 [One] = (Local1 & 0x03)
      +                    Local0 [Local1] = Local4
      +                    Local1++
      +                }
      +
      +                Return (Local0)
      +            }
      +
      +            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      +            {
      +                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
      +                    0x0000,             // Granularity
      +                    0x0030,             // Range Minimum
      +                    0x0030,             // Range Maximum
      +                    0x0000,             // Translation Offset
      +                    0x0001,             // Length
      +                    ,, )
      +            })
      +        }
      +    }
      +
      +    Scope (\_SB)
      +    {
      +        Device (PC20)
      +        {
      +            Name (_UID, 0x20)  // _UID: Unique ID
      +            Name (_BBN, 0x20)  // _BBN: BIOS Bus Number
      +            Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
      +            Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
      +            Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
      +            {
      +                CreateDWordField (Arg3, Zero, CDW1)
      +                If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
      +                {
      +                    CreateDWordField (Arg3, 0x04, CDW2)
      +                    CreateDWordField (Arg3, 0x08, CDW3)
      +                    Local0 = CDW3 /* \_SB_.PC20._OSC.CDW3 */
      +                    Local0 &= 0x1F
      +                    If ((Arg1 != One))
      +                    {
      +                        CDW1 |= 0x08
      +                    }
      +
      +                    If ((CDW3 != Local0))
      +                    {
      +                        CDW1 |= 0x10
      +                    }
      +
      +                    CDW3 = Local0
      +                }
      +                Else
      +                {
      +                    CDW1 |= 0x04
      +                }
      +
      +                Return (Arg3)
      +            }
      +
      +            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
      +            {
      +                Local0 = Package (0x80){}
      +                Local1 = Zero
      +                While ((Local1 < 0x80))
      +                {
      +                    Local2 = (Local1 >> 0x02)
      +                    Local3 = ((Local1 + Local2) & 0x03)
      +                    If ((Local3 == Zero))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKD,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == One))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKA,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x02))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKB,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x03))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKC,
      +                                Zero
      +                            }
      +                    }
      +
      +                    Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF)
      +                    Local4 [One] = (Local1 & 0x03)
      +                    Local0 [Local1] = Local4
      +                    Local1++
      +                }
      +
      +                Return (Local0)
      +            }
      +
      +            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      +            {
      +                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
      +                    0x0000,             // Granularity
      +                    0x0020,             // Range Minimum
      +                    0x0020,             // Range Maximum
      +                    0x0000,             // Translation Offset
      +                    0x0001,             // Length
      +                    ,, )
      +            })
      +        }
      +    }
      +
      +    Scope (\_SB)
      +    {
      +        Device (PC10)
      +        {
      +            Name (_UID, 0x10)  // _UID: Unique ID
      +            Name (_BBN, 0x10)  // _BBN: BIOS Bus Number
      +            Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */)  // _HID: Hardware ID
      +            Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
      +            Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
      +            {
      +                CreateDWordField (Arg3, Zero, CDW1)
      +                If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
      +                {
      +                    CreateDWordField (Arg3, 0x04, CDW2)
      +                    CreateDWordField (Arg3, 0x08, CDW3)
      +                    Local0 = CDW3 /* \_SB_.PC10._OSC.CDW3 */
      +                    Local0 &= 0x1F
      +                    If ((Arg1 != One))
      +                    {
      +                        CDW1 |= 0x08
      +                    }
      +
      +                    If ((CDW3 != Local0))
      +                    {
      +                        CDW1 |= 0x10
      +                    }
      +
      +                    CDW3 = Local0
      +                }
      +                Else
      +                {
      +                    CDW1 |= 0x04
      +                }
      +
      +                Return (Arg3)
      +            }
      +
      +            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
      +            {
      +                Local0 = Package (0x80){}
      +                Local1 = Zero
      +                While ((Local1 < 0x80))
      +                {
      +                    Local2 = (Local1 >> 0x02)
      +                    Local3 = ((Local1 + Local2) & 0x03)
      +                    If ((Local3 == Zero))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKD,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == One))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKA,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x02))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKB,
      +                                Zero
      +                            }
      +                    }
      +
      +                    If ((Local3 == 0x03))
      +                    {
      +                        Local4 = Package (0x04)
      +                            {
      +                                Zero,
      +                                Zero,
      +                                LNKC,
      +                                Zero
      +                            }
      +                    }
      +
      +                    Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF)
      +                    Local4 [One] = (Local1 & 0x03)
      +                    Local0 [Local1] = Local4
      +                    Local1++
      +                }
      +
      +                Return (Local0)
      +            }
      +
      +            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      +            {
      +                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
      +                    0x0000,             // Granularity
      +                    0x0010,             // Range Minimum
      +                    0x0010,             // Range Maximum
      +                    0x0000,             // Translation Offset
      +                    0x0001,             // Length
      +                    ,, )
      +            })
      +        }
      +    }
      +
           Scope (\_SB.PCI0)
           {
               Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      @@ -3121,9 +3454,9 @@
                   WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                       0x0000,             // Granularity
                       0x0000,             // Range Minimum
      -                0x00FF,             // Range Maximum
      +                0x000F,             // Range Maximum
                       0x0000,             // Translation Offset
      -                0x0100,             // Length
      +                0x0010,             // Length
                       ,, )
                   IO (Decode16,
                       0x0CF8,             // Range Minimum
      @@ -3278,6 +3611,26 @@
                       }
                   }
      
      +            Device (S10)
      +            {
      +                Name (_ADR, 0x00020000)  // _ADR: Address
      +            }
      +
      +            Device (S18)
      +            {
      +                Name (_ADR, 0x00030000)  // _ADR: Address
      +            }
      +
      +            Device (S20)
      +            {
      +                Name (_ADR, 0x00040000)  // _ADR: Address
      +            }
      +
      +            Device (S28)
      +            {
      +                Name (_ADR, 0x00050000)  // _ADR: Address
      +            }
      +
                   Method (PCNT, 0, NotSerialized)
                   {
                   }
      
      Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Message-id: 20211210170415.583179-8-jean-philippe@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      cf7a3488
    • Jean-Philippe Brucker's avatar
      tests/acpi: allow updates of VIOT expected data files · 641f32f6
      Jean-Philippe Brucker authored
      
      Create empty data files and allow updates for the upcoming VIOT tests.
      
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
      Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
      Message-id: 20211210170415.583179-6-jean-philippe@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      641f32f6
  3. Nov 15, 2021
    • Igor Mammedov's avatar
      tests: bios-tables-test update expected blobs · 7e6055c9
      Igor Mammedov authored
      
      The changes are the result of
              'hw/i386/acpi-build: Deny control on PCIe Native Hot-Plug in _OSC'
      which hides PCIE hotplug bit in host-bridge _OSC
      
      Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
                   {
                       CreateDWordField (Arg3, Zero, CDW1)
                       If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
                       {
                           CreateDWordField (Arg3, 0x04, CDW2)
                           CreateDWordField (Arg3, 0x08, CDW3)
                           Local0 = CDW3 /* \_SB_.PCI0._OSC.CDW3 */
      -                    Local0 &= 0x1F
      +                    Local0 &= 0x1E
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20211112110857.3116853-6-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      7e6055c9
  4. Oct 21, 2021
  5. Oct 20, 2021
    • Eric Auger's avatar
      tests/acpi: Generate reference blob for IORT rev E.b · 47432863
      Eric Auger authored
      
      Re-generate reference blobs with rebuild-expected-aml.sh.
      
      Differences reported by "make check V=1" are listed below
      (IORT.numamem). Differences for other variants are similar.
      
       /*
        * Intel ACPI Component Architecture
        * AML/ASL+ Disassembler version 20180629 (64-bit version)
        * Copyright (c) 2000 - 2018 Intel Corporation
        *
      - * Disassembly of tests/data/acpi/virt/IORT.numamem, Thu Oct 14 06:13:19 2021
      + * Disassembly of /tmp/aml-K8L9A1, Thu Oct 14 06:13:19 2021
        *
        * ACPI Data Table [IORT]
        *
        * Format: [HexOffset DecimalOffset ByteLength]  FieldName : FieldValue
        */
      
       [000h 0000   4]                    Signature : "IORT"    [IO Remapping Table]
      -[004h 0004   4]                 Table Length : 0000007C
      -[008h 0008   1]                     Revision : 00
      -[009h 0009   1]                     Checksum : 07
      +[004h 0004   4]                 Table Length : 00000080
      +[008h 0008   1]                     Revision : 03
      +[009h 0009   1]                     Checksum : B3
       [00Ah 0010   6]                       Oem ID : "BOCHS "
       [010h 0016   8]                 Oem Table ID : "BXPC    "
       [018h 0024   4]                 Oem Revision : 00000001
       [01Ch 0028   4]              Asl Compiler ID : "BXPC"
       [020h 0032   4]        Asl Compiler Revision : 00000001
      
       [024h 0036   4]                   Node Count : 00000002
       [028h 0040   4]                  Node Offset : 00000030
       [02Ch 0044   4]                     Reserved : 00000000
      
       [030h 0048   1]                         Type : 00
       [031h 0049   2]                       Length : 0018
      -[033h 0051   1]                     Revision : 00
      +[033h 0051   1]                     Revision : 01
       [034h 0052   4]                     Reserved : 00000000
       [038h 0056   4]                Mapping Count : 00000000
       [03Ch 0060   4]               Mapping Offset : 00000000
      
       [040h 0064   4]                     ItsCount : 00000001
       [044h 0068   4]                  Identifiers : 00000000
      
       [048h 0072   1]                         Type : 02
      -[049h 0073   2]                       Length : 0034
      -[04Bh 0075   1]                     Revision : 00
      -[04Ch 0076   4]                     Reserved : 00000000
      +[049h 0073   2]                       Length : 0038
      +[04Bh 0075   1]                     Revision : 03
      +[04Ch 0076   4]                     Reserved : 00000001
       [050h 0080   4]                Mapping Count : 00000001
      -[054h 0084   4]               Mapping Offset : 00000020
      +[054h 0084   4]               Mapping Offset : 00000024
      
       [058h 0088   8]            Memory Properties : [IORT Memory Access Properties]
       [058h 0088   4]              Cache Coherency : 00000001
       [05Ch 0092   1]        Hints (decoded below) : 00
                                          Transient : 0
                                     Write Allocate : 0
                                      Read Allocate : 0
                                           Override : 0
       [05Dh 0093   2]                     Reserved : 0000
       [05Fh 0095   1] Memory Flags (decoded below) : 03
                                          Coherency : 1
                                   Device Attribute : 1
       [060h 0096   4]                ATS Attribute : 00000000
       [064h 0100   4]           PCI Segment Number : 00000000
      -[068h 0104   1]            Memory Size Limit : 00
      +[068h 0104   1]            Memory Size Limit : 40
       [069h 0105   3]                     Reserved : 000000
      
      -[068h 0104   4]                   Input base : 00000000
      -[06Ch 0108   4]                     ID Count : 0000FFFF
      -[070h 0112   4]                  Output Base : 00000000
      -[074h 0116   4]             Output Reference : 00000030
      -[078h 0120   4]        Flags (decoded below) : 00000000
      +[06Ch 0108   4]                   Input base : 00000000
      +[070h 0112   4]                     ID Count : 0000FFFF
      +[074h 0116   4]                  Output Base : 00000000
      +[078h 0120   4]             Output Reference : 00000030
      +[07Ch 0124   4]        Flags (decoded below) : 00000000
                                     Single Mapping : 0
      
      -Raw Table Data: Length 124 (0x7C)
      +Raw Table Data: Length 128 (0x80)
      
      -    0000: 49 4F 52 54 7C 00 00 00 00 07 42 4F 43 48 53 20  // IORT|.....BOCHS
      +    0000: 49 4F 52 54 80 00 00 00 03 B3 42 4F 43 48 53 20  // IORT......BOCHS
           0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
           0020: 01 00 00 00 02 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
      -    0030: 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
      -    0040: 01 00 00 00 00 00 00 00 02 34 00 00 00 00 00 00  // .........4......
      -    0050: 01 00 00 00 20 00 00 00 01 00 00 00 00 00 00 03  // .... ...........
      -    0060: 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00  // ................
      -    0070: 00 00 00 00 30 00 00 00 00 00 00 00              // ....0.......
      +    0030: 00 18 00 01 00 00 00 00 00 00 00 00 00 00 00 00  // ................
      +    0040: 01 00 00 00 00 00 00 00 02 38 00 03 01 00 00 00  // .........8......
      +    0050: 01 00 00 00 24 00 00 00 01 00 00 00 00 00 00 03  // ....$...........
      +    0060: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00  // ........@.......
      +    0070: FF FF 00 00 00 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
      **
      
      Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <20211014115643.756977-4-eric.auger@redhat.com>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      47432863
    • Ani Sinha's avatar
      tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge test · a8339e07
      Ani Sinha authored
      
      We added a new unit test for testing acpi hotplug on multifunction bridges in
      q35 machines. Here, we update the DSDT table gloden master blob for this unit
      test.
      
      The test adds the following devices to qemu and then checks the changes
      introduced in the DSDT table due to the addition of the following devices:
      
      (a) a multifunction bridge device
      (b) a bridge device with function 1
      (c) a non-bridge device with function 2
      
      In the DSDT table, we should see AML hotplug descriptions for (a) and (b).
      For (a) we should find a hotplug AML description for function 0.
      
      Following is the ASL diff between the original DSDT table and the modified DSDT
      table due to the unit test. We see that multifunction bridge on bus 2 and single
      function bridge on bus 3 function 1 are described, not the non-bridge balloon
      device on bus 4, function 2.
      
      @@ -1,30 +1,30 @@
       /*
        * Intel ACPI Component Architecture
        * AML/ASL+ Disassembler version 20190509 (64-bit version)
        * Copyright (c) 2000 - 2019 Intel Corporation
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/q35/DSDT, Thu Oct  7 18:29:19 2021
      + * Disassembly of /tmp/aml-C7JCA1, Thu Oct  7 18:29:19 2021
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00002061 (8289)
      + *     Length           0x00002187 (8583)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0xF9
      + *     Checksum         0x8D
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPC    "
        *     OEM Revision     0x00000001 (1)
        *     Compiler ID      "BXPC"
        *     Compiler Version 0x00000001 (1)
        */
       DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
       {
           Scope (\)
           {
               OperationRegion (DBG, SystemIO, 0x0402, One)
               Field (DBG, ByteAcc, NoLock, Preserve)
               {
                   DBGB,   8
               }
      
      @@ -3265,23 +3265,95 @@
                       Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
                       {
                           Return (Zero)
                       }
      
                       Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
                       {
                           Return (Zero)
                       }
      
                       Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                       {
                           Return (Zero)
                       }
                   }
      
      +            Device (S10)
      +            {
      +                Name (_ADR, 0x00020000)  // _ADR: Address
      +                Name (BSEL, One)
      +                Device (S00)
      +                {
      +                    Name (_SUN, Zero)  // _SUN: Slot User Number
      +                    Name (_ADR, Zero)  // _ADR: Address
      +                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device, x=0-9
      +                    {
      +                        PCEJ (BSEL, _SUN)
      +                    }
      +
      +                    Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
      +                    {
      +                        Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                    }
      +                }
      +
      +                Method (DVNT, 2, NotSerialized)
      +                {
      +                    If ((Arg0 & One))
      +                    {
      +                        Notify (S00, Arg1)
      +                    }
      +                }
      +
      +                Method (PCNT, 0, NotSerialized)
      +                {
      +                    BNUM = One
      +                    DVNT (PCIU, One)
      +                    DVNT (PCID, 0x03)
      +                }
      +            }
      +
      +            Device (S19)
      +            {
      +                Name (_ADR, 0x00030001)  // _ADR: Address
      +                Name (BSEL, Zero)
      +                Device (S00)
      +                {
      +                    Name (_SUN, Zero)  // _SUN: Slot User Number
      +                    Name (_ADR, Zero)  // _ADR: Address
      +                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device, x=0-9
      +                    {
      +                        PCEJ (BSEL, _SUN)
      +                    }
      +
      +                    Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
      +                    {
      +                        Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                    }
      +                }
      +
      +                Method (DVNT, 2, NotSerialized)
      +                {
      +                    If ((Arg0 & One))
      +                    {
      +                        Notify (S00, Arg1)
      +                    }
      +                }
      +
      +                Method (PCNT, 0, NotSerialized)
      +                {
      +                    BNUM = Zero
      +                    DVNT (PCIU, One)
      +                    DVNT (PCID, 0x03)
      +                }
      +            }
      +
                   Method (PCNT, 0, NotSerialized)
                   {
      +                ^S19.PCNT ()
      +                ^S10.PCNT ()
                   }
               }
           }
       }
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Message-Id: <20211007135750.1277213-4-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      a8339e07
    • Ani Sinha's avatar
      tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT table blob · 6dcb1cc9
      Ani Sinha authored
      
      We are adding a new unit test to cover the acpi hotplug support in q35 for
      multi-function bridges. This test uses a new table DSDT.multi-bridge.
      We need to allow changes in DSDT acpi table for addition of this new
      unit test.
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Message-Id: <20211007135750.1277213-2-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      6dcb1cc9
    • Michael S. Tsirkin's avatar
      rebuild-expected-aml.sh: allow partial target list · 71352aa9
      Michael S. Tsirkin authored
      
      Only rebuild AML for configured targets.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      71352aa9
    • Igor Mammedov's avatar
      tests: acpi: update expected blobs · ef422a14
      Igor Mammedov authored
      
      DSDT:
      +            Device (S10)
      +            {
      +                Name (_ADR, 0x00020000)  // _ADR: Address
      +            }
      
      New IVRS table:
      
      [000h 0000   4]                    Signature : "IVRS"    [I/O Virtualization Reporting Structure]
      [004h 0004   4]                 Table Length : 00000068
      [008h 0008   1]                     Revision : 01
      [009h 0009   1]                     Checksum : 43
      [00Ah 0010   6]                       Oem ID : "BOCHS "
      [010h 0016   8]                 Oem Table ID : "BXPC    "
      [018h 0024   4]                 Oem Revision : 00000001
      [01Ch 0028   4]              Asl Compiler ID : "BXPC"
      [020h 0032   4]        Asl Compiler Revision : 00000001
      
      [024h 0036   4]          Virtualization Info : 00002800
      [028h 0040   8]                     Reserved : 0000000000000000
      
      [030h 0048   1]                Subtable Type : 10 [Hardware Definition Block]
      [031h 0049   1]                        Flags : D1
      [032h 0050   2]                       Length : 0038
      [034h 0052   2]                     DeviceId : 0010
      
      [036h 0054   2]            Capability Offset : 0040
      [038h 0056   8]                 Base Address : 00000000FED80000
      [040h 0064   2]            PCI Segment Group : 0000
      [042h 0066   2]          Virtualization Info : 0000
      [044h 0068   4]                     Reserved : 00000044
      
      [048h 0072   1]                   Entry Type : 02
      [049h 0073   2]                    Device ID : 0000
      [04Bh 0075   1]                 Data Setting : 00
      
      [04Ch 0076   1]                   Entry Type : 02
      [04Dh 0077   2]                    Device ID : 0008
      [04Fh 0079   1]                 Data Setting : 00
      
      [050h 0080   1]                   Entry Type : 02
      [051h 0081   2]                    Device ID : 0010
      [053h 0083   1]                 Data Setting : 00
      
      [054h 0084   1]                   Entry Type : 02
      [055h 0085   2]                    Device ID : 00F8
      [057h 0087   1]                 Data Setting : 00
      
      [058h 0088   1]                   Entry Type : 02
      [059h 0089   2]                    Device ID : 00FA
      [05Bh 0091   1]                 Data Setting : 00
      
      [05Ch 0092   1]                   Entry Type : 02
      [05Dh 0093   2]                    Device ID : 00FB
      [05Fh 0095   1]                 Data Setting : 00
      
      [060h 0096   1]                   Entry Type : 48
      [061h 0097   2]                    Device ID : 0000
      [063h 0099   1]                 Data Setting : 00
      [064h 0100   1]                       Handle : 00
      [065h 0101   2]        Source Used Device ID : 00A0
      [067h 0103   1]                      Variety : 01
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210902113551.461632-12-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ef422a14
    • Igor Mammedov's avatar
      tests: acpi: whitelist expected blobs for new acpi/q35/ivrs testcase · c5a7baad
      Igor Mammedov authored
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210902113551.461632-10-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c5a7baad
    • Igor Mammedov's avatar
      tests: acpi: add expected blob for DMAR table · 44d3bdd8
      Igor Mammedov authored
      
      [000h 0000   4]                    Signature : "DMAR"    [DMA Remapping table]
      [004h 0004   4]                 Table Length : 00000078
      [008h 0008   1]                     Revision : 01
      [009h 0009   1]                     Checksum : 15
      [00Ah 0010   6]                       Oem ID : "BOCHS "
      [010h 0016   8]                 Oem Table ID : "BXPC    "
      [018h 0024   4]                 Oem Revision : 00000001
      [01Ch 0028   4]              Asl Compiler ID : "BXPC"
      [020h 0032   4]        Asl Compiler Revision : 00000001
      
      [024h 0036   1]           Host Address Width : 26
      [025h 0037   1]                        Flags : 01
      [026h 0038  10]                     Reserved : 00 00 00 00 00 00 00 00 00 00
      
      [030h 0048   2]                Subtable Type : 0000 [Hardware Unit Definition]
      [032h 0050   2]                       Length : 0040
      
      [034h 0052   1]                        Flags : 00
      [035h 0053   1]                     Reserved : 00
      [036h 0054   2]           PCI Segment Number : 0000
      [038h 0056   8]        Register Base Address : 00000000FED90000
      
      [040h 0064   1]            Device Scope Type : 03 [IOAPIC Device]
      [041h 0065   1]                 Entry Length : 08
      [042h 0066   2]                     Reserved : 0000
      [044h 0068   1]               Enumeration ID : 00
      [045h 0069   1]               PCI Bus Number : FF
      
      [046h 0070   2]                     PCI Path : 00,00
      
      [048h 0072   1]            Device Scope Type : 01 [PCI Endpoint Device]
      [049h 0073   1]                 Entry Length : 08
      [04Ah 0074   2]                     Reserved : 0000
      [04Ch 0076   1]               Enumeration ID : 00
      [04Dh 0077   1]               PCI Bus Number : 00
      
      [04Eh 0078   2]                     PCI Path : 00,00
      
      [050h 0080   1]            Device Scope Type : 01 [PCI Endpoint Device]
      [051h 0081   1]                 Entry Length : 08
      [052h 0082   2]                     Reserved : 0000
      [054h 0084   1]               Enumeration ID : 00
      [055h 0085   1]               PCI Bus Number : 00
      
      [056h 0086   2]                     PCI Path : 01,00
      
      [058h 0088   1]            Device Scope Type : 01 [PCI Endpoint Device]
      [059h 0089   1]                 Entry Length : 08
      [05Ah 0090   2]                     Reserved : 0000
      [05Ch 0092   1]               Enumeration ID : 00
      [05Dh 0093   1]               PCI Bus Number : 00
      
      [05Eh 0094   2]                     PCI Path : 1F,00
      
      [060h 0096   1]            Device Scope Type : 01 [PCI Endpoint Device]
      [061h 0097   1]                 Entry Length : 08
      [062h 0098   2]                     Reserved : 0000
      [064h 0100   1]               Enumeration ID : 00
      [065h 0101   1]               PCI Bus Number : 00
      
      [066h 0102   2]                     PCI Path : 1F,02
      
      [068h 0104   1]            Device Scope Type : 01 [PCI Endpoint Device]
      [069h 0105   1]                 Entry Length : 08
      [06Ah 0106   2]                     Reserved : 0000
      [06Ch 0108   1]               Enumeration ID : 00
      [06Dh 0109   1]               PCI Bus Number : 00
      
      [06Eh 0110   2]                     PCI Path : 1F,03
      
      [070h 0112   2]                Subtable Type : 0002 [Root Port ATS Capability]
      [072h 0114   2]                       Length : 0008
      
      [074h 0116   1]                        Flags : 01
      [075h 0117   1]                     Reserved : 00
      [076h 0118   2]           PCI Segment Number : 0000
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210902113551.461632-9-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      44d3bdd8
    • Igor Mammedov's avatar
      tests: acpi: whitelist new expected table tests/data/acpi/q35/DMAR.dmar · f6826ac4
      Igor Mammedov authored
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210902113551.461632-7-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      f6826ac4
    • Igor Mammedov's avatar
      tests: acpi: update expected tables blobs · b59a8984
      Igor Mammedov authored
      
      Update adds CPU entries to MADT/SRAT/FACP and DSDT to cover 288 CPUs.
      Notable changes are that CPUs with APIC ID 255 and higher
      use 'Processor Local x2APIC Affinity' structure in SRAT and
      "Device" element in DSDT.
      
      FACP:
      -                 Use APIC Cluster Model (V4) : 0
      +                 Use APIC Cluster Model (V4) : 1
      
      SRAT:
      ...
      +[1010h 4112   1]                Subtable Type : 00 [Processor Local APIC/SAPIC Affinity]
      +[1011h 4113   1]                       Length : 10
      +
      +[1012h 4114   1]      Proximity Domain Low(8) : 00
      +[1013h 4115   1]                      Apic ID : FE
      +[1014h 4116   4]        Flags (decoded below) : 00000001
      +                                     Enabled : 1
      +[1018h 4120   1]              Local Sapic EID : 00
      +[1019h 4121   3]    Proximity Domain High(24) : 000000
      +[101Ch 4124   4]                 Clock Domain : 00000000
      +
      +[1020h 4128   1]                Subtable Type : 02 [Processor Local x2APIC Affinity]
      +[1021h 4129   1]                       Length : 18
      +
      +[1022h 4130   2]                    Reserved1 : 0000
      +[1024h 4132   4]             Proximity Domain : 00000001
      +[1028h 4136   4]                      Apic ID : 000000FF
      +[102Ch 4140   4]        Flags (decoded below) : 00000001
      +                                     Enabled : 1
      +[1030h 4144   4]                 Clock Domain : 00000000
      +[1034h 4148   4]                    Reserved2 : 00000000
      
      ...
      
      +[1320h 4896   1]                Subtable Type : 02 [Processor Local x2APIC Affinity]
      +[1321h 4897   1]                       Length : 18
      +
      +[1322h 4898   2]                    Reserved1 : 0000
      +[1324h 4900   4]             Proximity Domain : 00000001
      +[1328h 4904   4]                      Apic ID : 0000011F
      +[132Ch 4908   4]        Flags (decoded below) : 00000001
      +                                     Enabled : 1
      +[1330h 4912   4]                 Clock Domain : 00000000
      +[1334h 4916   4]                    Reserved2 : 00000000
      
      DSDT:
      
      ...
      +            Processor (C0FE, 0xFE, 0x00000000, 0x00)
      +            {
      ...
      +            }
      +
      +            Device (C0FF)
      +            {
      +                Name (_HID, "ACPI0007" /* Processor Device */)  // _HID: Hardware ID
      +                Name (_UID, 0xFF)  // _UID: Unique ID
      ...
      +            }
      
      +            Device (C11F)
      +            {
      +                Name (_HID, "ACPI0007" /* Processor Device */)  // _HID: Hardware ID
      +                Name (_UID, 0x011F)  // _UID: Unique ID
      ...
      +            }
      
      APIC:
      +[034h 0052   1]                Subtable Type : 00 [Processor Local APIC]
      +[035h 0053   1]                       Length : 08
      +[036h 0054   1]                 Processor ID : 01
      +[037h 0055   1]                Local Apic ID : 01
      +[038h 0056   4]        Flags (decoded below) : 00000000
      +                           Processor Enabled : 0
      
      ...
      
      +[81Ch 2076   1]                Subtable Type : 00 [Processor Local APIC]
      +[81Dh 2077   1]                       Length : 08
      +[81Eh 2078   1]                 Processor ID : FE
      +[81Fh 2079   1]                Local Apic ID : FE
      +[820h 2080   4]        Flags (decoded below) : 00000000
      +                           Processor Enabled : 0
      +
      +[824h 2084   1]                Subtable Type : 09 [Processor Local x2APIC]
      +[825h 2085   1]                       Length : 10
      +[826h 2086   2]                     Reserved : 0000
      +[828h 2088   4]          Processor x2Apic ID : 000000FF
      +[82Ch 2092   4]        Flags (decoded below) : 00000000
      +                           Processor Enabled : 0
      +[830h 2096   4]                Processor UID : 000000FF
      
      ...
      
      +[A24h 2596   1]                Subtable Type : 09 [Processor Local x2APIC]
      +[A25h 2597   1]                       Length : 10
      +[A26h 2598   2]                     Reserved : 0000
      +[A28h 2600   4]          Processor x2Apic ID : 0000011F
      +[A2Ch 2604   4]        Flags (decoded below) : 00000000
      +                           Processor Enabled : 0
      +[A30h 2608   4]                Processor UID : 0000011F
      +
      +[A34h 2612   1]                Subtable Type : 01 [I/O APIC]
      +[A35h 2613   1]                       Length : 0C
      +[A36h 2614   1]                  I/O Apic ID : 00
      +[A37h 2615   1]                     Reserved : 00
      +[A38h 2616   4]                      Address : FEC00000
      +[A3Ch 2620   4]                    Interrupt : 00000000
      +
      +[A40h 2624   1]                Subtable Type : 02 [Interrupt Source Override]
      +[A41h 2625   1]                       Length : 0A
      +[A42h 2626   1]                          Bus : 00
      +[A43h 2627   1]                       Source : 00
      +[A44h 2628   4]                    Interrupt : 00000002
      +[A48h 2632   2]        Flags (decoded below) : 0000
                                           Polarity : 0
                                       Trigger Mode : 0
      
      -[04Ah 0074   1]                Subtable Type : 02 [Interrupt Source Override]
      -[04Bh 0075   1]                       Length : 0A
      -[04Ch 0076   1]                          Bus : 00
      -[04Dh 0077   1]                       Source : 05
      -[04Eh 0078   4]                    Interrupt : 00000005
      -[052h 0082   2]        Flags (decoded below) : 000D
      +[A4Ah 2634   1]                Subtable Type : 02 [Interrupt Source Override]
      +[A4Bh 2635   1]                       Length : 0A
      +[A4Ch 2636   1]                          Bus : 00
      +[A4Dh 2637   1]                       Source : 05
      +[A4Eh 2638   4]                    Interrupt : 00000005
      +[A52h 2642   2]        Flags (decoded below) : 000D
                                           Polarity : 1
                                       Trigger Mode : 3
      
      -[054h 0084   1]                Subtable Type : 02 [Interrupt Source Override]
      -[055h 0085   1]                       Length : 0A
      -[056h 0086   1]                          Bus : 00
      -[057h 0087   1]                       Source : 09
      -[058h 0088   4]                    Interrupt : 00000009
      -[05Ch 0092   2]        Flags (decoded below) : 000D
      +[A54h 2644   1]                Subtable Type : 02 [Interrupt Source Override]
      +[A55h 2645   1]                       Length : 0A
      +[A56h 2646   1]                          Bus : 00
      +[A57h 2647   1]                       Source : 09
      +[A58h 2648   4]                    Interrupt : 00000009
      +[A5Ch 2652   2]        Flags (decoded below) : 000D
                                           Polarity : 1
                                       Trigger Mode : 3
      
      -[05Eh 0094   1]                Subtable Type : 02 [Interrupt Source Override]
      -[05Fh 0095   1]                       Length : 0A
      -[060h 0096   1]                          Bus : 00
      -[061h 0097   1]                       Source : 0A
      -[062h 0098   4]                    Interrupt : 0000000A
      -[066h 0102   2]        Flags (decoded below) : 000D
      +[A5Eh 2654   1]                Subtable Type : 02 [Interrupt Source Override]
      +[A5Fh 2655   1]                       Length : 0A
      +[A60h 2656   1]                          Bus : 00
      +[A61h 2657   1]                       Source : 0A
      +[A62h 2658   4]                    Interrupt : 0000000A
      +[A66h 2662   2]        Flags (decoded below) : 000D
                                           Polarity : 1
                                       Trigger Mode : 3
      
      -[068h 0104   1]                Subtable Type : 02 [Interrupt Source Override]
      -[069h 0105   1]                       Length : 0A
      -[06Ah 0106   1]                          Bus : 00
      -[06Bh 0107   1]                       Source : 0B
      -[06Ch 0108   4]                    Interrupt : 0000000B
      -[070h 0112   2]        Flags (decoded below) : 000D
      +[A68h 2664   1]                Subtable Type : 02 [Interrupt Source Override]
      +[A69h 2665   1]                       Length : 0A
      +[A6Ah 2666   1]                          Bus : 00
      +[A6Bh 2667   1]                       Source : 0B
      +[A6Ch 2668   4]                    Interrupt : 0000000B
      +[A70h 2672   2]        Flags (decoded below) : 000D
                                           Polarity : 1
                                       Trigger Mode : 3
      
      -[072h 0114   1]                Subtable Type : 04 [Local APIC NMI]
      -[073h 0115   1]                       Length : 06
      -[074h 0116   1]                 Processor ID : FF
      -[075h 0117   2]        Flags (decoded below) : 0000
      +[A72h 2674   1]                Subtable Type : 0A [Local x2APIC NMI]
      +[A73h 2675   1]                       Length : 0C
      +[A74h 2676   2]        Flags (decoded below) : 0000
                                           Polarity : 0
                                       Trigger Mode : 0
      -[077h 0119   1]         Interrupt Input LINT : 01
      +[A76h 2678   4]                Processor UID : FFFFFFFF
      +[A7Ah 2682   1]         Interrupt Input LINT : 01
      +[A7Bh 2683   3]                     Reserved : 000000
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210902113551.461632-6-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b59a8984
    • Igor Mammedov's avatar
      tests: acpi: whitelist expected tables for acpi/q35/xapic testcase · c306cdb0
      Igor Mammedov authored
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210902113551.461632-4-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c306cdb0
  6. Oct 05, 2021
    • Ani Sinha's avatar
      bios-tables-test: Update ACPI DSDT table golden blobs for q35 · 500eb21c
      Ani Sinha authored
      
      We have modified the IO address range for ACPI pci hotplug in q35. See change:
      
      5adcc9e39e6a5 ("hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35")
      
      The ACPI DSDT table golden blobs must be regenrated in order to make the unit tests
      pass. This change updates the golden ACPI DSDT table blobs.
      
      Following is the ASL diff between the blobs:
      
      @@ -1,30 +1,30 @@
       /*
        * Intel ACPI Component Architecture
        * AML/ASL+ Disassembler version 20190509 (64-bit version)
        * Copyright (c) 2000 - 2019 Intel Corporation
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/q35/DSDT, Tue Sep 14 09:04:06 2021
      + * Disassembly of /tmp/aml-52DP90, Tue Sep 14 09:04:06 2021
        *
        * Original Table Header:
        *     Signature        "DSDT"
        *     Length           0x00002061 (8289)
        *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
      - *     Checksum         0xE5
      + *     Checksum         0xF9
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPC    "
        *     OEM Revision     0x00000001 (1)
        *     Compiler ID      "BXPC"
        *     Compiler Version 0x00000001 (1)
        */
       DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
       {
           Scope (\)
           {
               OperationRegion (DBG, SystemIO, 0x0402, One)
               Field (DBG, ByteAcc, NoLock, Preserve)
               {
                   DBGB,   8
               }
      
      @@ -226,46 +226,46 @@
                   Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                   {
                       IO (Decode16,
                           0x0070,             // Range Minimum
                           0x0070,             // Range Maximum
                           0x01,               // Alignment
                           0x08,               // Length
                           )
                       IRQNoFlags ()
                           {8}
                   })
               }
           }
      
           Scope (_SB.PCI0)
           {
      -        OperationRegion (PCST, SystemIO, 0x0CC4, 0x08)
      +        OperationRegion (PCST, SystemIO, 0x0CC0, 0x08)
               Field (PCST, DWordAcc, NoLock, WriteAsZeros)
               {
                   PCIU,   32,
                   PCID,   32
               }
      
      -        OperationRegion (SEJ, SystemIO, 0x0CCC, 0x04)
      +        OperationRegion (SEJ, SystemIO, 0x0CC8, 0x04)
               Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
               {
                   B0EJ,   32
               }
      
      -        OperationRegion (BNMR, SystemIO, 0x0CD4, 0x08)
      +        OperationRegion (BNMR, SystemIO, 0x0CD0, 0x08)
               Field (BNMR, DWordAcc, NoLock, WriteAsZeros)
               {
                   BNUM,   32,
                   PIDX,   32
               }
      
               Mutex (BLCK, 0x00)
               Method (PCEJ, 2, NotSerialized)
               {
                   Acquire (BLCK, 0xFFFF)
                   BNUM = Arg0
                   B0EJ = (One << Arg1)
                   Release (BLCK)
                   Return (Zero)
               }
      
      @@ -3185,34 +3185,34 @@
                           0x0620,             // Range Minimum
                           0x0620,             // Range Maximum
                           0x01,               // Alignment
                           0x10,               // Length
                           )
                   })
               }
      
               Device (PHPR)
               {
                   Name (_HID, "PNP0A06" /* Generic Container Device */)  // _HID: Hardware ID
                   Name (_UID, "PCI Hotplug resources")  // _UID: Unique ID
                   Name (_STA, 0x0B)  // _STA: Status
                   Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                   {
                       IO (Decode16,
      -                    0x0CC4,             // Range Minimum
      -                    0x0CC4,             // Range Maximum
      +                    0x0CC0,             // Range Minimum
      +                    0x0CC0,             // Range Maximum
                           0x01,               // Alignment
                           0x18,               // Length
                           )
                   })
               }
           }
      
           Scope (\)
           {
               Name (_S3, Package (0x04)  // _S3_: S3 System State
               {
                   One,
                   One,
                   Zero,
                   Zero
               })
      
      Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210916132838.3469580-4-ani@anisinha.ca>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      500eb21c
  7. Sep 13, 2021
    • Shashi Mallela's avatar
      tests/data/acpi/virt: Update IORT files for ITS · 0a93293e
      Shashi Mallela authored
      
      Updated expected IORT files applicable with latest GICv3
      ITS changes.
      
      Full diff of new file disassembly:
      
      /*
       * Intel ACPI Component Architecture
       * AML/ASL+ Disassembler version 20180629 (64-bit version)
       * Copyright (c) 2000 - 2018 Intel Corporation
       *
       * Disassembly of tests/data/acpi/virt/IORT.pxb, Tue Jun 29 17:35:38 2021
       *
       * ACPI Data Table [IORT]
       *
       * Format: [HexOffset DecimalOffset ByteLength]  FieldName : FieldValue
       */
      
      [000h 0000   4]                    Signature : "IORT"    [IO Remapping Table]
      [004h 0004   4]                 Table Length : 0000007C
      [008h 0008   1]                     Revision : 00
      [009h 0009   1]                     Checksum : 07
      [00Ah 0010   6]                       Oem ID : "BOCHS "
      [010h 0016   8]                 Oem Table ID : "BXPC    "
      [018h 0024   4]                 Oem Revision : 00000001
      [01Ch 0028   4]              Asl Compiler ID : "BXPC"
      [020h 0032   4]        Asl Compiler Revision : 00000001
      
      [024h 0036   4]                   Node Count : 00000002
      [028h 0040   4]                  Node Offset : 00000030
      [02Ch 0044   4]                     Reserved : 00000000
      
      [030h 0048   1]                         Type : 00
      [031h 0049   2]                       Length : 0018
      [033h 0051   1]                     Revision : 00
      [034h 0052   4]                     Reserved : 00000000
      [038h 0056   4]                Mapping Count : 00000000
      [03Ch 0060   4]               Mapping Offset : 00000000
      
      [040h 0064   4]                     ItsCount : 00000001
      [044h 0068   4]                  Identifiers : 00000000
      
      [048h 0072   1]                         Type : 02
      [049h 0073   2]                       Length : 0034
      [04Bh 0075   1]                     Revision : 00
      [04Ch 0076   4]                     Reserved : 00000000
      [050h 0080   4]                Mapping Count : 00000001
      [054h 0084   4]               Mapping Offset : 00000020
      
      [058h 0088   8]            Memory Properties : [IORT Memory Access Properties]
      [058h 0088   4]              Cache Coherency : 00000001
      [05Ch 0092   1]        Hints (decoded below) : 00
                                         Transient : 0
                                    Write Allocate : 0
                                     Read Allocate : 0
                                          Override : 0
      [05Dh 0093   2]                     Reserved : 0000
      [05Fh 0095   1] Memory Flags (decoded below) : 03
                                         Coherency : 1
                                  Device Attribute : 1
      [060h 0096   4]                ATS Attribute : 00000000
      [064h 0100   4]           PCI Segment Number : 00000000
      [068h 0104   1]            Memory Size Limit : 00
      [069h 0105   3]                     Reserved : 000000
      
      [068h 0104   4]                   Input base : 00000000
      [06Ch 0108   4]                     ID Count : 0000FFFF
      [070h 0112   4]                  Output Base : 00000000
      [074h 0116   4]             Output Reference : 00000030
      [078h 0120   4]        Flags (decoded below) : 00000000
                                    Single Mapping : 0
      
      Raw Table Data: Length 124 (0x7C)
      
          0000: 49 4F 52 54 7C 00 00 00 00 07 42 4F 43 48 53 20  // IORT|.....BOCHS
          0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
          0020: 01 00 00 00 02 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
          0030: 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
          0040: 01 00 00 00 00 00 00 00 02 34 00 00 00 00 00 00  // .........4......
          0050: 01 00 00 00 20 00 00 00 01 00 00 00 00 00 00 03  // .... ...........
          0060: 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00  // ................
          0070: 00 00 00 00 30 00 00 00 00 00 00 00              // ....0.......
      
      Signed-off-by: default avatarShashi Mallela <shashi.mallela@linaro.org>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20210910143951.92242-10-shashi.mallela@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      0a93293e
    • Shashi Mallela's avatar
      tests/data/acpi/virt: Add IORT files for ITS · d7830a9b
      Shashi Mallela authored
      
      Added expected IORT files applicable with latest GICv3
      ITS changes.Temporarily differences in these files are
      okay.
      
      Signed-off-by: default avatarShashi Mallela <shashi.mallela@linaro.org>
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20210910143951.92242-8-shashi.mallela@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d7830a9b
  8. Aug 31, 2021
  9. Aug 03, 2021
    • Michael S. Tsirkin's avatar
      Drop _DSM 5 from expected DSDTs on ARM · 62a4db55
      Michael S. Tsirkin authored
      
      diff -rup /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	2021-08-03 16:22:52.289295442 -0400
      +++ /tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl	2021-08-03 16:22:40.102286317 -0400
      @@ -1302,14 +1302,9 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS "
                           {
                               Return (Buffer (One)
                               {
      -                             0x21                                             // !
      +                             0x01                                             // .
                               })
                           }
      -
      -                    If ((Arg2 == 0x05))
      -                    {
      -                        Return (Zero)
      -                    }
                       }
      
                       Return (Buffer (One)
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      62a4db55
  10. Jul 16, 2021
    • Julia Suvorova's avatar
      bios-tables-test: Update golden binaries · 1580b897
      Julia Suvorova authored
      
      Add ACPI hot-plug registers to DSDT Q35 tables.
      Changes in the tables:
      
      +    Scope (_SB.PCI0)
      +    {
      +        OperationRegion (PCST, SystemIO, 0x0CC4, 0x08)
      +        Field (PCST, DWordAcc, NoLock, WriteAsZeros)
      +        {
      +            PCIU,   32,
      +            PCID,   32
      +        }
      +
      +        OperationRegion (SEJ, SystemIO, 0x0CCC, 0x04)
      +        Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
      +        {
      +            B0EJ,   32
      +        }
      +
      +        OperationRegion (BNMR, SystemIO, 0x0CD4, 0x08)
      +        Field (BNMR, DWordAcc, NoLock, WriteAsZeros)
      +        {
      +            BNUM,   32,
      +            PIDX,   32
      +        }
      +
      +        Mutex (BLCK, 0x00)
      +        Method (PCEJ, 2, NotSerialized)
      +        {
      +            Acquire (BLCK, 0xFFFF)
      +            BNUM = Arg0
      +            B0EJ = (One << Arg1)
      +            Release (BLCK)
      +            Return (Zero)
      +        }
      +
      +        Method (AIDX, 2, NotSerialized)
      +        {
      +            Acquire (BLCK, 0xFFFF)
      +            BNUM = Arg0
      +            PIDX = (One << Arg1)
      +            Local0 = PIDX /* \_SB_.PCI0.PIDX */
      +            Release (BLCK)
      +            Return (Local0)
      +        }
      +
      +        Method (PDSM, 6, Serialized)
      +        {
      +            If ((Arg0 == ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
      +            {
      +                Local0 = AIDX (Arg4, Arg5)
      +                If ((Arg2 == Zero))
      +                {
      +                    If ((Arg1 == 0x02))
      +                    {
      +                        If (!((Local0 == Zero) | (Local0 == 0xFFFFFFFF)))
      +                        {
      +                            Return (Buffer (One)
      +                            {
      +                                 0x81                                             // .
      +                            })
      +                        }
      +                    }
      +
      +                    Return (Buffer (One)
      +                    {
      +                         0x00                                             // .
      +                    })
      +                }
      +                ElseIf ((Arg2 == 0x07))
      +                {
      +                    Local1 = Package (0x02)
      +                        {
      +                            Zero,
      +                            ""
      +                        }
      +                    Local1 [Zero] = Local0
      +                    Return (Local1)
      +                }
      +            }
      +        }
      +    }
      +
      ...
      
           Scope (_GPE)
           {
               Name (_HID, "ACPI0006" /* GPE Block Device */)  // _HID: Hardware ID
      +        Method (_E01, 0, NotSerialized)  // _Exx: Edge-Triggered GPE, xx=0x00-0xFF
      +        {
      +            Acquire (\_SB.PCI0.BLCK, 0xFFFF)
      +            \_SB.PCI0.PCNT ()
      +            Release (\_SB.PCI0.BLCK)
      +        }
      ...
      
      +
      +        Device (PHPR)
      +        {
      +            Name (_HID, "PNP0A06" /* Generic Container Device */)  // _HID: Hardware ID
      +            Name (_UID, "PCI Hotplug resources")  // _UID: Unique ID
      +            Name (_STA, 0x0B)  // _STA: Status
      +            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
      +            {
      +                IO (Decode16,
      +                    0x0CC4,             // Range Minimum
      +                    0x0CC4,             // Range Maximum
      +                    0x01,               // Alignment
      +                    0x18,               // Length
      +                    )
      +            })
      +        }
           }
      ...
      
      And if there is a port in configuration:
      
                   Device (S10)
                   {
                       Name (_ADR, 0x00020000)  // _ADR: Address
      +                Name (BSEL, Zero)
      +                Device (S00)
      +                {
      +                    Name (_SUN, Zero)  // _SUN: Slot User Number
      +                    Name (_ADR, Zero)  // _ADR: Address
      +                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device, x=0-9
      +                    {
      +                        PCEJ (BSEL, _SUN)
      +                    }
      +
      +                    Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
      +                    {
      +                        Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                    }
      +                }
      +
      ...
      
      +                Method (DVNT, 2, NotSerialized)
      +                {
      +                    If ((Arg0 & One))
      +                    {
      +                        Notify (S00, Arg1)
      +                    }
      ...
      
      Signed-off-by: default avatarJulia Suvorova <jusual@redhat.com>
      Message-Id: <20210713004205.775386-7-jusual@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      1580b897
  11. Jul 03, 2021
    • Igor Mammedov's avatar
      tests: acpi: pc: update expected DSDT blobs · 40f23e4e
      Igor Mammedov authored
      
      @@ -930,20 +930,20 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                   Device (S00)
                   {
                       Name (_ADR, Zero)  // _ADR: Address
      -                Name (_SUN, Zero)  // _SUN: Slot User Number
      +                Name (ASUN, Zero)
                       Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                       {
      -                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
                       }
                   }
      
                   Device (S10)
                   {
                       Name (_ADR, 0x00020000)  // _ADR: Address
      -                Name (_SUN, 0x02)  // _SUN: Slot User Number
      +                Name (ASUN, 0x02)
                       Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                       {
      -                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
                       }
      
                       Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
      
      with a hank per bridge:
      
      @@ -965,10 +965,10 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                   Device (S18)
                   {
                       Name (_ADR, 0x00030000)  // _ADR: Address
      -                Name (_SUN, 0x03)  // _SUN: Slot User Number
      +                Name (ASUN, 0x03)
                       Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                       {
      -                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
                       }
                   }
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210624204229.998824-4-imammedo@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Tested-by: default avatarJohn Sucaet <john.sucaet@ekinops.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      40f23e4e
  12. Mar 22, 2021
    • Igor Mammedov's avatar
      tests: acpi: update expected blobs · 835fde4a
      Igor Mammedov authored
      
      expected changes are:
       * larger BNMR operation region
       * new PIDX field and method to fetch acpi-index
       * PDSM method that implements PCI device _DSM +
         per device _DSM that calls PDSM
      
      @@ -221,10 +221,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                   B0EJ,   32
               }
      
      -        OperationRegion (BNMR, SystemIO, 0xAE10, 0x04)
      +        OperationRegion (BNMR, SystemIO, 0xAE10, 0x08)
               Field (BNMR, DWordAcc, NoLock, WriteAsZeros)
               {
      -            BNUM,   32
      +            BNUM,   32,
      +            PIDX,   32
               }
      
               Mutex (BLCK, 0x00)
      @@ -236,6 +237,52 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                   Release (BLCK)
                   Return (Zero)
               }
      +
      +        Method (AIDX, 2, NotSerialized)
      +        {
      +            Acquire (BLCK, 0xFFFF)
      +            BNUM = Arg0
      +            PIDX = (One << Arg1)
      +            Local0 = PIDX /* \_SB_.PCI0.PIDX */
      +            Release (BLCK)
      +            Return (Local0)
      +        }
      +
      +        Method (PDSM, 6, Serialized)
      +        {
      +            If ((Arg0 == ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
      +            {
      +                Local0 = AIDX (Arg4, Arg5)
      +                If ((Arg2 == Zero))
      +                {
      +                    If ((Arg1 == 0x02))
      +                    {
      +                        If (!((Local0 == Zero) | (Local0 == 0xFFFFFFFF)))
      +                        {
      +                            Return (Buffer (One)
      +                            {
      +                                 0x81                                             // .
      +                            })
      +                        }
      +                    }
      +
      +                    Return (Buffer (One)
      +                    {
      +                         0x00                                             // .
      +                    })
      +                }
      +                ElseIf ((Arg2 == 0x07))
      +                {
      +                    Local1 = Package (0x02)
      +                        {
      +                            Zero,
      +                            ""
      +                        }
      +                    Local1 [Zero] = Local0
      +                    Return (Local1)
      +                }
      +            }
      +        }
           }
      
           Scope (_SB)
      @@ -785,7 +832,7 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                           0xAE00,             // Range Minimum
                           0xAE00,             // Range Maximum
                           0x01,               // Alignment
      -                    0x14,               // Length
      +                    0x18,               // Length
                           )
                   })
               }
      @@ -842,11 +889,22 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                   Device (S00)
                   {
                       Name (_ADR, Zero)  // _ADR: Address
      +                Name (_SUN, Zero)  // _SUN: Slot User Number
      +                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
      +                {
      +                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                }
                   }
      
                   Device (S10)
                   {
                       Name (_ADR, 0x00020000)  // _ADR: Address
      +                Name (_SUN, 0x02)  // _SUN: Slot User Number
      +                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
      +                {
      +                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
      +                }
      +
                       Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
                       {
                           Return (Zero)
      [...]
      
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <20210315180102.3008391-7-imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      835fde4a
  13. Feb 23, 2021
  14. Feb 05, 2021
  15. Jan 17, 2021
    • Jiahui Cen's avatar
      acpi: Update _DSM method in expected files · ccee1a81
      Jiahui Cen authored
      
      A new _DSM #5 method is added.
      
      Update expected DSDT files accordingly, and re-enable their testing.
      
      Full diff of changed files disassembly:
      
      tests/data/acpi/microvm/DSDT.pcie.dsl:
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/microvm/DSDT.pcie, Thu Jan 14 13:39:35 2021
      + * Disassembly of tests/data/acpi/microvm/DSDT.pcie, Thu Jan 14 13:51:13 2021
        *
        * 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)
      
      tests/data/acpi/virt/DSDT.dsl:
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/virt/DSDT, Thu Jan 14 13:39:35 2021
      + * Disassembly of tests/data/acpi/virt/DSDT, Thu Jan 14 13:51:13 2021
        *
        * 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)
      
      tests/data/acpi/virt/DSDT.memhp.dsl:
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/virt/DSDT.memhp, Thu Jan 14 13:39:35 2021
      + * Disassembly of tests/data/acpi/virt/DSDT.memhp, Thu Jan 14 13:51:13 2021
        *
        * 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)
      
      tests/data/acpi/virt/DSDT.numamem.dsl:
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/virt/DSDT.numamem, Thu Jan 14 13:39:35 2021
      + * Disassembly of tests/data/acpi/virt/DSDT.numamem, Thu Jan 14 13:51:13 2021
        *
        * 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)
      
      tests/data/acpi/virt/DSDT.pxb.dsl:
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/virt/DSDT.pxb, Thu Jan 14 13:39:35 2021
      + * Disassembly of tests/data/acpi/virt/DSDT.pxb, Thu Jan 14 13:51:13 2021
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00001DF9 (7673)
      + *     Length           0x00001E09 (7689)
        *     Revision         0x02
      - *     Checksum         0x42
      + *     Checksum         0x30
        *     OEM ID           "BOCHS "
        *     OEM Table ID     "BXPCDSDT"
        *     OEM Revision     0x00000001 (1)
      @@ -1810,9 +1810,14 @@
                           {
                               Return (Buffer (One)
                               {
      -                             0x01                                             // .
      +                             0x21                                             // !
                               })
                           }
      +
      +                    If ((Arg2 == 0x05))
      +                    {
      +                        Return (Zero)
      +                    }
                       }
      
                       Return (Buffer (One)
      @@ -3025,9 +3030,14 @@
                           {
                               Return (Buffer (One)
                               {
      -                             0x01                                             // .
      +                             0x21                                             // !
                               })
                           }
      +
      +                    If ((Arg2 == 0x05))
      +                    {
      +                        Return (Zero)
      +                    }
                       }
      
                       Return (Buffer (One)
      
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: default avatarJiahui Cen <cenjiahui@huawei.com>
      Message-Id: <20210114100643.10617-9-cenjiahui@huawei.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ccee1a81
    • Jiahui Cen's avatar
      acpi: Fix unmatched expected DSDT.pxb file · 4c4465ff
      Jiahui Cen authored
      
      Commit fe1127da ("unit-test: Add the binary file and clear diff.h") does
      not use the up-to-date expected file for pxb for ARM virt.
      
      Fix the expected DSDT.pxb file.
      
      Full diff of changed file disassembly:
      
      @@ -5,13 +5,13 @@
        *
        * Disassembling to symbolic ASL+ operators
        *
      - * Disassembly of tests/data/acpi/virt/DSDT.pxb, Thu Jan 14 09:33:09 2021
      + * Disassembly of tests/data/acpi/virt/DSDT.pxb, Thu Jan 14 13:34:47 2021
        *
        * Original Table Header:
        *     Signature        "DSDT"
      - *     Length           0x00001E7A (7802)
      + *     Length           0x00001DF9 (7673)
        *     Revision         0x02
      - *     Checksum         0x57
      + *     Checksum         0x42
        *     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
      @@ -665,9 +639,6 @@
               {
                   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
      @@ -1857,7 +1828,7 @@
                   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 (_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
      @@ -2983,41 +2954,37 @@
                       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
      +                    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)
      +            })
                   Name (SUPP, Zero)
                   Name (CTRL, Zero)
                   Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
      
      Fixes: fe1127da ("unit-test: Add the binary file and clear diff.h")
      Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: default avatarJiahui Cen <cenjiahui@huawei.com>
      Message-Id: <20210114100643.10617-3-cenjiahui@huawei.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      4c4465ff
  16. Dec 10, 2020
Loading