“689d5ee1572d870ef1c01a39b8e2d52ef9d06f66”上不存在“go/git@gitcode.net:Crayonxin2000/Paddle.git”
提交 0073518d 编写于 作者: I Igor Mammedov 提交者: Michael S. Tsirkin

acpi: add aml_sleep()

Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
上级 67a5c0fa
...@@ -1228,6 +1228,16 @@ Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed, ...@@ -1228,6 +1228,16 @@ Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed,
addr_trans, len, flags); addr_trans, len, flags);
} }
/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefSleep */
Aml *aml_sleep(uint64_t msec)
{
Aml *var = aml_alloc();
build_append_byte(var->buf, 0x5B); /* ExtOpPrefix */
build_append_byte(var->buf, 0x22); /* SleepOp */
aml_append(var, aml_int(msec));
return var;
}
static uint8_t Hex2Byte(const char *src) static uint8_t Hex2Byte(const char *src)
{ {
int hi, lo; int hi, lo;
......
...@@ -296,6 +296,7 @@ Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed, ...@@ -296,6 +296,7 @@ Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed,
uint64_t addr_gran, uint64_t addr_min, uint64_t addr_gran, uint64_t addr_min,
uint64_t addr_max, uint64_t addr_trans, uint64_t addr_max, uint64_t addr_trans,
uint64_t len); uint64_t len);
Aml *aml_sleep(uint64_t msec);
/* Block AML object primitives */ /* Block AML object primitives */
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2); Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册