diff mbox

[5/5] bios: Add tests for the IPMI ACPI and SMBIOS entries

Message ID 1456340356-17147-6-git-send-email-minyard@acm.org (mailing list archive)
State New, archived
Headers show

Commit Message

Corey Minyard Feb. 24, 2016, 6:59 p.m. UTC
From: Corey Minyard <cminyard@mvista.com>

Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
 tests/acpi-test-data/pc/DSDT.ipmikcs | Bin 0 -> 5574 bytes
 tests/acpi-test-data/q35/DSDT.ipmibt | Bin 0 -> 8420 bytes
 tests/bios-tables-test.c             |  58 ++++++++++++++++++++++++++++++++---
 3 files changed, 54 insertions(+), 4 deletions(-)
 create mode 100644 tests/acpi-test-data/pc/DSDT.ipmikcs
 create mode 100644 tests/acpi-test-data/q35/DSDT.ipmibt
diff mbox

Patch

diff --git a/tests/acpi-test-data/pc/DSDT.ipmikcs b/tests/acpi-test-data/pc/DSDT.ipmikcs
new file mode 100644
index 0000000000000000000000000000000000000000..b73ccc0ee985c5d0d3aa9d11715d1e7ea9e1e85a
GIT binary patch
literal 5574
zcmb7I-ER}w6+hQANygW9GERmNz7{L6(4__Z0Rg0{iaq1R4jyOlIEZRcXPgApX}e_<
zKw5}a3RyK|dE2^F?VF)~hCiWws`|Kp!uDU-s)Z-gb7p)UH!#vRQfBTs=XZbSew=ge
z9UHdM{QD6A=9HH8ik&Ilv2+7<3;?K2Z?!7l1!vnRExIfblbQ205w!79Qna5KrIkhY
zr?&S;&wKdHV=W(6U#TxvTmDyj-YO92(W=imHPl(xF1gOm2}`eL6}M6~lErViq_{<+
z0gAg)HJEBDA*QTUta4L;7=qA@!>CwI6OsVmzE6PcJXJ}ax?Qdt8LMHq8EwwBn?>+R
z<N2g&J@L5eb(7z8Jm`3d{rw(v$G_>c;18`N{PW)<J?QZX#nl^jI?cy-<2Yj^2N~co
zsGnY<(a><6onzLWTp<{1QUZoUv2q1H27F&#7#V_9<*HqDLmVzF;jU!$82301_uMZo
z5exMMs9c7znpLhdxDJwDq=uxI@TDvm_*82rE=$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9eT)p>d(?2q+2L%E0#ThC~tRJ3ENd7oBNDWMf(BVlK=c-5!RK4<5G
zo$Cu2e=*Q-FLDMR71YR!Mu8g6&S!S+I(D>I>iy3~>>`0S8LSOmhsgn%37RKbg5qh8
zt`Le}6%kOuIwGJWQP6^5#YhNQM<bzvbxc6<3+dwnxFT2;0aYTQf;BFn@hIq3!O8`c
zM?wWFCSo|PL=<#RuqFjG83`4vDFIDIL9YqcaRD8VgbG%?r-x&mh=N`htg3*jkx;>!
z7SMDQ^oC%a6wt{?s9>EE(5WbBQLtj<httv`p@Q{@fF6m0mIUjxfKEq31?y1(JsJho
z1?!A}&O|~5>oEa676ml~>u~`+9tjn!Cj|6F6tpZ@PYUSCNT^^vC7`FGpbLWa69N4s
z5-M0v3+U;OLAA;W<959n>n69___44{wQeI2R1~n9g+hh|VVOq(D^h6LCV?!et#$%`
zdfK(Itn{TANdudV5*CNPjeK1l*vJ{Cc;80e<_0!$hl$#^k-uwXo7ie&b;VP4*T#es
zGM=j_AK3A9-L)}wgdM+zP(HA$Bx4c?dnS+%?DHgJI1BrBARpL+8Dn4yJ02#xwmxL1
zS!0L|>@;s<$WAlIU>VpmBoEo=QO0c_*tbbWyLOuHf%pp?{Q^T<h-cjj>o*K8smmin
zM{@X6UQITu6hZV`-nls7*S_6sq&ED|H{4&ZJqW+6P)WD9;7;@^`IjV%;YX<ARu}Mw
Pz%-5@oVTHufY^TlB<@;F

literal 0
HcmV?d00001

diff --git a/tests/acpi-test-data/q35/DSDT.ipmibt b/tests/acpi-test-data/q35/DSDT.ipmibt
new file mode 100644
index 0000000000000000000000000000000000000000..2e8f3e33137888ae7c050d396a42cf613f1656db
GIT binary patch
literal 8420
zcmb7J&u<&Y8J#65YBi*!rL>l1*^UUcNSd@xD9druq76*$@|Vq()+FtupaHJrxRslx
zStvG;#0X$3Kz{g8AYmP}H_FgC|3Y)@F}DWjsX)*}fnHJ+_9^Q7W;oK!Dgt61xbw}v
z_kHtbcjv8k{EpxKrpTD}p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ff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 0a80ddf..e681ced 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -50,6 +50,8 @@  typedef struct {
     GArray *tables;
     uint32_t smbios_ep_addr;
     struct smbios_21_entry_point smbios_ep_table;
+    uint8_t *required_struct_types;
+    int required_struct_types_len;
 } test_data;
 
 #define ACPI_READ_FIELD(field, addr)           \
@@ -335,7 +337,7 @@  static void test_acpi_tables(test_data *data)
     for (i = 0; i < tables_nr; i++) {
         AcpiSdtTable ssdt_table;
 
-        memset(&ssdt_table, 0 , sizeof(ssdt_table));
+        memset(&ssdt_table, 0, sizeof(ssdt_table));
         uint32_t addr = data->rsdt_tables_addr[i + 1]; /* fadt is first */
         test_dst_table(&ssdt_table, addr);
         g_array_append_val(data->tables, ssdt_table);
@@ -654,7 +656,6 @@  static void test_smbios_structs(test_data *data)
     uint32_t addr = ep_table->structure_table_address;
     int i, len, max_len = 0;
     uint8_t type, prv, crt;
-    uint8_t required_struct_types[] = {0, 1, 3, 4, 16, 17, 19, 32, 127};
 
     /* walk the smbios tables */
     for (i = 0; i < ep_table->number_of_structures; i++) {
@@ -694,8 +695,8 @@  static void test_smbios_structs(test_data *data)
     g_assert_cmpuint(ep_table->max_structure_size, ==, max_len);
 
     /* required struct types must all be present */
-    for (i = 0; i < ARRAY_SIZE(required_struct_types); i++) {
-        g_assert(test_bit(required_struct_types[i], struct_bitmap));
+    for (i = 0; i < data->required_struct_types_len; i++) {
+        g_assert(test_bit(data->required_struct_types[i], struct_bitmap));
     }
 }
 
@@ -735,6 +736,9 @@  static void test_acpi_one(const char *params, test_data *data)
     g_free(args);
 }
 
+static uint8_t base_required_struct_types[] =
+    {0, 1, 3, 4, 16, 17, 19, 32, 127};
+
 static void test_acpi_piix4_tcg(void)
 {
     test_data data;
@@ -744,6 +748,8 @@  static void test_acpi_piix4_tcg(void)
      */
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_PC;
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine accel=tcg", &data);
     free_test_data(&data);
 }
@@ -755,6 +761,8 @@  static void test_acpi_piix4_tcg_bridge(void)
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_PC;
     data.variant = ".bridge";
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine accel=tcg -device pci-bridge,chassis_nr=1", &data);
     free_test_data(&data);
 }
@@ -765,6 +773,8 @@  static void test_acpi_q35_tcg(void)
 
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_Q35;
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine q35,accel=tcg", &data);
     free_test_data(&data);
 }
@@ -776,11 +786,49 @@  static void test_acpi_q35_tcg_bridge(void)
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_Q35;
     data.variant = ".bridge";
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine q35,accel=tcg -device pci-bridge,chassis_nr=1",
                   &data);
     free_test_data(&data);
 }
 
+static uint8_t ipmi_required_struct_types[] =
+    {0, 1, 3, 4, 16, 17, 19, 32, 38, 127};
+
+static void test_acpi_q35_tcg_ipmi(void)
+{
+    test_data data;
+
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_Q35;
+    data.variant = ".ipmibt";
+    data.required_struct_types = ipmi_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(ipmi_required_struct_types);
+    test_acpi_one("-machine q35,accel=tcg -device ipmi-bmc-sim,id=bmc0"
+                  " -device isa-ipmi-bt,bmc=bmc0",
+                  &data);
+    free_test_data(&data);
+}
+
+static void test_acpi_piix4_tcg_ipmi(void)
+{
+    test_data data;
+
+    /* Supplying -machine accel argument overrides the default (qtest).
+     * This is to make guest actually run.
+     */
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_PC;
+    data.variant = ".ipmikcs";
+    data.required_struct_types = ipmi_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(ipmi_required_struct_types);
+    test_acpi_one("-machine accel=tcg -device ipmi-bmc-sim,id=bmc0"
+                  " -device isa-ipmi-kcs,irq=0,bmc=bmc0",
+                  &data);
+    free_test_data(&data);
+}
+
 int main(int argc, char *argv[])
 {
     const char *arch = qtest_get_arch();
@@ -797,6 +845,8 @@  int main(int argc, char *argv[])
         qtest_add_func("acpi/piix4/tcg/bridge", test_acpi_piix4_tcg_bridge);
         qtest_add_func("acpi/q35/tcg", test_acpi_q35_tcg);
         qtest_add_func("acpi/q35/tcg/bridge", test_acpi_q35_tcg_bridge);
+        qtest_add_func("acpi/piix4/tcg/ipmi", test_acpi_piix4_tcg_ipmi);
+        qtest_add_func("acpi/q35/tcg/ipmi", test_acpi_q35_tcg_ipmi);
     }
     ret = g_test_run();
     boot_sector_cleanup(disk);