mirror of
https://github.com/qemu/qemu.git
synced 2025-08-16 14:54:29 +00:00
acpi: add aml_if() term
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ea2407d7e8
commit
32acac9eb3
@ -356,6 +356,14 @@ Aml *aml_scope(const char *name_format, ...)
|
|||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */
|
||||||
|
Aml *aml_if(Aml *predicate)
|
||||||
|
{
|
||||||
|
Aml *var = aml_bundle(0xA0 /* IfOp */, AML_PACKAGE);
|
||||||
|
aml_append(var, predicate);
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
|
||||||
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefMethod */
|
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefMethod */
|
||||||
Aml *aml_method(const char *name, int arg_count)
|
Aml *aml_method(const char *name, int arg_count)
|
||||||
{
|
{
|
||||||
|
@ -63,6 +63,7 @@ void aml_append(Aml *parent_ctx, Aml *child);
|
|||||||
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
||||||
Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
||||||
Aml *aml_method(const char *name, int arg_count);
|
Aml *aml_method(const char *name, int arg_count);
|
||||||
|
Aml *aml_if(Aml *predicate);
|
||||||
|
|
||||||
/* other helpers */
|
/* other helpers */
|
||||||
GArray *build_alloc_array(void);
|
GArray *build_alloc_array(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user