From 7bdbffc1fdd77c2468812833d9a45bcdb09e8418 Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <jinsong.liu@intel.com>
Date: Fri, 29 Jan 2010 06:32:22 +0800
Subject: [PATCH]     Setup vcpu add/remove infrastructure, including madt bios_info and d

    1. setup madt_info structure, so that static dsdt get
       run-time madt info like checksum address, lapic address,
       max cpu numbers, with least hardcode magic number (realmode
       address of madt_info).
    2. setup vcpu add/remove dsdt infrastructure, including processor
       related acpi objects and control methods. vcpu add/remove will
       trigger SCI and then control method _L02. By matching madt, vcpu
       number and add/remove action were found, then by notify control
       method, it will notify OS acpi driver.
    3. remove simple \_PR scope from ssdt.

    Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
---
 src/acpi-dsdt.dsl |  126 +++++++++++++++-
 src/acpi-dsdt.hex |  435 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 src/acpi.c        |   59 +++-----
 3 files changed, 556 insertions(+), 64 deletions(-)

diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index cc31112..abc524e 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -700,8 +700,11 @@ DefinitionBlock (
             Return (0x01)
 
         }
+        /*
+         * _L02 method for CPU notification
+         */
         Method(_L02) {
-            Return(0x01)
+            Return(\_PR.PRSC())
         }
         Method(_L03) {
             Return(0x01)
@@ -744,4 +747,125 @@ DefinitionBlock (
         }
     }
 
+
+    Scope (\_PR)
+    {
+        /* MADT_INFO_PHYSICAL_ADDRESS == 0x514 */
+        OperationRegion(MINF, SystemMemory, 0x514, 12)
+        Field(MINF, DwordAcc, NoLock, Preserve)
+        {
+            MSUA, 32, /* MADT checksum address */
+            MAPA, 32, /* MADT LAPIC0 address */
+            CPUN, 32  /* Max cpu number */
+        }
+
+        OperationRegion(MSUM, SystemMemory, MSUA, 1)
+        Field(MSUM, ByteAcc, NoLock, Preserve)
+        {
+            MSU, 8    /* MADT checksum */
+        }
+
+        #define gen_processor(nr, name)                                       \
+        Processor (C##name, nr, 0x0000b010, 0x06) {                           \
+            Name (_HID, "ACPI0007")                                           \
+            OperationRegion(MATR, SystemMemory, Add(MAPA, Multiply(nr,8)), 8) \
+            Field (MATR, ByteAcc, NoLock, Preserve)                           \
+            {                                                                 \
+                MAT, 64                                                       \
+            }                                                                 \
+            Field (MATR, ByteAcc, NoLock, Preserve)                           \
+            {                                                                 \
+                Offset(4),                                                    \
+                FLG, 1                                                        \
+            }                                                                 \
+            Method(_MAT, 0) {                                                 \
+                Return(ToBuffer(MAT))                                         \
+            }                                                                 \
+            Method (_STA) {                                                   \
+                If (FLG) { Return(0xF) } Else { Return(0x9) }                 \
+            }                                                                 \
+            Method (_EJ0, 1, NotSerialized) {                                 \
+                Sleep (0xC8)                                                  \
+            }                                                                 \
+        }                                                                     \
+
+        gen_processor(0, 0)
+        gen_processor(1, 1)
+        gen_processor(2, 2)
+        gen_processor(3, 3)
+        gen_processor(4, 4)
+        gen_processor(5, 5)
+        gen_processor(6, 6)
+        gen_processor(7, 7)
+        gen_processor(8, 8)
+        gen_processor(9, 9)
+        gen_processor(10, A)
+        gen_processor(11, B)
+        gen_processor(12, C)
+        gen_processor(13, D)
+        gen_processor(14, E)
+
+
+        Method (NTFY, 2) {
+        #define gen_ntfy(nr)                        \
+        If (LEqual(Arg0, 0x##nr)) {                 \
+            If (LNotEqual(Arg1, \_PR.C##nr.FLG)) {  \
+                Store (Arg1, \_PR.C##nr.FLG)        \
+                If (LEqual(Arg1, 1)) {              \
+                    Notify(C##nr, 1)                \
+                    Subtract(\_PR.MSU, 1, \_PR.MSU) \
+                } Else {                            \
+                    Notify(C##nr, 3)                \
+                    Add(\_PR.MSU, 1, \_PR.MSU)      \
+                }                                   \
+            }                                       \
+        }
+
+        gen_ntfy(0)
+        gen_ntfy(1)
+        gen_ntfy(2)
+        gen_ntfy(3)
+        gen_ntfy(4)
+        gen_ntfy(5)
+        gen_ntfy(6)
+        gen_ntfy(7)
+        gen_ntfy(8)
+        gen_ntfy(9)
+        gen_ntfy(A)
+        gen_ntfy(B)
+        gen_ntfy(C)
+        gen_ntfy(D)
+        gen_ntfy(E)
+
+        Return(One)
+        }
+
+
+        OperationRegion(PRST, SystemIO, 0xaf00, 32)
+        Field (PRST, ByteAcc, NoLock, Preserve)
+        {
+            PRS, 256
+        }
+
+        Method(PRSC, 0) {
+            Store(PRS, Local3)
+            Store(Zero, Local0)
+            While(LLess(Local0, 32)) {
+                Store(Zero, Local1)
+                Store(DerefOf(Index(Local3, Local0)), Local2)
+                While(LLess(Local1, 8)) {
+                    Store(Add(Multiply(Local0, 8), Local1), Local4)
+                    If(LLess(Local4, CPUN)) {
+                        NTFY(Local4, And(Local2, 1))
+                    } Else {
+                        Break
+                    }
+                    ShiftRight(Local2, 1, Local2)
+                    Increment(Local1)
+                }
+                Increment(Local0)
+            }
+            Return(One)
+        }
+    }
 }
diff --git a/src/acpi-dsdt.hex b/src/acpi-dsdt.hex
index 465e93e..aeb5722 100644
--- a/src/acpi-dsdt.hex
+++ b/src/acpi-dsdt.hex
@@ -1,22 +1,22 @@
 /*
  * 
  * Intel ACPI Component Architecture
- * ASL Optimizing Compiler version 20090123 [Feb 25 2009]
- * Copyright (C) 2000 - 2009 Intel Corporation
+ * ASL Optimizing Compiler version 20061109 [Jul 16 2007]
+ * Copyright (C) 2000 - 2006 Intel Corporation
  * Supports ACPI Specification Revision 3.0a
  * 
- * Compilation of "out/acpi-dsdt.dsl.i" - Wed Dec 30 12:30:21 2009
+ * Compilation of "out/acpi-dsdt.dsl.i" - Fri Jan 29 04:51:16 2010
  * 
  * C source code output
  *
  */
 unsigned char AmlCode[] =
 {
-    0x44,0x53,0x44,0x54,0x22,0x1E,0x00,0x00,  /* 00000000    "DSDT"..." */
-    0x01,0x71,0x42,0x58,0x50,0x43,0x00,0x00,  /* 00000008    ".qBXPC.." */
+    0x44,0x53,0x44,0x54,0x5A,0x2A,0x00,0x00,  /* 00000000    "DSDTZ*.." */
+    0x01,0x5D,0x42,0x58,0x50,0x43,0x00,0x00,  /* 00000008    ".]BXPC.." */
     0x42,0x58,0x44,0x53,0x44,0x54,0x00,0x00,  /* 00000010    "BXDSDT.." */
     0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
-    0x23,0x01,0x09,0x20,0x10,0x1C,0x5C,0x00,  /* 00000020    "#.. ..\." */
+    0x09,0x11,0x06,0x20,0x10,0x1C,0x5C,0x00,  /* 00000020    "... ..\." */
     0x5B,0x80,0x44,0x42,0x47,0x5F,0x01,0x0B,  /* 00000028    "[.DBG_.." */
     0x44,0xB0,0x0A,0x04,0x5B,0x81,0x0B,0x44,  /* 00000030    "D...[..D" */
     0x42,0x47,0x5F,0x03,0x44,0x42,0x47,0x4C,  /* 00000038    "BG_.DBGL" */
@@ -643,7 +643,7 @@ unsigned char AmlCode[] =
     0x08,0x5F,0x53,0x34,0x5F,0x12,0x06,0x04,  /* 000013A0    "._S4_..." */
     0x00,0x00,0x00,0x00,0x08,0x5F,0x53,0x35,  /* 000013A8    "....._S5" */
     0x5F,0x12,0x06,0x04,0x00,0x00,0x00,0x00,  /* 000013B0    "_......." */
-    0x10,0x49,0xA6,0x5F,0x47,0x50,0x45,0x08,  /* 000013B8    ".I._GPE." */
+    0x10,0x42,0xA7,0x5F,0x47,0x50,0x45,0x08,  /* 000013B8    ".B._GPE." */
     0x5F,0x48,0x49,0x44,0x0D,0x41,0x43,0x50,  /* 000013C0    "_HID.ACP" */
     0x49,0x30,0x30,0x30,0x36,0x00,0x14,0x08,  /* 000013C8    "I0006..." */
     0x5F,0x4C,0x30,0x30,0x00,0xA4,0x01,0x14,  /* 000013D0    "_L00...." */
@@ -960,21 +960,412 @@ unsigned char AmlCode[] =
     0x49,0x44,0x0C,0x00,0x00,0x00,0x80,0x00,  /* 00001D88    "ID......" */
     0x86,0x5C,0x2F,0x03,0x5F,0x53,0x42,0x5F,  /* 00001D90    ".\/._SB_" */
     0x50,0x43,0x49,0x30,0x53,0x33,0x31,0x5F,  /* 00001D98    "PCI0S31_" */
-    0x0A,0x03,0xA4,0x01,0x14,0x08,0x5F,0x4C,  /* 00001DA0    "......_L" */
-    0x30,0x32,0x00,0xA4,0x01,0x14,0x08,0x5F,  /* 00001DA8    "02....._" */
-    0x4C,0x30,0x33,0x00,0xA4,0x01,0x14,0x08,  /* 00001DB0    "L03....." */
-    0x5F,0x4C,0x30,0x34,0x00,0xA4,0x01,0x14,  /* 00001DB8    "_L04...." */
-    0x08,0x5F,0x4C,0x30,0x35,0x00,0xA4,0x01,  /* 00001DC0    "._L05..." */
-    0x14,0x08,0x5F,0x4C,0x30,0x36,0x00,0xA4,  /* 00001DC8    ".._L06.." */
-    0x01,0x14,0x08,0x5F,0x4C,0x30,0x37,0x00,  /* 00001DD0    "..._L07." */
-    0xA4,0x01,0x14,0x08,0x5F,0x4C,0x30,0x38,  /* 00001DD8    "...._L08" */
+    0x0A,0x03,0xA4,0x01,0x14,0x11,0x5F,0x4C,  /* 00001DA0    "......_L" */
+    0x30,0x32,0x00,0xA4,0x5C,0x2E,0x5F,0x50,  /* 00001DA8    "02..\._P" */
+    0x52,0x5F,0x50,0x52,0x53,0x43,0x14,0x08,  /* 00001DB0    "R_PRSC.." */
+    0x5F,0x4C,0x30,0x33,0x00,0xA4,0x01,0x14,  /* 00001DB8    "_L03...." */
+    0x08,0x5F,0x4C,0x30,0x34,0x00,0xA4,0x01,  /* 00001DC0    "._L04..." */
+    0x14,0x08,0x5F,0x4C,0x30,0x35,0x00,0xA4,  /* 00001DC8    ".._L05.." */
+    0x01,0x14,0x08,0x5F,0x4C,0x30,0x36,0x00,  /* 00001DD0    "..._L06." */
+    0xA4,0x01,0x14,0x08,0x5F,0x4C,0x30,0x37,  /* 00001DD8    "...._L07" */
     0x00,0xA4,0x01,0x14,0x08,0x5F,0x4C,0x30,  /* 00001DE0    "....._L0" */
-    0x39,0x00,0xA4,0x01,0x14,0x08,0x5F,0x4C,  /* 00001DE8    "9....._L" */
-    0x30,0x41,0x00,0xA4,0x01,0x14,0x08,0x5F,  /* 00001DF0    "0A....._" */
-    0x4C,0x30,0x42,0x00,0xA4,0x01,0x14,0x08,  /* 00001DF8    "L0B....." */
-    0x5F,0x4C,0x30,0x43,0x00,0xA4,0x01,0x14,  /* 00001E00    "_L0C...." */
-    0x08,0x5F,0x4C,0x30,0x44,0x00,0xA4,0x01,  /* 00001E08    "._L0D..." */
-    0x14,0x08,0x5F,0x4C,0x30,0x45,0x00,0xA4,  /* 00001E10    ".._L0E.." */
-    0x01,0x14,0x08,0x5F,0x4C,0x30,0x46,0x00,  /* 00001E18    "..._L0F." */
+    0x38,0x00,0xA4,0x01,0x14,0x08,0x5F,0x4C,  /* 00001DE8    "8....._L" */
+    0x30,0x39,0x00,0xA4,0x01,0x14,0x08,0x5F,  /* 00001DF0    "09....._" */
+    0x4C,0x30,0x41,0x00,0xA4,0x01,0x14,0x08,  /* 00001DF8    "L0A....." */
+    0x5F,0x4C,0x30,0x42,0x00,0xA4,0x01,0x14,  /* 00001E00    "_L0B...." */
+    0x08,0x5F,0x4C,0x30,0x43,0x00,0xA4,0x01,  /* 00001E08    "._L0C..." */
+    0x14,0x08,0x5F,0x4C,0x30,0x44,0x00,0xA4,  /* 00001E10    ".._L0D.." */
+    0x01,0x14,0x08,0x5F,0x4C,0x30,0x45,0x00,  /* 00001E18    "..._L0E." */
+    0xA4,0x01,0x14,0x08,0x5F,0x4C,0x30,0x46,  /* 00001E20    "...._L0F" */
+    0x00,0xA4,0x01,0x10,0x4E,0xC2,0x5F,0x50,  /* 00001E28    "....N._P" */
+    0x52,0x5F,0x5B,0x80,0x4D,0x49,0x4E,0x46,  /* 00001E30    "R_[.MINF" */
+    0x00,0x0B,0x14,0x05,0x0A,0x0C,0x5B,0x81,  /* 00001E38    "......[." */
+    0x15,0x4D,0x49,0x4E,0x46,0x03,0x4D,0x53,  /* 00001E40    ".MINF.MS" */
+    0x55,0x41,0x20,0x4D,0x41,0x50,0x41,0x20,  /* 00001E48    "UA MAPA " */
+    0x43,0x50,0x55,0x4E,0x20,0x5B,0x80,0x4D,  /* 00001E50    "CPUN [.M" */
+    0x53,0x55,0x4D,0x00,0x4D,0x53,0x55,0x41,  /* 00001E58    "SUM.MSUA" */
+    0x01,0x5B,0x81,0x0B,0x4D,0x53,0x55,0x4D,  /* 00001E60    ".[..MSUM" */
+    0x01,0x4D,0x53,0x55,0x5F,0x08,0x5B,0x83,  /* 00001E68    ".MSU_.[." */
+    0x46,0x07,0x43,0x30,0x5F,0x5F,0x00,0x10,  /* 00001E70    "F.C0__.." */
+    0xB0,0x00,0x00,0x06,0x08,0x5F,0x48,0x49,  /* 00001E78    "....._HI" */
+    0x44,0x0D,0x41,0x43,0x50,0x49,0x30,0x30,  /* 00001E80    "D.ACPI00" */
+    0x30,0x37,0x00,0x5B,0x80,0x4D,0x41,0x54,  /* 00001E88    "07.[.MAT" */
+    0x52,0x00,0x72,0x4D,0x41,0x50,0x41,0x00,  /* 00001E90    "R.rMAPA." */
+    0x00,0x0A,0x08,0x5B,0x81,0x0C,0x4D,0x41,  /* 00001E98    "...[..MA" */
+    0x54,0x52,0x01,0x4D,0x41,0x54,0x5F,0x40,  /* 00001EA0    "TR.MAT_@" */
+    0x04,0x5B,0x81,0x0D,0x4D,0x41,0x54,0x52,  /* 00001EA8    ".[..MATR" */
+    0x01,0x00,0x20,0x46,0x4C,0x47,0x5F,0x01,  /* 00001EB0    ".. FLG_." */
+    0x14,0x0D,0x5F,0x4D,0x41,0x54,0x00,0xA4,  /* 00001EB8    ".._MAT.." */
+    0x96,0x4D,0x41,0x54,0x5F,0x00,0x14,0x14,  /* 00001EC0    ".MAT_..." */
+    0x5F,0x53,0x54,0x41,0x00,0xA0,0x08,0x46,  /* 00001EC8    "_STA...F" */
+    0x4C,0x47,0x5F,0xA4,0x0A,0x0F,0xA1,0x04,  /* 00001ED0    "LG_....." */
+    0xA4,0x0A,0x09,0x14,0x0A,0x5F,0x45,0x4A,  /* 00001ED8    "....._EJ" */
+    0x30,0x01,0x5B,0x22,0x0A,0xC8,0x5B,0x83,  /* 00001EE0    "0.["..[." */
+    0x47,0x07,0x43,0x31,0x5F,0x5F,0x01,0x10,  /* 00001EE8    "G.C1__.." */
+    0xB0,0x00,0x00,0x06,0x08,0x5F,0x48,0x49,  /* 00001EF0    "....._HI" */
+    0x44,0x0D,0x41,0x43,0x50,0x49,0x30,0x30,  /* 00001EF8    "D.ACPI00" */
+    0x30,0x37,0x00,0x5B,0x80,0x4D,0x41,0x54,  /* 00001F00    "07.[.MAT" */
+    0x52,0x00,0x72,0x4D,0x41,0x50,0x41,0x0A,  /* 00001F08    "R.rMAPA." */
+    0x08,0x00,0x0A,0x08,0x5B,0x81,0x0C,0x4D,  /* 00001F10    "....[..M" */
+    0x41,0x54,0x52,0x01,0x4D,0x41,0x54,0x5F,  /* 00001F18    "ATR.MAT_" */
+    0x40,0x04,0x5B,0x81,0x0D,0x4D,0x41,0x54,  /* 00001F20    "@.[..MAT" */
+    0x52,0x01,0x00,0x20,0x46,0x4C,0x47,0x5F,  /* 00001F28    "R.. FLG_" */
+    0x01,0x14,0x0D,0x5F,0x4D,0x41,0x54,0x00,  /* 00001F30    "..._MAT." */
+    0xA4,0x96,0x4D,0x41,0x54,0x5F,0x00,0x14,  /* 00001F38    "..MAT_.." */
+    0x14,0x5F,0x53,0x54,0x41,0x00,0xA0,0x08,  /* 00001F40    "._STA..." */
+    0x46,0x4C,0x47,0x5F,0xA4,0x0A,0x0F,0xA1,  /* 00001F48    "FLG_...." */
+    0x04,0xA4,0x0A,0x09,0x14,0x0A,0x5F,0x45,  /* 00001F50    "......_E" */
+    0x4A,0x30,0x01,0x5B,0x22,0x0A,0xC8,0x5B,  /* 00001F58    "J0.["..[" */
+    0x83,0x47,0x07,0x43,0x32,0x5F,0x5F,0x02,  /* 00001F60    ".G.C2__." */
+    0x10,0xB0,0x00,0x00,0x06,0x08,0x5F,0x48,  /* 00001F68    "......_H" */
+    0x49,0x44,0x0D,0x41,0x43,0x50,0x49,0x30,  /* 00001F70    "ID.ACPI0" */
+    0x30,0x30,0x37,0x00,0x5B,0x80,0x4D,0x41,  /* 00001F78    "007.[.MA" */
+    0x54,0x52,0x00,0x72,0x4D,0x41,0x50,0x41,  /* 00001F80    "TR.rMAPA" */
+    0x0A,0x10,0x00,0x0A,0x08,0x5B,0x81,0x0C,  /* 00001F88    ".....[.." */
+    0x4D,0x41,0x54,0x52,0x01,0x4D,0x41,0x54,  /* 00001F90    "MATR.MAT" */
+    0x5F,0x40,0x04,0x5B,0x81,0x0D,0x4D,0x41,  /* 00001F98    "_@.[..MA" */
+    0x54,0x52,0x01,0x00,0x20,0x46,0x4C,0x47,  /* 00001FA0    "TR.. FLG" */
+    0x5F,0x01,0x14,0x0D,0x5F,0x4D,0x41,0x54,  /* 00001FA8    "_..._MAT" */
+    0x00,0xA4,0x96,0x4D,0x41,0x54,0x5F,0x00,  /* 00001FB0    "...MAT_." */
+    0x14,0x14,0x5F,0x53,0x54,0x41,0x00,0xA0,  /* 00001FB8    ".._STA.." */
+    0x08,0x46,0x4C,0x47,0x5F,0xA4,0x0A,0x0F,  /* 00001FC0    ".FLG_..." */
+    0xA1,0x04,0xA4,0x0A,0x09,0x14,0x0A,0x5F,  /* 00001FC8    "......._" */
+    0x45,0x4A,0x30,0x01,0x5B,0x22,0x0A,0xC8,  /* 00001FD0    "EJ0.[".." */
+    0x5B,0x83,0x47,0x07,0x43,0x33,0x5F,0x5F,  /* 00001FD8    "[.G.C3__" */
+    0x03,0x10,0xB0,0x00,0x00,0x06,0x08,0x5F,  /* 00001FE0    "......._" */
+    0x48,0x49,0x44,0x0D,0x41,0x43,0x50,0x49,  /* 00001FE8    "HID.ACPI" */
+    0x30,0x30,0x30,0x37,0x00,0x5B,0x80,0x4D,  /* 00001FF0    "0007.[.M" */
+    0x41,0x54,0x52,0x00,0x72,0x4D,0x41,0x50,  /* 00001FF8    "ATR.rMAP" */
+    0x41,0x0A,0x18,0x00,0x0A,0x08,0x5B,0x81,  /* 00002000    "A.....[." */
+    0x0C,0x4D,0x41,0x54,0x52,0x01,0x4D,0x41,  /* 00002008    ".MATR.MA" */
+    0x54,0x5F,0x40,0x04,0x5B,0x81,0x0D,0x4D,  /* 00002010    "T_@.[..M" */
+    0x41,0x54,0x52,0x01,0x00,0x20,0x46,0x4C,  /* 00002018    "ATR.. FL" */
+    0x47,0x5F,0x01,0x14,0x0D,0x5F,0x4D,0x41,  /* 00002020    "G_..._MA" */
+    0x54,0x00,0xA4,0x96,0x4D,0x41,0x54,0x5F,  /* 00002028    "T...MAT_" */
+    0x00,0x14,0x14,0x5F,0x53,0x54,0x41,0x00,  /* 00002030    "..._STA." */
+    0xA0,0x08,0x46,0x4C,0x47,0x5F,0xA4,0x0A,  /* 00002038    "..FLG_.." */
+    0x0F,0xA1,0x04,0xA4,0x0A,0x09,0x14,0x0A,  /* 00002040    "........" */
+    0x5F,0x45,0x4A,0x30,0x01,0x5B,0x22,0x0A,  /* 00002048    "_EJ0.["." */
+    0xC8,0x5B,0x83,0x47,0x07,0x43,0x34,0x5F,  /* 00002050    ".[.G.C4_" */
+    0x5F,0x04,0x10,0xB0,0x00,0x00,0x06,0x08,  /* 00002058    "_......." */
+    0x5F,0x48,0x49,0x44,0x0D,0x41,0x43,0x50,  /* 00002060    "_HID.ACP" */
+    0x49,0x30,0x30,0x30,0x37,0x00,0x5B,0x80,  /* 00002068    "I0007.[." */
+    0x4D,0x41,0x54,0x52,0x00,0x72,0x4D,0x41,  /* 00002070    "MATR.rMA" */
+    0x50,0x41,0x0A,0x20,0x00,0x0A,0x08,0x5B,  /* 00002078    "PA. ...[" */
+    0x81,0x0C,0x4D,0x41,0x54,0x52,0x01,0x4D,  /* 00002080    "..MATR.M" */
+    0x41,0x54,0x5F,0x40,0x04,0x5B,0x81,0x0D,  /* 00002088    "AT_@.[.." */
+    0x4D,0x41,0x54,0x52,0x01,0x00,0x20,0x46,  /* 00002090    "MATR.. F" */
+    0x4C,0x47,0x5F,0x01,0x14,0x0D,0x5F,0x4D,  /* 00002098    "LG_..._M" */
+    0x41,0x54,0x00,0xA4,0x96,0x4D,0x41,0x54,  /* 000020A0    "AT...MAT" */
+    0x5F,0x00,0x14,0x14,0x5F,0x53,0x54,0x41,  /* 000020A8    "_..._STA" */
+    0x00,0xA0,0x08,0x46,0x4C,0x47,0x5F,0xA4,  /* 000020B0    "...FLG_." */
+    0x0A,0x0F,0xA1,0x04,0xA4,0x0A,0x09,0x14,  /* 000020B8    "........" */
+    0x0A,0x5F,0x45,0x4A,0x30,0x01,0x5B,0x22,  /* 000020C0    "._EJ0.["" */
+    0x0A,0xC8,0x5B,0x83,0x47,0x07,0x43,0x35,  /* 000020C8    "..[.G.C5" */
+    0x5F,0x5F,0x05,0x10,0xB0,0x00,0x00,0x06,  /* 000020D0    "__......" */
+    0x08,0x5F,0x48,0x49,0x44,0x0D,0x41,0x43,  /* 000020D8    "._HID.AC" */
+    0x50,0x49,0x30,0x30,0x30,0x37,0x00,0x5B,  /* 000020E0    "PI0007.[" */
+    0x80,0x4D,0x41,0x54,0x52,0x00,0x72,0x4D,  /* 000020E8    ".MATR.rM" */
+    0x41,0x50,0x41,0x0A,0x28,0x00,0x0A,0x08,  /* 000020F0    "APA.(..." */
+    0x5B,0x81,0x0C,0x4D,0x41,0x54,0x52,0x01,  /* 000020F8    "[..MATR." */
+    0x4D,0x41,0x54,0x5F,0x40,0x04,0x5B,0x81,  /* 00002100    "MAT_@.[." */
+    0x0D,0x4D,0x41,0x54,0x52,0x01,0x00,0x20,  /* 00002108    ".MATR.. " */
+    0x46,0x4C,0x47,0x5F,0x01,0x14,0x0D,0x5F,  /* 00002110    "FLG_..._" */
+    0x4D,0x41,0x54,0x00,0xA4,0x96,0x4D,0x41,  /* 00002118    "MAT...MA" */
+    0x54,0x5F,0x00,0x14,0x14,0x5F,0x53,0x54,  /* 00002120    "T_..._ST" */
+    0x41,0x00,0xA0,0x08,0x46,0x4C,0x47,0x5F,  /* 00002128    "A...FLG_" */
+    0xA4,0x0A,0x0F,0xA1,0x04,0xA4,0x0A,0x09,  /* 00002130    "........" */
+    0x14,0x0A,0x5F,0x45,0x4A,0x30,0x01,0x5B,  /* 00002138    ".._EJ0.[" */
+    0x22,0x0A,0xC8,0x5B,0x83,0x47,0x07,0x43,  /* 00002140    ""..[.G.C" */
+    0x36,0x5F,0x5F,0x06,0x10,0xB0,0x00,0x00,  /* 00002148    "6__....." */
+    0x06,0x08,0x5F,0x48,0x49,0x44,0x0D,0x41,  /* 00002150    ".._HID.A" */
+    0x43,0x50,0x49,0x30,0x30,0x30,0x37,0x00,  /* 00002158    "CPI0007." */
+    0x5B,0x80,0x4D,0x41,0x54,0x52,0x00,0x72,  /* 00002160    "[.MATR.r" */
+    0x4D,0x41,0x50,0x41,0x0A,0x30,0x00,0x0A,  /* 00002168    "MAPA.0.." */
+    0x08,0x5B,0x81,0x0C,0x4D,0x41,0x54,0x52,  /* 00002170    ".[..MATR" */
+    0x01,0x4D,0x41,0x54,0x5F,0x40,0x04,0x5B,  /* 00002178    ".MAT_@.[" */
+    0x81,0x0D,0x4D,0x41,0x54,0x52,0x01,0x00,  /* 00002180    "..MATR.." */
+    0x20,0x46,0x4C,0x47,0x5F,0x01,0x14,0x0D,  /* 00002188    " FLG_..." */
+    0x5F,0x4D,0x41,0x54,0x00,0xA4,0x96,0x4D,  /* 00002190    "_MAT...M" */
+    0x41,0x54,0x5F,0x00,0x14,0x14,0x5F,0x53,  /* 00002198    "AT_..._S" */
+    0x54,0x41,0x00,0xA0,0x08,0x46,0x4C,0x47,  /* 000021A0    "TA...FLG" */
+    0x5F,0xA4,0x0A,0x0F,0xA1,0x04,0xA4,0x0A,  /* 000021A8    "_......." */
+    0x09,0x14,0x0A,0x5F,0x45,0x4A,0x30,0x01,  /* 000021B0    "..._EJ0." */
+    0x5B,0x22,0x0A,0xC8,0x5B,0x83,0x47,0x07,  /* 000021B8    "["..[.G." */
+    0x43,0x37,0x5F,0x5F,0x07,0x10,0xB0,0x00,  /* 000021C0    "C7__...." */
+    0x00,0x06,0x08,0x5F,0x48,0x49,0x44,0x0D,  /* 000021C8    "..._HID." */
+    0x41,0x43,0x50,0x49,0x30,0x30,0x30,0x37,  /* 000021D0    "ACPI0007" */
+    0x00,0x5B,0x80,0x4D,0x41,0x54,0x52,0x00,  /* 000021D8    ".[.MATR." */
+    0x72,0x4D,0x41,0x50,0x41,0x0A,0x38,0x00,  /* 000021E0    "rMAPA.8." */
+    0x0A,0x08,0x5B,0x81,0x0C,0x4D,0x41,0x54,  /* 000021E8    "..[..MAT" */
+    0x52,0x01,0x4D,0x41,0x54,0x5F,0x40,0x04,  /* 000021F0    "R.MAT_@." */
+    0x5B,0x81,0x0D,0x4D,0x41,0x54,0x52,0x01,  /* 000021F8    "[..MATR." */
+    0x00,0x20,0x46,0x4C,0x47,0x5F,0x01,0x14,  /* 00002200    ". FLG_.." */
+    0x0D,0x5F,0x4D,0x41,0x54,0x00,0xA4,0x96,  /* 00002208    "._MAT..." */
+    0x4D,0x41,0x54,0x5F,0x00,0x14,0x14,0x5F,  /* 00002210    "MAT_..._" */
+    0x53,0x54,0x41,0x00,0xA0,0x08,0x46,0x4C,  /* 00002218    "STA...FL" */
+    0x47,0x5F,0xA4,0x0A,0x0F,0xA1,0x04,0xA4,  /* 00002220    "G_......" */
+    0x0A,0x09,0x14,0x0A,0x5F,0x45,0x4A,0x30,  /* 00002228    "...._EJ0" */
+    0x01,0x5B,0x22,0x0A,0xC8,0x5B,0x83,0x47,  /* 00002230    ".["..[.G" */
+    0x07,0x43,0x38,0x5F,0x5F,0x08,0x10,0xB0,  /* 00002238    ".C8__..." */
+    0x00,0x00,0x06,0x08,0x5F,0x48,0x49,0x44,  /* 00002240    "...._HID" */
+    0x0D,0x41,0x43,0x50,0x49,0x30,0x30,0x30,  /* 00002248    ".ACPI000" */
+    0x37,0x00,0x5B,0x80,0x4D,0x41,0x54,0x52,  /* 00002250    "7.[.MATR" */
+    0x00,0x72,0x4D,0x41,0x50,0x41,0x0A,0x40,  /* 00002258    ".rMAPA.@" */
+    0x00,0x0A,0x08,0x5B,0x81,0x0C,0x4D,0x41,  /* 00002260    "...[..MA" */
+    0x54,0x52,0x01,0x4D,0x41,0x54,0x5F,0x40,  /* 00002268    "TR.MAT_@" */
+    0x04,0x5B,0x81,0x0D,0x4D,0x41,0x54,0x52,  /* 00002270    ".[..MATR" */
+    0x01,0x00,0x20,0x46,0x4C,0x47,0x5F,0x01,  /* 00002278    ".. FLG_." */
+    0x14,0x0D,0x5F,0x4D,0x41,0x54,0x00,0xA4,  /* 00002280    ".._MAT.." */
+    0x96,0x4D,0x41,0x54,0x5F,0x00,0x14,0x14,  /* 00002288    ".MAT_..." */
+    0x5F,0x53,0x54,0x41,0x00,0xA0,0x08,0x46,  /* 00002290    "_STA...F" */
+    0x4C,0x47,0x5F,0xA4,0x0A,0x0F,0xA1,0x04,  /* 00002298    "LG_....." */
+    0xA4,0x0A,0x09,0x14,0x0A,0x5F,0x45,0x4A,  /* 000022A0    "....._EJ" */
+    0x30,0x01,0x5B,0x22,0x0A,0xC8,0x5B,0x83,  /* 000022A8    "0.["..[." */
+    0x47,0x07,0x43,0x39,0x5F,0x5F,0x09,0x10,  /* 000022B0    "G.C9__.." */
+    0xB0,0x00,0x00,0x06,0x08,0x5F,0x48,0x49,  /* 000022B8    "....._HI" */
+    0x44,0x0D,0x41,0x43,0x50,0x49,0x30,0x30,  /* 000022C0    "D.ACPI00" */
+    0x30,0x37,0x00,0x5B,0x80,0x4D,0x41,0x54,  /* 000022C8    "07.[.MAT" */
+    0x52,0x00,0x72,0x4D,0x41,0x50,0x41,0x0A,  /* 000022D0    "R.rMAPA." */
+    0x48,0x00,0x0A,0x08,0x5B,0x81,0x0C,0x4D,  /* 000022D8    "H...[..M" */
+    0x41,0x54,0x52,0x01,0x4D,0x41,0x54,0x5F,  /* 000022E0    "ATR.MAT_" */
+    0x40,0x04,0x5B,0x81,0x0D,0x4D,0x41,0x54,  /* 000022E8    "@.[..MAT" */
+    0x52,0x01,0x00,0x20,0x46,0x4C,0x47,0x5F,  /* 000022F0    "R.. FLG_" */
+    0x01,0x14,0x0D,0x5F,0x4D,0x41,0x54,0x00,  /* 000022F8    "..._MAT." */
+    0xA4,0x96,0x4D,0x41,0x54,0x5F,0x00,0x14,  /* 00002300    "..MAT_.." */
+    0x14,0x5F,0x53,0x54,0x41,0x00,0xA0,0x08,  /* 00002308    "._STA..." */
+    0x46,0x4C,0x47,0x5F,0xA4,0x0A,0x0F,0xA1,  /* 00002310    "FLG_...." */
+    0x04,0xA4,0x0A,0x09,0x14,0x0A,0x5F,0x45,  /* 00002318    "......_E" */
+    0x4A,0x30,0x01,0x5B,0x22,0x0A,0xC8,0x5B,  /* 00002320    "J0.["..[" */
+    0x83,0x47,0x07,0x43,0x41,0x5F,0x5F,0x0A,  /* 00002328    ".G.CA__." */
+    0x10,0xB0,0x00,0x00,0x06,0x08,0x5F,0x48,  /* 00002330    "......_H" */
+    0x49,0x44,0x0D,0x41,0x43,0x50,0x49,0x30,  /* 00002338    "ID.ACPI0" */
+    0x30,0x30,0x37,0x00,0x5B,0x80,0x4D,0x41,  /* 00002340    "007.[.MA" */
+    0x54,0x52,0x00,0x72,0x4D,0x41,0x50,0x41,  /* 00002348    "TR.rMAPA" */
+    0x0A,0x50,0x00,0x0A,0x08,0x5B,0x81,0x0C,  /* 00002350    ".P...[.." */
+    0x4D,0x41,0x54,0x52,0x01,0x4D,0x41,0x54,  /* 00002358    "MATR.MAT" */
+    0x5F,0x40,0x04,0x5B,0x81,0x0D,0x4D,0x41,  /* 00002360    "_@.[..MA" */
+    0x54,0x52,0x01,0x00,0x20,0x46,0x4C,0x47,  /* 00002368    "TR.. FLG" */
+    0x5F,0x01,0x14,0x0D,0x5F,0x4D,0x41,0x54,  /* 00002370    "_..._MAT" */
+    0x00,0xA4,0x96,0x4D,0x41,0x54,0x5F,0x00,  /* 00002378    "...MAT_." */
+    0x14,0x14,0x5F,0x53,0x54,0x41,0x00,0xA0,  /* 00002380    ".._STA.." */
+    0x08,0x46,0x4C,0x47,0x5F,0xA4,0x0A,0x0F,  /* 00002388    ".FLG_..." */
+    0xA1,0x04,0xA4,0x0A,0x09,0x14,0x0A,0x5F,  /* 00002390    "......._" */
+    0x45,0x4A,0x30,0x01,0x5B,0x22,0x0A,0xC8,  /* 00002398    "EJ0.[".." */
+    0x5B,0x83,0x47,0x07,0x43,0x42,0x5F,0x5F,  /* 000023A0    "[.G.CB__" */
+    0x0B,0x10,0xB0,0x00,0x00,0x06,0x08,0x5F,  /* 000023A8    "......._" */
+    0x48,0x49,0x44,0x0D,0x41,0x43,0x50,0x49,  /* 000023B0    "HID.ACPI" */
+    0x30,0x30,0x30,0x37,0x00,0x5B,0x80,0x4D,  /* 000023B8    "0007.[.M" */
+    0x41,0x54,0x52,0x00,0x72,0x4D,0x41,0x50,  /* 000023C0    "ATR.rMAP" */
+    0x41,0x0A,0x58,0x00,0x0A,0x08,0x5B,0x81,  /* 000023C8    "A.X...[." */
+    0x0C,0x4D,0x41,0x54,0x52,0x01,0x4D,0x41,  /* 000023D0    ".MATR.MA" */
+    0x54,0x5F,0x40,0x04,0x5B,0x81,0x0D,0x4D,  /* 000023D8    "T_@.[..M" */
+    0x41,0x54,0x52,0x01,0x00,0x20,0x46,0x4C,  /* 000023E0    "ATR.. FL" */
+    0x47,0x5F,0x01,0x14,0x0D,0x5F,0x4D,0x41,  /* 000023E8    "G_..._MA" */
+    0x54,0x00,0xA4,0x96,0x4D,0x41,0x54,0x5F,  /* 000023F0    "T...MAT_" */
+    0x00,0x14,0x14,0x5F,0x53,0x54,0x41,0x00,  /* 000023F8    "..._STA." */
+    0xA0,0x08,0x46,0x4C,0x47,0x5F,0xA4,0x0A,  /* 00002400    "..FLG_.." */
+    0x0F,0xA1,0x04,0xA4,0x0A,0x09,0x14,0x0A,  /* 00002408    "........" */
+    0x5F,0x45,0x4A,0x30,0x01,0x5B,0x22,0x0A,  /* 00002410    "_EJ0.["." */
+    0xC8,0x5B,0x83,0x47,0x07,0x43,0x43,0x5F,  /* 00002418    ".[.G.CC_" */
+    0x5F,0x0C,0x10,0xB0,0x00,0x00,0x06,0x08,  /* 00002420    "_......." */
+    0x5F,0x48,0x49,0x44,0x0D,0x41,0x43,0x50,  /* 00002428    "_HID.ACP" */
+    0x49,0x30,0x30,0x30,0x37,0x00,0x5B,0x80,  /* 00002430    "I0007.[." */
+    0x4D,0x41,0x54,0x52,0x00,0x72,0x4D,0x41,  /* 00002438    "MATR.rMA" */
+    0x50,0x41,0x0A,0x60,0x00,0x0A,0x08,0x5B,  /* 00002440    "PA.`...[" */
+    0x81,0x0C,0x4D,0x41,0x54,0x52,0x01,0x4D,  /* 00002448    "..MATR.M" */
+    0x41,0x54,0x5F,0x40,0x04,0x5B,0x81,0x0D,  /* 00002450    "AT_@.[.." */
+    0x4D,0x41,0x54,0x52,0x01,0x00,0x20,0x46,  /* 00002458    "MATR.. F" */
+    0x4C,0x47,0x5F,0x01,0x14,0x0D,0x5F,0x4D,  /* 00002460    "LG_..._M" */
+    0x41,0x54,0x00,0xA4,0x96,0x4D,0x41,0x54,  /* 00002468    "AT...MAT" */
+    0x5F,0x00,0x14,0x14,0x5F,0x53,0x54,0x41,  /* 00002470    "_..._STA" */
+    0x00,0xA0,0x08,0x46,0x4C,0x47,0x5F,0xA4,  /* 00002478    "...FLG_." */
+    0x0A,0x0F,0xA1,0x04,0xA4,0x0A,0x09,0x14,  /* 00002480    "........" */
+    0x0A,0x5F,0x45,0x4A,0x30,0x01,0x5B,0x22,  /* 00002488    "._EJ0.["" */
+    0x0A,0xC8,0x5B,0x83,0x47,0x07,0x43,0x44,  /* 00002490    "..[.G.CD" */
+    0x5F,0x5F,0x0D,0x10,0xB0,0x00,0x00,0x06,  /* 00002498    "__......" */
+    0x08,0x5F,0x48,0x49,0x44,0x0D,0x41,0x43,  /* 000024A0    "._HID.AC" */
+    0x50,0x49,0x30,0x30,0x30,0x37,0x00,0x5B,  /* 000024A8    "PI0007.[" */
+    0x80,0x4D,0x41,0x54,0x52,0x00,0x72,0x4D,  /* 000024B0    ".MATR.rM" */
+    0x41,0x50,0x41,0x0A,0x68,0x00,0x0A,0x08,  /* 000024B8    "APA.h..." */
+    0x5B,0x81,0x0C,0x4D,0x41,0x54,0x52,0x01,  /* 000024C0    "[..MATR." */
+    0x4D,0x41,0x54,0x5F,0x40,0x04,0x5B,0x81,  /* 000024C8    "MAT_@.[." */
+    0x0D,0x4D,0x41,0x54,0x52,0x01,0x00,0x20,  /* 000024D0    ".MATR.. " */
+    0x46,0x4C,0x47,0x5F,0x01,0x14,0x0D,0x5F,  /* 000024D8    "FLG_..._" */
+    0x4D,0x41,0x54,0x00,0xA4,0x96,0x4D,0x41,  /* 000024E0    "MAT...MA" */
+    0x54,0x5F,0x00,0x14,0x14,0x5F,0x53,0x54,  /* 000024E8    "T_..._ST" */
+    0x41,0x00,0xA0,0x08,0x46,0x4C,0x47,0x5F,  /* 000024F0    "A...FLG_" */
+    0xA4,0x0A,0x0F,0xA1,0x04,0xA4,0x0A,0x09,  /* 000024F8    "........" */
+    0x14,0x0A,0x5F,0x45,0x4A,0x30,0x01,0x5B,  /* 00002500    ".._EJ0.[" */
+    0x22,0x0A,0xC8,0x5B,0x83,0x47,0x07,0x43,  /* 00002508    ""..[.G.C" */
+    0x45,0x5F,0x5F,0x0E,0x10,0xB0,0x00,0x00,  /* 00002510    "E__....." */
+    0x06,0x08,0x5F,0x48,0x49,0x44,0x0D,0x41,  /* 00002518    ".._HID.A" */
+    0x43,0x50,0x49,0x30,0x30,0x30,0x37,0x00,  /* 00002520    "CPI0007." */
+    0x5B,0x80,0x4D,0x41,0x54,0x52,0x00,0x72,  /* 00002528    "[.MATR.r" */
+    0x4D,0x41,0x50,0x41,0x0A,0x70,0x00,0x0A,  /* 00002530    "MAPA.p.." */
+    0x08,0x5B,0x81,0x0C,0x4D,0x41,0x54,0x52,  /* 00002538    ".[..MATR" */
+    0x01,0x4D,0x41,0x54,0x5F,0x40,0x04,0x5B,  /* 00002540    ".MAT_@.[" */
+    0x81,0x0D,0x4D,0x41,0x54,0x52,0x01,0x00,  /* 00002548    "..MATR.." */
+    0x20,0x46,0x4C,0x47,0x5F,0x01,0x14,0x0D,  /* 00002550    " FLG_..." */
+    0x5F,0x4D,0x41,0x54,0x00,0xA4,0x96,0x4D,  /* 00002558    "_MAT...M" */
+    0x41,0x54,0x5F,0x00,0x14,0x14,0x5F,0x53,  /* 00002560    "AT_..._S" */
+    0x54,0x41,0x00,0xA0,0x08,0x46,0x4C,0x47,  /* 00002568    "TA...FLG" */
+    0x5F,0xA4,0x0A,0x0F,0xA1,0x04,0xA4,0x0A,  /* 00002570    "_......." */
+    0x09,0x14,0x0A,0x5F,0x45,0x4A,0x30,0x01,  /* 00002578    "..._EJ0." */
+    0x5B,0x22,0x0A,0xC8,0x14,0x4C,0x46,0x4E,  /* 00002580    "["...LFN" */
+    0x54,0x46,0x59,0x02,0xA0,0x49,0x04,0x93,  /* 00002588    "TFY..I.." */
+    0x68,0x00,0xA0,0x43,0x04,0x92,0x93,0x69,  /* 00002590    "h..C...i" */
+    0x5E,0x2E,0x43,0x30,0x5F,0x5F,0x46,0x4C,  /* 00002598    "^.C0__FL" */
+    0x47,0x5F,0x70,0x69,0x5E,0x2E,0x43,0x30,  /* 000025A0    "G_pi^.C0" */
+    0x5F,0x5F,0x46,0x4C,0x47,0x5F,0xA0,0x14,  /* 000025A8    "__FLG_.." */
+    0x93,0x69,0x01,0x86,0x43,0x30,0x5F,0x5F,  /* 000025B0    ".i..C0__" */
+    0x01,0x74,0x4D,0x53,0x55,0x5F,0x01,0x4D,  /* 000025B8    ".tMSU_.M" */
+    0x53,0x55,0x5F,0xA1,0x12,0x86,0x43,0x30,  /* 000025C0    "SU_...C0" */
+    0x5F,0x5F,0x0A,0x03,0x72,0x4D,0x53,0x55,  /* 000025C8    "__..rMSU" */
+    0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA0,0x49,  /* 000025D0    "_.MSU_.I" */
+    0x04,0x93,0x68,0x01,0xA0,0x43,0x04,0x92,  /* 000025D8    "..h..C.." */
+    0x93,0x69,0x5E,0x2E,0x43,0x31,0x5F,0x5F,  /* 000025E0    ".i^.C1__" */
+    0x46,0x4C,0x47,0x5F,0x70,0x69,0x5E,0x2E,  /* 000025E8    "FLG_pi^." */
+    0x43,0x31,0x5F,0x5F,0x46,0x4C,0x47,0x5F,  /* 000025F0    "C1__FLG_" */
+    0xA0,0x14,0x93,0x69,0x01,0x86,0x43,0x31,  /* 000025F8    "...i..C1" */
+    0x5F,0x5F,0x01,0x74,0x4D,0x53,0x55,0x5F,  /* 00002600    "__.tMSU_" */
+    0x01,0x4D,0x53,0x55,0x5F,0xA1,0x12,0x86,  /* 00002608    ".MSU_..." */
+    0x43,0x31,0x5F,0x5F,0x0A,0x03,0x72,0x4D,  /* 00002610    "C1__..rM" */
+    0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,0x5F,  /* 00002618    "SU_.MSU_" */
+    0xA0,0x4A,0x04,0x93,0x68,0x0A,0x02,0xA0,  /* 00002620    ".J..h..." */
+    0x43,0x04,0x92,0x93,0x69,0x5E,0x2E,0x43,  /* 00002628    "C...i^.C" */
+    0x32,0x5F,0x5F,0x46,0x4C,0x47,0x5F,0x70,  /* 00002630    "2__FLG_p" */
+    0x69,0x5E,0x2E,0x43,0x32,0x5F,0x5F,0x46,  /* 00002638    "i^.C2__F" */
+    0x4C,0x47,0x5F,0xA0,0x14,0x93,0x69,0x01,  /* 00002640    "LG_...i." */
+    0x86,0x43,0x32,0x5F,0x5F,0x01,0x74,0x4D,  /* 00002648    ".C2__.tM" */
+    0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,0x5F,  /* 00002650    "SU_.MSU_" */
+    0xA1,0x12,0x86,0x43,0x32,0x5F,0x5F,0x0A,  /* 00002658    "...C2__." */
+    0x03,0x72,0x4D,0x53,0x55,0x5F,0x01,0x4D,  /* 00002660    ".rMSU_.M" */
+    0x53,0x55,0x5F,0xA0,0x4A,0x04,0x93,0x68,  /* 00002668    "SU_.J..h" */
+    0x0A,0x03,0xA0,0x43,0x04,0x92,0x93,0x69,  /* 00002670    "...C...i" */
+    0x5E,0x2E,0x43,0x33,0x5F,0x5F,0x46,0x4C,  /* 00002678    "^.C3__FL" */
+    0x47,0x5F,0x70,0x69,0x5E,0x2E,0x43,0x33,  /* 00002680    "G_pi^.C3" */
+    0x5F,0x5F,0x46,0x4C,0x47,0x5F,0xA0,0x14,  /* 00002688    "__FLG_.." */
+    0x93,0x69,0x01,0x86,0x43,0x33,0x5F,0x5F,  /* 00002690    ".i..C3__" */
+    0x01,0x74,0x4D,0x53,0x55,0x5F,0x01,0x4D,  /* 00002698    ".tMSU_.M" */
+    0x53,0x55,0x5F,0xA1,0x12,0x86,0x43,0x33,  /* 000026A0    "SU_...C3" */
+    0x5F,0x5F,0x0A,0x03,0x72,0x4D,0x53,0x55,  /* 000026A8    "__..rMSU" */
+    0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA0,0x4A,  /* 000026B0    "_.MSU_.J" */
+    0x04,0x93,0x68,0x0A,0x04,0xA0,0x43,0x04,  /* 000026B8    "..h...C." */
+    0x92,0x93,0x69,0x5E,0x2E,0x43,0x34,0x5F,  /* 000026C0    "..i^.C4_" */
+    0x5F,0x46,0x4C,0x47,0x5F,0x70,0x69,0x5E,  /* 000026C8    "_FLG_pi^" */
+    0x2E,0x43,0x34,0x5F,0x5F,0x46,0x4C,0x47,  /* 000026D0    ".C4__FLG" */
+    0x5F,0xA0,0x14,0x93,0x69,0x01,0x86,0x43,  /* 000026D8    "_...i..C" */
+    0x34,0x5F,0x5F,0x01,0x74,0x4D,0x53,0x55,  /* 000026E0    "4__.tMSU" */
+    0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA1,0x12,  /* 000026E8    "_.MSU_.." */
+    0x86,0x43,0x34,0x5F,0x5F,0x0A,0x03,0x72,  /* 000026F0    ".C4__..r" */
+    0x4D,0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,  /* 000026F8    "MSU_.MSU" */
+    0x5F,0xA0,0x4A,0x04,0x93,0x68,0x0A,0x05,  /* 00002700    "_.J..h.." */
+    0xA0,0x43,0x04,0x92,0x93,0x69,0x5E,0x2E,  /* 00002708    ".C...i^." */
+    0x43,0x35,0x5F,0x5F,0x46,0x4C,0x47,0x5F,  /* 00002710    "C5__FLG_" */
+    0x70,0x69,0x5E,0x2E,0x43,0x35,0x5F,0x5F,  /* 00002718    "pi^.C5__" */
+    0x46,0x4C,0x47,0x5F,0xA0,0x14,0x93,0x69,  /* 00002720    "FLG_...i" */
+    0x01,0x86,0x43,0x35,0x5F,0x5F,0x01,0x74,  /* 00002728    "..C5__.t" */
+    0x4D,0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,  /* 00002730    "MSU_.MSU" */
+    0x5F,0xA1,0x12,0x86,0x43,0x35,0x5F,0x5F,  /* 00002738    "_...C5__" */
+    0x0A,0x03,0x72,0x4D,0x53,0x55,0x5F,0x01,  /* 00002740    "..rMSU_." */
+    0x4D,0x53,0x55,0x5F,0xA0,0x4A,0x04,0x93,  /* 00002748    "MSU_.J.." */
+    0x68,0x0A,0x06,0xA0,0x43,0x04,0x92,0x93,  /* 00002750    "h...C..." */
+    0x69,0x5E,0x2E,0x43,0x36,0x5F,0x5F,0x46,  /* 00002758    "i^.C6__F" */
+    0x4C,0x47,0x5F,0x70,0x69,0x5E,0x2E,0x43,  /* 00002760    "LG_pi^.C" */
+    0x36,0x5F,0x5F,0x46,0x4C,0x47,0x5F,0xA0,  /* 00002768    "6__FLG_." */
+    0x14,0x93,0x69,0x01,0x86,0x43,0x36,0x5F,  /* 00002770    "..i..C6_" */
+    0x5F,0x01,0x74,0x4D,0x53,0x55,0x5F,0x01,  /* 00002778    "_.tMSU_." */
+    0x4D,0x53,0x55,0x5F,0xA1,0x12,0x86,0x43,  /* 00002780    "MSU_...C" */
+    0x36,0x5F,0x5F,0x0A,0x03,0x72,0x4D,0x53,  /* 00002788    "6__..rMS" */
+    0x55,0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA0,  /* 00002790    "U_.MSU_." */
+    0x4A,0x04,0x93,0x68,0x0A,0x07,0xA0,0x43,  /* 00002798    "J..h...C" */
+    0x04,0x92,0x93,0x69,0x5E,0x2E,0x43,0x37,  /* 000027A0    "...i^.C7" */
+    0x5F,0x5F,0x46,0x4C,0x47,0x5F,0x70,0x69,  /* 000027A8    "__FLG_pi" */
+    0x5E,0x2E,0x43,0x37,0x5F,0x5F,0x46,0x4C,  /* 000027B0    "^.C7__FL" */
+    0x47,0x5F,0xA0,0x14,0x93,0x69,0x01,0x86,  /* 000027B8    "G_...i.." */
+    0x43,0x37,0x5F,0x5F,0x01,0x74,0x4D,0x53,  /* 000027C0    "C7__.tMS" */
+    0x55,0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA1,  /* 000027C8    "U_.MSU_." */
+    0x12,0x86,0x43,0x37,0x5F,0x5F,0x0A,0x03,  /* 000027D0    "..C7__.." */
+    0x72,0x4D,0x53,0x55,0x5F,0x01,0x4D,0x53,  /* 000027D8    "rMSU_.MS" */
+    0x55,0x5F,0xA0,0x4A,0x04,0x93,0x68,0x0A,  /* 000027E0    "U_.J..h." */
+    0x08,0xA0,0x43,0x04,0x92,0x93,0x69,0x5E,  /* 000027E8    "..C...i^" */
+    0x2E,0x43,0x38,0x5F,0x5F,0x46,0x4C,0x47,  /* 000027F0    ".C8__FLG" */
+    0x5F,0x70,0x69,0x5E,0x2E,0x43,0x38,0x5F,  /* 000027F8    "_pi^.C8_" */
+    0x5F,0x46,0x4C,0x47,0x5F,0xA0,0x14,0x93,  /* 00002800    "_FLG_..." */
+    0x69,0x01,0x86,0x43,0x38,0x5F,0x5F,0x01,  /* 00002808    "i..C8__." */
+    0x74,0x4D,0x53,0x55,0x5F,0x01,0x4D,0x53,  /* 00002810    "tMSU_.MS" */
+    0x55,0x5F,0xA1,0x12,0x86,0x43,0x38,0x5F,  /* 00002818    "U_...C8_" */
+    0x5F,0x0A,0x03,0x72,0x4D,0x53,0x55,0x5F,  /* 00002820    "_..rMSU_" */
+    0x01,0x4D,0x53,0x55,0x5F,0xA0,0x4A,0x04,  /* 00002828    ".MSU_.J." */
+    0x93,0x68,0x0A,0x09,0xA0,0x43,0x04,0x92,  /* 00002830    ".h...C.." */
+    0x93,0x69,0x5E,0x2E,0x43,0x39,0x5F,0x5F,  /* 00002838    ".i^.C9__" */
+    0x46,0x4C,0x47,0x5F,0x70,0x69,0x5E,0x2E,  /* 00002840    "FLG_pi^." */
+    0x43,0x39,0x5F,0x5F,0x46,0x4C,0x47,0x5F,  /* 00002848    "C9__FLG_" */
+    0xA0,0x14,0x93,0x69,0x01,0x86,0x43,0x39,  /* 00002850    "...i..C9" */
+    0x5F,0x5F,0x01,0x74,0x4D,0x53,0x55,0x5F,  /* 00002858    "__.tMSU_" */
+    0x01,0x4D,0x53,0x55,0x5F,0xA1,0x12,0x86,  /* 00002860    ".MSU_..." */
+    0x43,0x39,0x5F,0x5F,0x0A,0x03,0x72,0x4D,  /* 00002868    "C9__..rM" */
+    0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,0x5F,  /* 00002870    "SU_.MSU_" */
+    0xA0,0x4A,0x04,0x93,0x68,0x0A,0x0A,0xA0,  /* 00002878    ".J..h..." */
+    0x43,0x04,0x92,0x93,0x69,0x5E,0x2E,0x43,  /* 00002880    "C...i^.C" */
+    0x41,0x5F,0x5F,0x46,0x4C,0x47,0x5F,0x70,  /* 00002888    "A__FLG_p" */
+    0x69,0x5E,0x2E,0x43,0x41,0x5F,0x5F,0x46,  /* 00002890    "i^.CA__F" */
+    0x4C,0x47,0x5F,0xA0,0x14,0x93,0x69,0x01,  /* 00002898    "LG_...i." */
+    0x86,0x43,0x41,0x5F,0x5F,0x01,0x74,0x4D,  /* 000028A0    ".CA__.tM" */
+    0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,0x5F,  /* 000028A8    "SU_.MSU_" */
+    0xA1,0x12,0x86,0x43,0x41,0x5F,0x5F,0x0A,  /* 000028B0    "...CA__." */
+    0x03,0x72,0x4D,0x53,0x55,0x5F,0x01,0x4D,  /* 000028B8    ".rMSU_.M" */
+    0x53,0x55,0x5F,0xA0,0x4A,0x04,0x93,0x68,  /* 000028C0    "SU_.J..h" */
+    0x0A,0x0B,0xA0,0x43,0x04,0x92,0x93,0x69,  /* 000028C8    "...C...i" */
+    0x5E,0x2E,0x43,0x42,0x5F,0x5F,0x46,0x4C,  /* 000028D0    "^.CB__FL" */
+    0x47,0x5F,0x70,0x69,0x5E,0x2E,0x43,0x42,  /* 000028D8    "G_pi^.CB" */
+    0x5F,0x5F,0x46,0x4C,0x47,0x5F,0xA0,0x14,  /* 000028E0    "__FLG_.." */
+    0x93,0x69,0x01,0x86,0x43,0x42,0x5F,0x5F,  /* 000028E8    ".i..CB__" */
+    0x01,0x74,0x4D,0x53,0x55,0x5F,0x01,0x4D,  /* 000028F0    ".tMSU_.M" */
+    0x53,0x55,0x5F,0xA1,0x12,0x86,0x43,0x42,  /* 000028F8    "SU_...CB" */
+    0x5F,0x5F,0x0A,0x03,0x72,0x4D,0x53,0x55,  /* 00002900    "__..rMSU" */
+    0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA0,0x4A,  /* 00002908    "_.MSU_.J" */
+    0x04,0x93,0x68,0x0A,0x0C,0xA0,0x43,0x04,  /* 00002910    "..h...C." */
+    0x92,0x93,0x69,0x5E,0x2E,0x43,0x43,0x5F,  /* 00002918    "..i^.CC_" */
+    0x5F,0x46,0x4C,0x47,0x5F,0x70,0x69,0x5E,  /* 00002920    "_FLG_pi^" */
+    0x2E,0x43,0x43,0x5F,0x5F,0x46,0x4C,0x47,  /* 00002928    ".CC__FLG" */
+    0x5F,0xA0,0x14,0x93,0x69,0x01,0x86,0x43,  /* 00002930    "_...i..C" */
+    0x43,0x5F,0x5F,0x01,0x74,0x4D,0x53,0x55,  /* 00002938    "C__.tMSU" */
+    0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA1,0x12,  /* 00002940    "_.MSU_.." */
+    0x86,0x43,0x43,0x5F,0x5F,0x0A,0x03,0x72,  /* 00002948    ".CC__..r" */
+    0x4D,0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,  /* 00002950    "MSU_.MSU" */
+    0x5F,0xA0,0x4A,0x04,0x93,0x68,0x0A,0x0D,  /* 00002958    "_.J..h.." */
+    0xA0,0x43,0x04,0x92,0x93,0x69,0x5E,0x2E,  /* 00002960    ".C...i^." */
+    0x43,0x44,0x5F,0x5F,0x46,0x4C,0x47,0x5F,  /* 00002968    "CD__FLG_" */
+    0x70,0x69,0x5E,0x2E,0x43,0x44,0x5F,0x5F,  /* 00002970    "pi^.CD__" */
+    0x46,0x4C,0x47,0x5F,0xA0,0x14,0x93,0x69,  /* 00002978    "FLG_...i" */
+    0x01,0x86,0x43,0x44,0x5F,0x5F,0x01,0x74,  /* 00002980    "..CD__.t" */
+    0x4D,0x53,0x55,0x5F,0x01,0x4D,0x53,0x55,  /* 00002988    "MSU_.MSU" */
+    0x5F,0xA1,0x12,0x86,0x43,0x44,0x5F,0x5F,  /* 00002990    "_...CD__" */
+    0x0A,0x03,0x72,0x4D,0x53,0x55,0x5F,0x01,  /* 00002998    "..rMSU_." */
+    0x4D,0x53,0x55,0x5F,0xA0,0x4A,0x04,0x93,  /* 000029A0    "MSU_.J.." */
+    0x68,0x0A,0x0E,0xA0,0x43,0x04,0x92,0x93,  /* 000029A8    "h...C..." */
+    0x69,0x5E,0x2E,0x43,0x45,0x5F,0x5F,0x46,  /* 000029B0    "i^.CE__F" */
+    0x4C,0x47,0x5F,0x70,0x69,0x5E,0x2E,0x43,  /* 000029B8    "LG_pi^.C" */
+    0x45,0x5F,0x5F,0x46,0x4C,0x47,0x5F,0xA0,  /* 000029C0    "E__FLG_." */
+    0x14,0x93,0x69,0x01,0x86,0x43,0x45,0x5F,  /* 000029C8    "..i..CE_" */
+    0x5F,0x01,0x74,0x4D,0x53,0x55,0x5F,0x01,  /* 000029D0    "_.tMSU_." */
+    0x4D,0x53,0x55,0x5F,0xA1,0x12,0x86,0x43,  /* 000029D8    "MSU_...C" */
+    0x45,0x5F,0x5F,0x0A,0x03,0x72,0x4D,0x53,  /* 000029E0    "E__..rMS" */
+    0x55,0x5F,0x01,0x4D,0x53,0x55,0x5F,0xA4,  /* 000029E8    "U_.MSU_." */
+    0x01,0x5B,0x80,0x50,0x52,0x53,0x54,0x01,  /* 000029F0    ".[.PRST." */
+    0x0B,0x00,0xAF,0x0A,0x20,0x5B,0x81,0x0C,  /* 000029F8    ".... [.." */
+    0x50,0x52,0x53,0x54,0x01,0x50,0x52,0x53,  /* 00002A00    "PRST.PRS" */
+    0x5F,0x40,0x10,0x14,0x4E,0x04,0x50,0x52,  /* 00002A08    "_@..N.PR" */
+    0x53,0x43,0x00,0x70,0x50,0x52,0x53,0x5F,  /* 00002A10    "SC.pPRS_" */
+    0x63,0x70,0x00,0x60,0xA2,0x3B,0x95,0x60,  /* 00002A18    "cp.`.;.`" */
+    0x0A,0x20,0x70,0x00,0x61,0x70,0x83,0x88,  /* 00002A20    ". p.ap.." */
+    0x63,0x60,0x00,0x62,0xA2,0x29,0x95,0x61,  /* 00002A28    "c`.b.).a" */
+    0x0A,0x08,0x70,0x72,0x77,0x60,0x0A,0x08,  /* 00002A30    "..prw`.." */
+    0x00,0x61,0x00,0x64,0xA0,0x10,0x95,0x64,  /* 00002A38    ".a.d...d" */
+    0x43,0x50,0x55,0x4E,0x4E,0x54,0x46,0x59,  /* 00002A40    "CPUNNTFY" */
+    0x64,0x7B,0x62,0x01,0x00,0xA1,0x02,0xA5,  /* 00002A48    "d{b....." */
+    0x7A,0x62,0x01,0x62,0x75,0x61,0x75,0x60,  /* 00002A50    "zb.buau`" */
     0xA4,0x01,
 };
diff --git a/src/acpi.c b/src/acpi.c
index f613b03..eb4ee99 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -344,9 +344,19 @@ build_fadt(int bdf)
     return fadt;
 }
 
+/* BIOS use only area unit: transfer MADT info to DSDT */
+#define MADT_INFO_PHYSICAL_ADDRESS    0x514
+struct madt_info {
+    u32 madt_csum_addr;    /* address of MADT checksum */
+    u32 madt_lapic0_addr;  /* address of first MADT LAPIC struct */
+    u32 maxcpus;           /* max cpus */
+};
+
 static void*
 build_madt(void)
 {
+    struct madt_info *madt_info;
+
     int madt_size = (sizeof(struct multiple_apic_table)
                      + sizeof(struct madt_processor_apic) * MaxCountCPUs
                      + sizeof(struct madt_io_apic)
@@ -360,6 +370,13 @@ build_madt(void)
     madt->local_apic_address = cpu_to_le32(BUILD_APIC_ADDR);
     madt->flags = cpu_to_le32(1);
     struct madt_processor_apic *apic = (void*)&madt[1];
+
+    madt_info = (struct madt_info *)MADT_INFO_PHYSICAL_ADDRESS;
+    memset(madt_info, 0, sizeof(*madt_info));
+    madt_info->madt_csum_addr = (u32)&madt->checksum;
+    madt_info->madt_lapic0_addr = (u32)apic;
+    madt_info->maxcpus = MaxCountCPUs;
+
     int i;
     for (i=0; i<MaxCountCPUs; i++) {
         apic->type = APIC_PROCESSOR;
@@ -410,13 +427,7 @@ build_madt(void)
 static void*
 build_ssdt(void)
 {
-    int acpi_cpus = MaxCountCPUs > 0xff ? 0xff : MaxCountCPUs;
-    // calculate the length of processor block and scope block
-    // excluding PkgLength
-    int cpu_length = 13 * acpi_cpus + 4;
-
-    int length = sizeof(struct acpi_table_header) + 3 + cpu_length;
-    u8 *ssdt = malloc_high(length);
+    u8 *ssdt = malloc_high(sizeof(struct acpi_table_header));
     if (! ssdt) {
         dprintf(1, "No space for ssdt!\n");
         return NULL;
@@ -426,40 +437,6 @@ build_ssdt(void)
     ssdt_ptr[9] = 0; // checksum;
     ssdt_ptr += sizeof(struct acpi_table_header);
 
-    // build processor scope header
-    *(ssdt_ptr++) = 0x10; // ScopeOp
-    if (cpu_length <= 0x3e) {
-        *(ssdt_ptr++) = cpu_length + 1;
-    } else {
-        *(ssdt_ptr++) = 0x7F;
-        *(ssdt_ptr++) = (cpu_length + 2) >> 6;
-    }
-    *(ssdt_ptr++) = '_'; // Name
-    *(ssdt_ptr++) = 'P';
-    *(ssdt_ptr++) = 'R';
-    *(ssdt_ptr++) = '_';
-
-    // build object for each processor
-    int i;
-    for (i=0; i<acpi_cpus; i++) {
-        *(ssdt_ptr++) = 0x5B; // ProcessorOp
-        *(ssdt_ptr++) = 0x83;
-        *(ssdt_ptr++) = 0x0B; // Length
-        *(ssdt_ptr++) = 'C';  // Name (CPUxx)
-        *(ssdt_ptr++) = 'P';
-        if ((i & 0xf0) != 0)
-            *(ssdt_ptr++) = (i >> 4) < 0xa ? (i >> 4) + '0' : (i >> 4) + 'A' - 0xa;
-        else
-            *(ssdt_ptr++) = 'U';
-        *(ssdt_ptr++) = (i & 0xf) < 0xa ? (i & 0xf) + '0' : (i & 0xf) + 'A' - 0xa;
-        *(ssdt_ptr++) = i;
-        *(ssdt_ptr++) = 0x10; // Processor block address
-        *(ssdt_ptr++) = 0xb0;
-        *(ssdt_ptr++) = 0;
-        *(ssdt_ptr++) = 0;
-        *(ssdt_ptr++) = 6;    // Processor block length
-    }
-
     build_header((void*)ssdt, SSDT_SIGNATURE, ssdt_ptr - ssdt, 1);
 
     return ssdt;
-- 
1.6.5.6

