[PATCH] ACPICA: Add support to parse RASF Table

Sajjan, Vikas C vikas.cha.sajjan at hpe.com
Fri May 6 09:26:02 UTC 2016


Adding Robert Moore.

Hi Nagendra,

-----Original Message-----
From: K V, Nagendra 
Sent: Friday, May 06, 2016 11:16 AM
To: fwts-devel at lists.ubuntu.com; alex.hung at canonical.com; colin.king at canonical.com
Cc: K V, Nagendra <nagendra.k-v at hpe.com>; Sajjan, Vikas C <vikas.cha.sajjan at hpe.com>; Lakshminarasimha, Sunil Vishwanathpur <sunil.vl at hpe.com>
Subject: [PATCH] ACPICA: Add support to parse RASF Table

This patch adds support to parse RASF table. Currently RASF table is not being parsed in FWTS and hence RASF table is not dumped properly.

Below is the current acpidump output,

RASF @ bff02c17 (48 bytes) (loaded from file)
----
[000h 0000   4]                    Signature : "RASF"
[004h 0004   4]                 Table Length : 00000030
[008h 0008   1]                     Revision : 01
[009h 0009   1]                     Checksum : 64
[00Ah 0010   6]                       Oem ID : "HPE   "
[010h 0016   8]                 Oem Table ID : "ProLiant"
[018h 0024   4]                 Oem Revision : 00000001
[01Ch 0028   4]              Asl Compiler ID : "HP  "
[020h 0032   4]        Asl Compiler Revision : 00000001

  0000: 52 41 53 46 30 00 00 00 01 64 48 50 45 20 20 20  RASF0....dHPE
  0010: 50 72 6f 4c 69 61 6e 74 01 00 00 00 48 50 20 20  ProLiant....HP
  0020: 01 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................

With this fix RASF table is parsed and is dumped properly,

RASF @ bff02c17 (48 bytes) (loaded from file)
----
[000h 0000   4]                    Signature : "RASF"    [RAS Features Table]
[004h 0004   4]                 Table Length : 00000030
[008h 0008   1]                     Revision : 01
[009h 0009   1]                     Checksum : 64
[00Ah 0010   6]                       Oem ID : "HPE   "
[010h 0016   8]                 Oem Table ID : "ProLiant"
[018h 0024   4]                 Oem Revision : 00000001
[01Ch 0028   4]              Asl Compiler ID : "HP  "
[020h 0032   4]        Asl Compiler Revision : 00000001
[024h 0036  12]           Channel Identifier : 0000000000000000000000FF

Signed-off-by: Nagendra K V <nagendra.k-v at hpe.com>
---
 src/acpica/source/common/ahtable.c      |  1 +
 src/acpica/source/common/dmtable.c      |  7 +++++++
 src/acpica/source/common/dmtbinfo.c     | 11 +++++++++++
 src/acpica/source/compiler/dtcompiler.h |  1 +  src/acpica/source/compiler/dttemplate.h | 10 ++++++++++
 src/acpica/source/compiler/dtutils.c    |  5 +++++
 src/acpica/source/include/acdisasm.h    |  2 ++
 7 files changed, 37 insertions(+)

diff --git a/src/acpica/source/common/ahtable.c b/src/acpica/source/common/ahtable.c
index 021ae33..0e78f6b 100644
--- a/src/acpica/source/common/ahtable.c
+++ b/src/acpica/source/common/ahtable.c
@@ -218,5 +218,6 @@ const AH_TABLE      AcpiSupportedTables[] =
     {ACPI_SIG_WPBT, "Windows Platform Binary Table"},
     {ACPI_SIG_XENV, "Xen Environment table"},
     {ACPI_SIG_XSDT, "Extended System Description Table"},
+    {ACPI_SIG_RASF, "RAS Features Table"},
     {NULL,          NULL}
 };
diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c
index a62c48d..d2b05ac 100644
--- a/src/acpica/source/common/dmtable.c
+++ b/src/acpica/source/common/dmtable.c
@@ -452,6 +452,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
     {ACPI_SIG_WPBT, NULL,                   AcpiDmDumpWpbt, DtCompileWpbt,  TemplateWpbt},
     {ACPI_SIG_XENV, AcpiDmTableInfoXenv,    NULL,           NULL,           TemplateXenv},
     {ACPI_SIG_XSDT, NULL,                   AcpiDmDumpXsdt, DtCompileXsdt,  TemplateXsdt},
+    {ACPI_SIG_RASF, AcpiDmTableInfoRasf,    NULL,           NULL,           TemplateRasf},
     {NULL,          NULL,                   NULL,           NULL,           NULL}
 };
 
@@ -973,6 +974,11 @@ AcpiDmDumpTable (
             ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
             break;
 
+        case ACPI_DMT_RASF:
+
+            ByteLength = 12;
+            break;
+
         default:
 
             ByteLength = 0;
@@ -1050,6 +1056,7 @@ AcpiDmDumpTable (
 
         /* Integer Data Types */
 
+        case ACPI_DMT_RASF:
         case ACPI_DMT_UINT8:
         case ACPI_DMT_UINT16:
         case ACPI_DMT_UINT24:
diff --git a/src/acpica/source/common/dmtbinfo.c b/src/acpica/source/common/dmtbinfo.c
index bb2cdbf..1854aad 100644
--- a/src/acpica/source/common/dmtbinfo.c
+++ b/src/acpica/source/common/dmtbinfo.c
@@ -194,6 +194,7 @@
 #define ACPI_WDRT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
 #define ACPI_WPBT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f)
 #define ACPI_XENV_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f)
+#define ACPI_RASF_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f)
 
 /* Subtables */
 
@@ -2965,6 +2966,16 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoXenv[] =
     ACPI_DMT_TERMINATOR
 };
 
+/**********************************************************************
+*********
+ *
+ * RASF -  RAS Feature table
+ *
+ ******************************************************************************/
+ACPI_DMTABLE_INFO           AcpiDmTableInfoRasf[] =
+{
+    {ACPI_DMT_RASF,     ACPI_RASF_OFFSET (ChannelId[0]),                "Channel Identifier", 0},
+    ACPI_DMT_TERMINATOR
+};
 
 /*! [Begin] no source code translation */
 
diff --git a/src/acpica/source/compiler/dtcompiler.h b/src/acpica/source/compiler/dtcompiler.h
index eb85ddc..9dc7386 100644
--- a/src/acpica/source/compiler/dtcompiler.h
+++ b/src/acpica/source/compiler/dtcompiler.h
@@ -701,5 +701,6 @@ extern const unsigned char  TemplateWdrt[];  extern const unsigned char  TemplateWpbt[];  extern const unsigned char  TemplateXenv[];  extern const unsigned char  TemplateXsdt[];
+extern const unsigned char  TemplateRasf[];
 
 #endif
diff --git a/src/acpica/source/compiler/dttemplate.h b/src/acpica/source/compiler/dttemplate.h
index f27a77a..9058b64 100644
--- a/src/acpica/source/compiler/dttemplate.h
+++ b/src/acpica/source/compiler/dttemplate.h
@@ -1338,4 +1338,14 @@ const unsigned char TemplateXsdt[] =
     0x00,0x00,0x00,0x00                       /* 00000060    "...."     */
 };
 

There is a clear alphabetically order maintained for the template table in the file.
I think the "TemplateRasf" should come after "const unsigned char TemplatePmtt[] =" and before  "const unsigned char TemplateRsdp[] ="
Please post with this modification while posting to ACPICA mailing list.

+const unsigned char TemplateRasf[] =
+{
+    0x42,0x45,0x52,0x54,0x30,0x00,0x00,0x00,  /* 00000000    "RASF0..." */
+    0x01,0x15,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
+    0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45,  /* 00000010    "TEMPLATE" */
+    0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
+    0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00,  /* 00000020    "(.. ...." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000028    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00   /* 00000030    "........" */
+};
 #endif
diff --git a/src/acpica/source/compiler/dtutils.c b/src/acpica/source/compiler/dtutils.c
index 6ca418c..2fcf98d 100644
--- a/src/acpica/source/compiler/dtutils.c
+++ b/src/acpica/source/compiler/dtutils.c
@@ -708,6 +708,11 @@ DtGetFieldLength (
         ByteLength = (strlen (Value) + 1) * sizeof(UINT16);
         break;
 
+    case ACPI_DMT_RASF:
+
+        ByteLength = 12;
+        break;
+
     default:
 
         DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid table opcode"); diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
index f949a8b..7d6ae2e 100644
--- a/src/acpica/source/include/acdisasm.h
+++ b/src/acpica/source/include/acdisasm.h
@@ -229,6 +229,7 @@ typedef enum
     ACPI_DMT_PMTT,
     ACPI_DMT_SLIC,
     ACPI_DMT_SRAT,
+    ACPI_DMT_RASF,
 
     /* Special opcodes */
 
@@ -490,6 +491,7 @@ extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdrt[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWpbt[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWpbt0[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoXenv[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRasf[];
 
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoGeneric[][2];
 
--
2.5.0




More information about the fwts-devel mailing list