Skip to content

Commit

Permalink
acpi: add aml_increment() term
Browse files Browse the repository at this point in the history
Add encoding for ACPI DefIncrement Opcode.

Reviewed-by: Shannon Zhao <zhaoshenglong@huawei.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
marcel-apf authored and mstsirkin committed Jun 1, 2015
1 parent f7bd7b8 commit af39d53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hw/acpi/aml-build.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,14 @@ Aml *aml_add(Aml *arg1, Aml *arg2)
return var;
}

/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefIncrement */
Aml *aml_increment(Aml *arg)
{
Aml *var = aml_opcode(0x75 /* IncrementOp */);
aml_append(var, arg);
return var;
}

/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefIndex */
Aml *aml_index(Aml *arg1, Aml *idx)
{
Expand Down
1 change: 1 addition & 0 deletions include/hw/acpi/aml-build.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ Aml *aml_shiftleft(Aml *arg1, Aml *count);
Aml *aml_shiftright(Aml *arg1, Aml *count);
Aml *aml_lless(Aml *arg1, Aml *arg2);
Aml *aml_add(Aml *arg1, Aml *arg2);
Aml *aml_increment(Aml *arg);
Aml *aml_index(Aml *arg1, Aml *idx);
Aml *aml_notify(Aml *arg1, Aml *arg2);
Aml *aml_call1(const char *method, Aml *arg1);
Expand Down

0 comments on commit af39d53

Please sign in to comment.