Skip to content

Commit

Permalink
ACPICA: re-factor table init routines for benefit of iASL
Browse files Browse the repository at this point in the history
Required new table init interface since iASL does not use RSDP/XSDT.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed Feb 3, 2007
1 parent 694b0b2 commit 77389e1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
30 changes: 25 additions & 5 deletions drivers/acpi/tables/tbxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,29 @@ ACPI_MODULE_NAME("tbxface")
/* Local prototypes */
static acpi_status acpi_tb_load_namespace(void);

/*******************************************************************************
*
* FUNCTION: acpi_allocate_root_table
*
* PARAMETERS: initial_table_count - Size of initial_table_array, in number of
* struct acpi_table_desc structures
*
* RETURN: Status
*
* DESCRIPTION: Allocate a root table array. Used by i_aSL compiler and
* acpi_initialize_tables.
*
******************************************************************************/

acpi_status acpi_allocate_root_table(u32 initial_table_count)
{

acpi_gbl_root_table_list.size = initial_table_count;
acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE;

return (acpi_tb_resize_root_table_list());
}

/*******************************************************************************
*
* FUNCTION: acpi_initialize_tables
Expand Down Expand Up @@ -79,7 +102,7 @@ static acpi_status acpi_tb_load_namespace(void);
******************************************************************************/

acpi_status __init
acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
u32 initial_table_count, u8 allow_resize)
{
acpi_physical_address rsdp_address;
Expand All @@ -92,10 +115,7 @@ acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
* Allocate the table array if requested
*/
if (!initial_table_array) {
acpi_gbl_root_table_list.size = initial_table_count;
acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE;

status = acpi_tb_resize_root_table_list();
status = acpi_allocate_root_table(initial_table_count);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
Expand Down
2 changes: 2 additions & 0 deletions include/acpi/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#ifndef __ACTABLES_H__
#define __ACTABLES_H__

acpi_status acpi_allocate_root_table(u32 initial_table_count);

/*
* tbfadt - FADT parse/convert/validate
*/
Expand Down

0 comments on commit 77389e1

Please sign in to comment.