Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46256 )
Change subject: acpigen: Add ShiftLeft function helper ......................................................................
acpigen: Add ShiftLeft function helper
Provide a helper function for the ACPI shift left operator that uses the same operator for the source and result.
ShiftLeft (OP, count, OP)
Signed-off-by: Duncan Laurie dlaurie@google.com Change-Id: I66ee89bd1c4be583d0e892b02535bfa9514d488a --- M src/acpi/acpigen.c M src/include/acpi/acpigen.h 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/46256/1
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index ee7c90c..0ed3708 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -1381,6 +1381,14 @@ acpigen_write_len_f(); }
+void acpigen_write_shiftleft_op_int(uint8_t src_result, uint64_t count) +{ + acpigen_emit_byte(SHIFT_LEFT_OP); + acpigen_emit_byte(src_result); + acpigen_write_integer(count); + acpigen_emit_byte(ZERO_OP); +} + void acpigen_write_to_buffer(uint8_t src, uint8_t dst) { acpigen_emit_byte(TO_BUFFER_OP); diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h index e443267..cb9e9c9 100644 --- a/src/include/acpi/acpigen.h +++ b/src/include/acpi/acpigen.h @@ -378,6 +378,7 @@ void acpigen_write_if_lequal_op_int(uint8_t op, uint64_t val); void acpigen_write_if_lequal_namestr_int(const char *namestr, uint64_t val); void acpigen_write_else(void); +void acpigen_write_shiftleft_op_int(uint8_t src_result, uint64_t count); void acpigen_write_to_buffer(uint8_t src, uint8_t dst); void acpigen_write_to_integer(uint8_t src, uint8_t dst); void acpigen_write_to_integer_from_namestring(const char *source, uint8_t dst_op);
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46256 )
Change subject: acpigen: Add ShiftLeft function helper ......................................................................
Patch Set 2: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46256 )
Change subject: acpigen: Add ShiftLeft function helper ......................................................................
Patch Set 2: Code-Review+1
Duncan Laurie has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46256 )
Change subject: acpigen: Add ShiftLeft function helper ......................................................................
acpigen: Add ShiftLeft function helper
Provide a helper function for the ACPI shift left operator that uses the same operator for the source and result.
ShiftLeft (OP, count, OP)
Signed-off-by: Duncan Laurie dlaurie@google.com Change-Id: I66ee89bd1c4be583d0e892b02535bfa9514d488a Reviewed-on: https://review.coreboot.org/c/coreboot/+/46256 Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/acpi/acpigen.c M src/include/acpi/acpigen.h 2 files changed, 9 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index ee7c90c..0ed3708 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -1381,6 +1381,14 @@ acpigen_write_len_f(); }
+void acpigen_write_shiftleft_op_int(uint8_t src_result, uint64_t count) +{ + acpigen_emit_byte(SHIFT_LEFT_OP); + acpigen_emit_byte(src_result); + acpigen_write_integer(count); + acpigen_emit_byte(ZERO_OP); +} + void acpigen_write_to_buffer(uint8_t src, uint8_t dst) { acpigen_emit_byte(TO_BUFFER_OP); diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h index e443267..cb9e9c9 100644 --- a/src/include/acpi/acpigen.h +++ b/src/include/acpi/acpigen.h @@ -378,6 +378,7 @@ void acpigen_write_if_lequal_op_int(uint8_t op, uint64_t val); void acpigen_write_if_lequal_namestr_int(const char *namestr, uint64_t val); void acpigen_write_else(void); +void acpigen_write_shiftleft_op_int(uint8_t src_result, uint64_t count); void acpigen_write_to_buffer(uint8_t src, uint8_t dst); void acpigen_write_to_integer(uint8_t src, uint8_t dst); void acpigen_write_to_integer_from_namestring(const char *source, uint8_t dst_op);