diff mbox series

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

Message ID 20220901032721.1392482-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 Sept. 1, 2022, 3:27 a.m. UTC
And empty bios-tables-test-allowed-diff.h.

Diff of ASL form, cited from qtest testlog.txt:
diff mbox series

Patch

--- /tmp/asl-0WHMR1.dsl	2022-08-30 11:38:09.406635934 +0800
+++ /tmp/asl-APDMR1.dsl	2022-08-30 11:38:09.403635663 +0800
@@ -1,30 +1,30 @@ 
 /*
  * Intel ACPI Component Architecture
  * AML/ASL+ Disassembler version 20180629 (64-bit version)
  * Copyright (c) 2000 - 2018 Intel Corporation
  *
  * Disassembling to symbolic ASL+ operators
  *
- * Disassembly of tests/data/acpi/pc/SSDT.dimmpxm, Tue Aug 30 11:38:09 2022
+ * Disassembly of /tmp/aml-1AEMR1, Tue Aug 30 11:38:09 2022
  *
  * Original Table Header:
  *     Signature        "SSDT"
- *     Length           0x000002DE (734)
+ *     Length           0x00000765 (1893)
  *     Revision         0x01
- *     Checksum         0x56
+ *     Checksum         0x36
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "NVDIMM"
  *     OEM Revision     0x00000001 (1)
  *     Compiler ID      "BXPC"
  *     Compiler Version 0x00000001 (1)
  */
 DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x00000001)
 {
     Scope (\_SB)
     {
         Device (NVDR)
         {
             Name (_HID, "ACPI0012" /* NVDIMM Root Device */)  // _HID: Hardware ID
             Method (NCAL, 5, Serialized)
             {
                 Local6 = MEMA /* \MEMA */
@@ -49,52 +49,52 @@ 
                     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                                             // .
                     })
                 }

                 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 +161,234 @@ 
                     Else
                     {
                         If ((Local1 == Zero))
                         {
                             Return (Local2)
                         }

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

             Device (NV00)
             {
                 Name (_ADR, One)  // _ADR: Address
+                Method (_LSI, 0, Serialized)  // _LSI: Label Storage Information
+                {
+                    Local0 = NCAL (ToUUID ("4309ac30-0d11-11e4-9191-0800200c9a66"), One, 0x04, Zero, One)
+                    CreateDWordField (Local0, Zero, STTS)
+                    CreateDWordField (Local0, 0x04, SLSA)
+                    CreateDWordField (Local0, 0x08, MAXT)
+                    Name (RET, Package (0x03)
+                    {
+                        STTS,
+                        SLSA,
+                        MAXT
+                    })
+                    Return (RET) /* \_SB_.NVDR.NV00._LSI.RET_ */
+                }
+
+                Method (_LSR, 2, Serialized)  // _LSR: Label Storage Read
+                {
+                    Name (INPT, Buffer (0x08)
+                    {
+                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   // ........
+                    })
+                    CreateDWordField (INPT, Zero, OFST)
+                    CreateDWordField (INPT, 0x04, LEN)
+                    OFST = Arg0
+                    LEN = Arg1
+                    Name (PKG1, Package (0x01)
+                    {
+                        INPT
+                    })
+                    Local3 = NCAL (ToUUID ("4309ac30-0d11-11e4-9191-0800200c9a66"), One, 0x05, PKG1, One)
+                    CreateDWordField (Local3, Zero, STTS)
+                    CreateField (Local3, 0x20, (LEN << 0x03), LDAT)
+                    Name (LSA, Buffer (Zero){})
+                    ToBuffer (LDAT, LSA) /* \_SB_.NVDR.NV00._LSR.LSA_ */
+                    Name (RET, Package (0x02)
+                    {
+                        STTS,
+                        LSA
+                    })
+                    Return (RET) /* \_SB_.NVDR.NV00._LSR.RET_ */
+                }
+
+                Method (_LSW, 3, Serialized)  // _LSW: Label Storage Write
+                {
+                    Local2 = Arg2
+                    Name (INPT, Buffer (0x08)
+                    {
+                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   // ........
+                    })
+                    CreateDWordField (INPT, Zero, OFST)
+                    CreateDWordField (INPT, 0x04, TLEN)
+                    OFST = Arg0
+                    TLEN = Arg1
+                    Concatenate (INPT, Local2, INPT) /* \_SB_.NVDR.NV00._LSW.INPT */
+                    Name (PKG1, Package (0x01)
+                    {
+                        INPT
+                    })
+                    Local3 = NCAL (ToUUID ("4309ac30-0d11-11e4-9191-0800200c9a66"), One, 0x06, PKG1, One)
+                    CreateDWordField (Local3, Zero, STTS)
+                    Return (ToInteger (STTS))
+                }
+
                 Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                 {
                     Return (NCAL (Arg0, Arg1, Arg2, Arg3, One))
                 }
             }
	     ... // iterates in each NV devices

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 -> 1893 bytes
 tests/data/acpi/q35/SSDT.dimmpxm            | Bin 734 -> 1893 bytes
 tests/qtest/bios-tables-test-allowed-diff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MP`YV5
zD-N6k`wmkhhRlpjauFTFkwX}=H!b#Y3<q;5@^<qa1sczWw*$e4u1Ull?DtZ^AT)EA
zJ;!Uiw#)9(`O0iQk1esNaano5D(eb9<Uei{N8*U<V;g$MCUL#2i)_ZKIA>t3WLW7l
zylxme<RKSAE?Xk3twyj?sTo3&V0MwCrvnKDdPEV4Gvlm%2^S&8wdu)mCK=TI0%`!t
zIIrU|@eJL}cuXdEo%vX1CSnF-F@+w(0^&X?i9t22`;-ODC~qZc)BQcD!P*~yLfi&I
z7lsoe4<11dp8yIve#JO*y)ee?8ISBCvFzjt{2{SFH%LAWgGlUe9g<Gnp&!f#770gx
l1xRe)qlvyp{K-7x|5cCp|InjD=AU`QWB5NDMjyW=z5^xL@elw2

delta 150
zcmaFLcaN1TIM^lR9uortquWF-X>Nb5nD}6)_~<4#t%(LAjJ^|Hw{uC>PEKQ(G&v)I
zVKOVD5|2#v<i2b!mdWkej0~HN7+n~>Wc<Pm3^?K)U4j@z1mazSeOZ?HIXn7fWM*YE
eMmNa;WevfyTudT@sM1_a5P2hrJo98vb{PO!+bB%{

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",
-- 
2.31.1