qemu-e2k/tests/test-qapi-event.c
Ani Sinha 0ed93f4c05 tests/acpi: update golden master DSDT binary table blobs for q35
In the previously applied commit ("piix4: don't reserve hw resources when
hotplug is off globally"), we make changes to the ACPI DSDT tables
such that some ACPI code are not generated when bsel is absent. Since
as of this point in time, in q35 machines, we do not use bsel for pci
buses, we need to update the DSDT table blobs.
This patch updates the DSDT golden master tables for q35 machines.
At the same time, we clear bios-tables-test-allowed-diff.h for future
changes which update tables.

Following is a typical diff between the q35 acpi DSDT table blobs:

@@ -1,30 +1,30 @@
 /*
  * Intel ACPI Component Architecture
  * AML/ASL+ Disassembler version 20180105 (64-bit version)
  * Copyright (c) 2000 - 2018 Intel Corporation
  *
  * Disassembling to symbolic ASL+ operators
  *
- * Disassembly of tests/data/acpi/q35/DSDT, Tue Sep 15 18:52:47 2020
+ * Disassembly of /tmp/aml-3O0DR0, Tue Sep 15 18:52:47 2020
  *
  * Original Table Header:
  *     Signature        "DSDT"
- *     Length           0x00001DFE (7678)
+ *     Length           0x00001DF6 (7670)
  *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
- *     Checksum         0xAC
+ *     Checksum         0x17
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "BXPCDSDT"
  *     OEM Revision     0x00000001 (1)
  *     Compiler ID      "BXPC"
  *     Compiler Version 0x00000001 (1)
  */
 DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001)
 {
     Scope (\)
     {
         OperationRegion (DBG, SystemIO, 0x0402, One)
         Field (DBG, ByteAcc, NoLock, Preserve)
         {
             DBGB,   8
         }

@@ -3113,24 +3113,20 @@
                 Name (_ADR, 0x00010000)  // _ADR: Address
                 Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
                 {
                     Return (Zero)
                 }

                 Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
                 {
                     Return (Zero)
                 }

                 Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                 {
                     Return (Zero)
                 }
             }
-
-            Method (PCNT, 0, NotSerialized)
-            {
-            }
         }
     }
 }

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200918084111.15339-12-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-09-29 03:06:12 -04:00

199 lines
4.5 KiB
C

/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
/*
* schema-defined QAPI event functions
*
* Copyright (c) 2014 Wenchao Xia
*
* Authors:
* Wenchao Xia <wenchaoqemu@gmail.com>
*
* This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
* See the COPYING.LIB file in the top-level directory.
*
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "test-qapi-event.h"
#include "test-qapi-visit.h"
#include "qapi/qmp-output-visitor.h"
#include "qapi/qmp-event.h"
void qapi_event_send_event_a(Error **errp)
{
QDict *qmp;
Error *err = NULL;
QMPEventFuncEmit emit;
emit = qmp_event_get_func_emit();
if (!emit) {
return;
}
qmp = qmp_event_build_dict("EVENT_A");
emit(TEST_QAPI_EVENT_EVENT_A, qmp, &err);
error_propagate(errp, err);
QDECREF(qmp);
}
void qapi_event_send_event_b(Error **errp)
{
QDict *qmp;
Error *err = NULL;
QMPEventFuncEmit emit;
emit = qmp_event_get_func_emit();
if (!emit) {
return;
}
qmp = qmp_event_build_dict("EVENT_B");
emit(TEST_QAPI_EVENT_EVENT_B, qmp, &err);
error_propagate(errp, err);
QDECREF(qmp);
}
void qapi_event_send_event_c(bool has_a, int64_t a, bool has_b, UserDefOne *b, const char *c, Error **errp)
{
QDict *qmp;
Error *err = NULL;
QMPEventFuncEmit emit;
QmpOutputVisitor *qov;
Visitor *v;
q_obj_EVENT_C_arg param = {
has_a, a, has_b, b, (char *)c
};
emit = qmp_event_get_func_emit();
if (!emit) {
return;
}
qmp = qmp_event_build_dict("EVENT_C");
qov = qmp_output_visitor_new();
v = qmp_output_get_visitor(qov);
visit_start_struct(v, "EVENT_C", NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_EVENT_C_arg_members(v, &param, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v);
if (err) {
goto out;
}
qdict_put_obj(qmp, "data", qmp_output_get_qobject(qov));
emit(TEST_QAPI_EVENT_EVENT_C, qmp, &err);
out:
qmp_output_visitor_cleanup(qov);
error_propagate(errp, err);
QDECREF(qmp);
}
void qapi_event_send_event_d(EventStructOne *a, const char *b, bool has_c, const char *c, bool has_enum3, EnumOne enum3, Error **errp)
{
QDict *qmp;
Error *err = NULL;
QMPEventFuncEmit emit;
QmpOutputVisitor *qov;
Visitor *v;
q_obj_EVENT_D_arg param = {
a, (char *)b, has_c, (char *)c, has_enum3, enum3
};
emit = qmp_event_get_func_emit();
if (!emit) {
return;
}
qmp = qmp_event_build_dict("EVENT_D");
qov = qmp_output_visitor_new();
v = qmp_output_get_visitor(qov);
visit_start_struct(v, "EVENT_D", NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_EVENT_D_arg_members(v, &param, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v);
if (err) {
goto out;
}
qdict_put_obj(qmp, "data", qmp_output_get_qobject(qov));
emit(TEST_QAPI_EVENT_EVENT_D, qmp, &err);
out:
qmp_output_visitor_cleanup(qov);
error_propagate(errp, err);
QDECREF(qmp);
}
void qapi_event_send___org_qemu_x_event(__org_qemu_x_Enum __org_qemu_x_member1, const char *__org_qemu_x_member2, bool has_q_wchar_t, int64_t q_wchar_t, Error **errp)
{
QDict *qmp;
Error *err = NULL;
QMPEventFuncEmit emit;
QmpOutputVisitor *qov;
Visitor *v;
__org_qemu_x_Struct param = {
__org_qemu_x_member1, (char *)__org_qemu_x_member2, has_q_wchar_t, q_wchar_t
};
emit = qmp_event_get_func_emit();
if (!emit) {
return;
}
qmp = qmp_event_build_dict("__ORG.QEMU_X-EVENT");
qov = qmp_output_visitor_new();
v = qmp_output_get_visitor(qov);
visit_start_struct(v, "__ORG.QEMU_X-EVENT", NULL, 0, &err);
if (err) {
goto out;
}
visit_type___org_qemu_x_Struct_members(v, &param, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v);
if (err) {
goto out;
}
qdict_put_obj(qmp, "data", qmp_output_get_qobject(qov));
emit(TEST_QAPI_EVENT___ORG_QEMU_X_EVENT, qmp, &err);
out:
qmp_output_visitor_cleanup(qov);
error_propagate(errp, err);
QDECREF(qmp);
}
const char *const test_QAPIEvent_lookup[] = {
[TEST_QAPI_EVENT_EVENT_A] = "EVENT_A",
[TEST_QAPI_EVENT_EVENT_B] = "EVENT_B",
[TEST_QAPI_EVENT_EVENT_C] = "EVENT_C",
[TEST_QAPI_EVENT_EVENT_D] = "EVENT_D",
[TEST_QAPI_EVENT___ORG_QEMU_X_EVENT] = "__ORG.QEMU_X-EVENT",
[TEST_QAPI_EVENT__MAX] = NULL,
};