mirror of https://github.com/proxmox/mirror_qemu
acpi: add aml_reserved_field() 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>master
parent
ddf1ec2ffe
commit
e2ea299b01
|
@ -598,6 +598,16 @@ Aml *aml_named_field(const char *name, unsigned length)
|
||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: ReservedField */
|
||||||
|
Aml *aml_reserved_field(unsigned length)
|
||||||
|
{
|
||||||
|
Aml *var = aml_alloc();
|
||||||
|
/* ReservedField := 0x00 PkgLength */
|
||||||
|
build_append_byte(var->buf, 0x00);
|
||||||
|
build_append_pkg_length(var->buf, length, false);
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
|
||||||
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefField */
|
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefField */
|
||||||
Aml *aml_field(const char *name, AmlFieldFlags flags)
|
Aml *aml_field(const char *name, AmlFieldFlags flags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,12 @@ typedef enum {
|
||||||
} AmlIODecode;
|
} AmlIODecode;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
aml_any_acc = 0,
|
||||||
aml_byte_acc = 1,
|
aml_byte_acc = 1,
|
||||||
|
aml_word_acc = 2,
|
||||||
|
aml_dword_acc = 3,
|
||||||
|
aml_qword_acc = 4,
|
||||||
|
aml_buffer_acc = 5,
|
||||||
} AmlFieldFlags;
|
} AmlFieldFlags;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -91,6 +96,7 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t max_base,
|
||||||
Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
|
Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
|
||||||
uint32_t offset, uint32_t len);
|
uint32_t offset, uint32_t len);
|
||||||
Aml *aml_named_field(const char *name, unsigned length);
|
Aml *aml_named_field(const char *name, unsigned length);
|
||||||
|
Aml *aml_reserved_field(unsigned length);
|
||||||
Aml *aml_local(int num);
|
Aml *aml_local(int num);
|
||||||
Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
||||||
Aml *aml_equal(Aml *arg1, Aml *arg2);
|
Aml *aml_equal(Aml *arg1, Aml *arg2);
|
||||||
|
|
Loading…
Reference in New Issue