mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
acpi: allow using object as offset for OperationRegion
Extend aml_operation_region() to use object as offset Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
9815cba502
commit
3f3009c098
3 changed files with 19 additions and 18 deletions
|
@ -942,14 +942,14 @@ Aml *aml_package(uint8_t num_elements)
|
|||
|
||||
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefOpRegion */
|
||||
Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
|
||||
uint32_t offset, uint32_t len)
|
||||
Aml *offset, uint32_t len)
|
||||
{
|
||||
Aml *var = aml_alloc();
|
||||
build_append_byte(var->buf, 0x5B); /* ExtOpPrefix */
|
||||
build_append_byte(var->buf, 0x80); /* OpRegionOp */
|
||||
build_append_namestring(var->buf, "%s", name);
|
||||
build_append_byte(var->buf, rs);
|
||||
build_append_int(var->buf, offset);
|
||||
aml_append(var, offset);
|
||||
build_append_int(var->buf, len);
|
||||
return var;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue