提交 467b07df 编写于 作者: S Shannon Zhao 提交者: Peter Maydell

hw/acpi/aml-build: Add aml_else() term

Signed-off-by: NShannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Message-id: 1432522520-8068-19-git-send-email-zhaoshenglong@huawei.com
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 ea7df04a
...@@ -632,6 +632,13 @@ Aml *aml_if(Aml *predicate) ...@@ -632,6 +632,13 @@ Aml *aml_if(Aml *predicate)
return var; return var;
} }
/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefElse */
Aml *aml_else(void)
{
Aml *var = aml_bundle(0xA1 /* ElseOp */, AML_PACKAGE);
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)
{ {
......
...@@ -254,6 +254,7 @@ Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2); ...@@ -254,6 +254,7 @@ 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); Aml *aml_if(Aml *predicate);
Aml *aml_else(void);
Aml *aml_package(uint8_t num_elements); Aml *aml_package(uint8_t num_elements);
Aml *aml_buffer(int buffer_size, uint8_t *byte_list); Aml *aml_buffer(int buffer_size, uint8_t *byte_list);
Aml *aml_resource_template(void); Aml *aml_resource_template(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册