diff mbox series

[QEMU,v2,5/6] test/acpi/bios-tables-test: SSDT: update golden master binaries

Message ID 20220530034047.730356-6-robert.hu@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series Support ACPI NVDIMM Label Methods | expand

Commit Message

Robert Hoo May 30, 2022, 3:40 a.m. UTC
Diff in disassembled ASL files
@@ -1,100 +1,103 @@
 /*
  * 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/SSDT.dimmpxm, Wed May 25 11:02:18 2022
+ * Disassembly of /tmp/aml-U0ONM1, Wed May 25 11:02:18 2022
  *
  * Original Table Header:
  *     Signature        "SSDT"
- *     Length           0x000002DE (734)
+ *     Length           0x00000725 (1829)
  *     Revision         0x01
- *     Checksum         0x46
+ *     Checksum         0xEA
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "NVDIMM"
  *     OEM Revision     0x00000001 (1)
  *     Compiler ID      "BXPC"
  *     Compiler Version 0x00000001 (1)
  */
 DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x00000001)
 {
+    Name (MEMA, 0x07FFF000)
     Scope (\_SB)
     {
         Device (NVDR)
         {
             Name (_HID, "ACPI0012" /* NVDIMM Root Device */)  // _HID: Hardware ID
+            OperationRegion (NPIO, SystemIO, 0x0A18, 0x04)
+            Field (NPIO, DWordAcc, NoLock, Preserve)
+            {
+                NTFI,   32
+            }
+
             Method (NCAL, 5, Serialized)
             {
                 Local6 = MEMA /* \MEMA */
-                OperationRegion (NPIO, SystemIO, 0x0A18, 0x04)
                 OperationRegion (NRAM, SystemMemory, Local6, 0x1000)
-                Field (NPIO, DWordAcc, NoLock, Preserve)
-                {
-                    NTFI,   32
-                }
-
                 Field (NRAM, DWordAcc, NoLock, Preserve)
                 {
                     HDLE,   32,
+                    MTHD,   32,
                     REVS,   32,
                     FUNC,   32,
-                    FARG,   32672
+                    FARG,   32640
                 }

                 Field (NRAM, DWordAcc, NoLock, Preserve)
                 {
                     RLEN,   32,
                     ODAT,   32736
                 }

                 If ((Arg4 == Zero))
                 {
                     Local0 = ToUUID ("2f10e7a4-9e91-11e4-89d3-123b93f75cba")
                 }
                 ElseIf ((Arg4 == 0x00010000))
                 {
                     Local0 = ToUUID ("648b9cf2-cda1-4312-8ad9-49c4af32bd62")
                 }
                 Else
                 {
                     Local0 = ToUUID ("4309ac30-0d11-11e4-9191-0800200c9a66")
                 }

-                If (((Local6 == Zero) | (Arg0 != Local0)))
+                If (((Local6 == Zero) || (Arg0 != Local0)))
                 {
                     If ((Arg2 == Zero))
                     {
                         Return (Buffer (One)
                         {
                              0x00                                             // .
                         })
                     }

                     Return (Buffer (One)
                     {
                          0x01                                             // .
                     })
                 }

+                MTHD = Zero
                 HDLE = Arg4
                 REVS = Arg1
                 FUNC = Arg2
-                If (((ObjectType (Arg3) == 0x04) & (SizeOf (Arg3) == One)))
+                If (((ObjectType (Arg3) == 0x04) && (SizeOf (Arg3) == One)))
                 {
                     Local2 = Arg3 [Zero]
                     Local3 = DerefOf (Local2)
                     FARG = Local3
                 }

                 NTFI = Local6
                 Local1 = (RLEN - 0x04)
                 If ((Local1 < 0x08))
                 {
                     Local2 = Zero
                     Name (TBUF, Buffer (One)
                     {
                          0x00                                             // .
                     })
                     Local7 = Buffer (Zero){}
@@ -161,45 +164,304 @@
                     Else
                     {
                         If ((Local1 == Zero))
                         {
                             Return (Local2)
                         }

                         Local3 += Local1
                         Concatenate (Local2, Local0, Local2)
                     }
                 }
             }

             Device (NV00)
             {
                 Name (_ADR, One)  // _ADR: Address
+                OperationRegion (NRAM, SystemMemory, MEMA, 0x1000)
+                Method (_LSI, 0, Serialized)  // _LSI: Label Storage Information
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32,
+                        SIZE,   32,
+                        MAXT,   32
+                    }
+
+                    HDLE = One
+                    MTHD = 0x0100
+                    NTFI = MEMA /* \MEMA */
+                    Name (RPKG, Package (0x03)
+                    {
+                        STUS,
+                        SIZE,
+                        MAXT
+                    })
+                    Return (RPKG) /* \_SB_.NVDR.NV00._LSI.RPKG */
+                }
+
+                Method (_LSR, 2, Serialized)  // _LSR: Label Storage Read
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32,
+                        OFST,   32,
+                        TRSL,   32
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32,
+                        ODAT,   32704
+                    }
+
+                    HDLE = One
+                    MTHD = 0x0101
+                    OFST = Arg0
+                    TRSL = Arg1
+                    NTFI = MEMA /* \MEMA */
+                    Local1 = (Arg1 << 0x03)
+                    CreateField (ODAT, Zero, Local1, OBUF)
+                    Name (RPKG, Package (0x02)
+                    {
+                        STUS,
+                        OBUF
+                    })
+                    Return (RPKG) /* \_SB_.NVDR.NV00._LSR.RPKG */
+                }
+
+                Method (_LSW, 3, Serialized)  // _LSW: Label Storage Write
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32,
+                        OFST,   32,
+                        TRSL,   32,
+                        IDAT,   32640
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32
+                    }
+
+                    HDLE = One
+                    MTHD = 0x0102
+                    OFST = Arg0
+                    TRSL = Arg1
+                    IDAT = Arg2
+                    NTFI = MEMA /* \MEMA */
+                    Return (STUS) /* \_SB_.NVDR.NV00._LSW.STUS */
+                }
+
                 Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                 {
                     Return (NCAL (Arg0, Arg1, Arg2, Arg3, One))
                 }
             }

             Device (NV01)
             {
                 Name (_ADR, 0x02)  // _ADR: Address
+                OperationRegion (NRAM, SystemMemory, MEMA, 0x1000)
+                Method (_LSI, 0, Serialized)  // _LSI: Label Storage Information
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32,
+                        SIZE,   32,
+                        MAXT,   32
+                    }
+
+                    HDLE = 0x02
+                    MTHD = 0x0100
+                    NTFI = MEMA /* \MEMA */
+                    Name (RPKG, Package (0x03)
+                    {
+                        STUS,
+                        SIZE,
+                        MAXT
+                    })
+                    Return (RPKG) /* \_SB_.NVDR.NV01._LSI.RPKG */
+                }
+
+                Method (_LSR, 2, Serialized)  // _LSR: Label Storage Read
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32,
+                        OFST,   32,
+                        TRSL,   32
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32,
+                        ODAT,   32704
+                    }
+
+                    HDLE = 0x02
+                    MTHD = 0x0101
+                    OFST = Arg0
+                    TRSL = Arg1
+                    NTFI = MEMA /* \MEMA */
+                    Local1 = (Arg1 << 0x03)
+                    CreateField (ODAT, Zero, Local1, OBUF)
+                    Name (RPKG, Package (0x02)
+                    {
+                        STUS,
+                        OBUF
+                    })
+                    Return (RPKG) /* \_SB_.NVDR.NV01._LSR.RPKG */
+                }
+
+                Method (_LSW, 3, Serialized)  // _LSW: Label Storage Write
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32,
+                        OFST,   32,
+                        TRSL,   32,
+                        IDAT,   32640
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32
+                    }
+
+                    HDLE = 0x02
+                    MTHD = 0x0102
+                    OFST = Arg0
+                    TRSL = Arg1
+                    IDAT = Arg2
+                    NTFI = MEMA /* \MEMA */
+                    Return (STUS) /* \_SB_.NVDR.NV01._LSW.STUS */
+                }
+
                 Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                 {
                     Return (NCAL (Arg0, Arg1, Arg2, Arg3, 0x02))
                 }
             }

             Device (NV02)
             {
                 Name (_ADR, 0x03)  // _ADR: Address
+                OperationRegion (NRAM, SystemMemory, MEMA, 0x1000)
+                Method (_LSI, 0, Serialized)  // _LSI: Label Storage Information
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32,
+                        SIZE,   32,
+                        MAXT,   32
+                    }
+
+                    HDLE = 0x03
+                    MTHD = 0x0100
+                    NTFI = MEMA /* \MEMA */
+                    Name (RPKG, Package (0x03)
+                    {
+                        STUS,
+                        SIZE,
+                        MAXT
+                    })
+                    Return (RPKG) /* \_SB_.NVDR.NV02._LSI.RPKG */
+                }
+
+                Method (_LSR, 2, Serialized)  // _LSR: Label Storage Read
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32,
+                        OFST,   32,
+                        TRSL,   32
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32,
+                        ODAT,   32704
+                    }
+
+                    HDLE = 0x03
+                    MTHD = 0x0101
+                    OFST = Arg0
+                    TRSL = Arg1
+                    NTFI = MEMA /* \MEMA */
+                    Local1 = (Arg1 << 0x03)
+                    CreateField (ODAT, Zero, Local1, OBUF)
+                    Name (RPKG, Package (0x02)
+                    {
+                        STUS,
+                        OBUF
+                    })
+                    Return (RPKG) /* \_SB_.NVDR.NV02._LSR.RPKG */
+                }
+
+                Method (_LSW, 3, Serialized)  // _LSW: Label Storage Write
+                {
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        HDLE,   32,
+                        MTHD,   32,
+                        OFST,   32,
+                        TRSL,   32,
+                        IDAT,   32640
+                    }
+
+                    Field (NRAM, DWordAcc, NoLock, Preserve)
+                    {
+                        RLEN,   32,
+                        STUS,   32
+                    }
+
+                    HDLE = 0x03
+                    MTHD = 0x0102
+                    OFST = Arg0
+                    TRSL = Arg1
+                    IDAT = Arg2
+                    NTFI = MEMA /* \MEMA */
+                    Return (STUS) /* \_SB_.NVDR.NV02._LSW.STUS */
+                }
+
                 Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                 {
                     Return (NCAL (Arg0, Arg1, Arg2, Arg3, 0x03))
                 }
             }
         }
     }
-
-    Name (MEMA, 0x07FFF000)
 }

Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
---
 tests/data/acpi/pc/SSDT.dimmpxm             | Bin 734 -> 1829 bytes
 tests/data/acpi/q35/SSDT.dimmpxm            | Bin 734 -> 1829 bytes
 tests/qtest/bios-tables-test-allowed-diff.h |   2 --
 3 files changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/data/acpi/pc/SSDT.dimmpxm b/tests/data/acpi/pc/SSDT.dimmpxm
index ac55387d57e48adb99eb738a102308688a262fb8..672d51bc348366f667b1d3aeeec45dd06727fd5b 100644
GIT binary patch
literal 1829
zcmc&!L1@!p6n<&Tnx&mIU14LQ#DizM9YpXTY16E6O<R(54l`(yO1rj0f80Fmwr+>b
z31Sy^5s`G{D0mmVdG+MUn}>mSFN%no_jh&JUFJ6M^8d-7?|<)m@B3bKT{5ml0hsTZ
zQZ}y(#d%3l)!-cfG7IG_?yQ<q#W;NW6-~$w7OQ%uYHq0a1Ej`Q^NKVkX3I)CJv{^F
zda<mOnAjx8Ma)hNU&2L0R)mzADrUvP7{N&O0H%p5)MJn^J6G^IoR<nYK{fJ{pylRu
zL9P_Df-G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50PjoJR{U{bA!HeAr2hxuKv6(^Lg6G$ez3DjB%YKkAS_iw=Wq=OM)0S%er6
pIiV8#-!mQbzAwd0UyAVgNI`$J<m4l9HYpCX{eLMAiJVf3@NXo1{ty5F

delta 297
zcmZ3=caN1TIM^lR9uortquWF-sXPIHt(f>=r}*e5H!Z&~mmrRK4^J0fN9O=f0|P@N
z1`%ITKW9fD-U44&U&plQ2EPDLe@1QzE-n@zJIK+OA&r|sAi9woB+l#?;^wIk-6#W+
zVD@nFaa9O%4GUIq3-xnWaB~cDZ}>HFVU~qt?c_9uNs}`Y7#46&&SF?1$jk^P7z=Vh
zdI~Z@nhLT&x)#V(Pwva+Vwv2Y&B(CXozaCcO~x<Gz<?v((ItpcL?GTJ*q3Dq$blJ|
oS=o%yO>#h4L$E9tlZYUyG#3*@-UuSkj3Lj=0rDgd!-xOu0Hgy@&Hw-a

diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index eb8bae1407..dfb8523c8b 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1,3 +1 @@ 
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/SSDT.dimmpxm",
-"tests/data/acpi/q35/SSDT.dimmpxm",