From 1fc6bb93829397859b17e1fb0866d686ad6c19d6 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Mon, 14 Nov 2016 14:16:26 -0800 Subject: arch/x86/acpigen: Fix acpigen for If (Lequal (...)) acpigen_write_if_lequal is used to generate ACPI code to check if two operands are equal, where operand1 is an ACPI op and operand2 is an integer. Update name of function to reflect this and fix code to write integer instead of emitting byte for operand2. TEST=Verified by disassembling SSDT on reef that ACPI code generated for If with operand2 greater than 1 is correct. If ((Local1 == 0x02)) { Return (0x01) } Else { Return (Buffer (One) { 0x00 /* . */ }) } Change-Id: If643c078b06d4e2e5a084b51c458dd612d565acc Reported-by: Naresh G Solanki Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/17421 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/x86/acpigen_dsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/arch/x86/acpigen_dsm.c') diff --git a/src/arch/x86/acpigen_dsm.c b/src/arch/x86/acpigen_dsm.c index c6d614afd4..1aab90b714 100644 --- a/src/arch/x86/acpigen_dsm.c +++ b/src/arch/x86/acpigen_dsm.c @@ -26,14 +26,14 @@ static void i2c_hid_func0_cb(void *arg) /* ToInteger (Arg1, Local2) */ acpigen_write_to_integer(ARG1_OP, LOCAL2_OP); /* If (LEqual (Local2, 0x0)) */ - acpigen_write_if_lequal(LOCAL2_OP, 0x0); + acpigen_write_if_lequal_op_int(LOCAL2_OP, 0x0); /* Return (Buffer (One) { 0x1f }) */ acpigen_write_return_singleton_buffer(0x1f); acpigen_pop_len(); /* Pop : If */ /* Else */ acpigen_write_else(); /* If (LEqual (Local2, 0x1)) */ - acpigen_write_if_lequal(LOCAL2_OP, 0x1); + acpigen_write_if_lequal_op_int(LOCAL2_OP, 0x1); /* Return (Buffer (One) { 0x3f }) */ acpigen_write_return_singleton_buffer(0x3f); acpigen_pop_len(); /* Pop : If */ -- cgit v1.2.3