UPSTREAM: arch/x86/acpigen: Implement acpigen functions to return integer & string

Add ACPI method to return integer & string.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17450
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: I2a668ccadecb71b71531e2eb53a52015fca96738
Reviewed-on: https://chromium-review.googlesource.com/412851
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Naresh G Solanki 2016-11-17 00:16:29 +05:30 committed by chrome-bot
parent a3ae852f5d
commit d722ad983a
2 changed files with 14 additions and 0 deletions

View file

@ -1168,6 +1168,18 @@ void acpigen_write_return_byte(uint8_t arg)
acpigen_write_byte(arg);
}
void acpigen_write_return_integer(uint64_t arg)
{
acpigen_emit_byte(RETURN_OP);
acpigen_write_integer(arg);
}
void acpigen_write_return_string(const char *arg)
{
acpigen_emit_byte(RETURN_OP);
acpigen_write_string(arg);
}
/*
* Generate ACPI AML code for _DSM method.
* This function takes as input uuid for the device, set of callbacks and

View file

@ -144,6 +144,8 @@ struct opregion {
unsigned long regionlen;
};
void acpigen_write_return_integer(uint64_t arg);
void acpigen_write_return_string(const char *arg);
void acpigen_write_len_f(void);
void acpigen_pop_len(void);
void acpigen_set_current(char *curr);