func = acpi_get_method(parent, method);
if (func) {
- void *start = ctx->current;
-
log_debug("- method %d, %s %p\n", method, parent->name, func);
ret = device_of_to_plat(parent);
if (ret)
return log_msg_ret("ofdata", ret);
+ ctx->tab_start = ctx->current;
ret = func(parent, ctx);
if (ret)
return log_msg_ret("func", ret);
/* Add the item to the internal list */
if (type != TYPE_NONE) {
- ret = acpi_add_item(ctx, parent, type, start);
+ ret = acpi_add_item(ctx, parent, type, ctx->tab_start);
if (ret)
return log_msg_ret("add", ret);
}
*
* @base: Base address of ACPI tables
* @current: Current address for writing
+ * @tab_start: Address of start of the table being written. This is set up
+ * before the writer or driver method is called. It must not be changed by the
+ * method
* @rsdp: Pointer to the Root System Description Pointer, typically used when
* adding a new table. The RSDP holds pointers to the RSDT and XSDT.
* @rsdt: Pointer to the Root System Description Table
struct acpi_ctx {
void *base;
void *current;
+ void *tab_start;
struct acpi_rsdp *rsdp;
struct acpi_rsdt *rsdt;
struct acpi_xsdt *xsdt;