iASL: Remove -g option (get ACPI tables from registry).

This option was only available on Windows. It has been made obsolete
by the acpidump utility, so it is removed from iASL.
This commit is contained in:
Robert Moore 2014-02-13 09:23:19 -08:00
parent 0e88479c98
commit 548bef3d1a
8 changed files with 22 additions and 161 deletions

View File

@ -1843,30 +1843,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\source\os_specific\service_layers\oswintbl.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
DisableLanguageExtensions="false"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
DisableLanguageExtensions="false"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\source\os_specific\service_layers\oswinxf.c"
>

View File

@ -322,7 +322,6 @@ AdInitialize (
* OutToFile - TRUE if output should go to a file
* Prefix - Path prefix for output
* OutFilename - where the filename is returned
* GetAllTables - TRUE if all tables are desired
*
* RETURN: Status
*
@ -335,8 +334,7 @@ AdAmlDisassemble (
BOOLEAN OutToFile,
char *Filename,
char *Prefix,
char **OutFilename,
BOOLEAN GetAllTables)
char **OutFilename)
{
ACPI_STATUS Status;
char *DisasmFilename = NULL;
@ -420,7 +418,7 @@ AdAmlDisassemble (
}
else
{
Status = AdGetLocalTables (Filename, GetAllTables);
Status = AdGetLocalTables ();
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not get ACPI tables, %s\n",
@ -818,8 +816,7 @@ AdDisplayTables (
*
* FUNCTION: AdGetLocalTables
*
* PARAMETERS: Filename - Not used
* GetAllTables - TRUE if all tables are desired
* PARAMETERS: None
*
* RETURN: Status
*
@ -829,105 +826,36 @@ AdDisplayTables (
ACPI_STATUS
AdGetLocalTables (
char *Filename,
BOOLEAN GetAllTables)
void)
{
ACPI_STATUS Status;
ACPI_TABLE_HEADER TableHeader;
ACPI_TABLE_HEADER *NewTable;
UINT32 NumTables;
UINT32 PointerSize;
UINT32 TableIndex;
if (GetAllTables)
{
ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_RSDT);
AcpiOsTableOverride (&TableHeader, &NewTable);
if (!NewTable)
{
fprintf (stderr, "Could not obtain RSDT\n");
return (AE_NO_ACPI_TABLES);
}
else
{
AdWriteTable (NewTable, NewTable->Length,
ACPI_SIG_RSDT, NewTable->OemTableId);
}
if (ACPI_COMPARE_NAME (NewTable->Signature, ACPI_SIG_RSDT))
{
PointerSize = sizeof (UINT32);
}
else
{
PointerSize = sizeof (UINT64);
}
/*
* Determine the number of tables pointed to by the RSDT/XSDT.
* This is defined by the ACPI Specification to be the number of
* pointers contained within the RSDT/XSDT. The size of the pointers
* is architecture-dependent.
*/
NumTables = (NewTable->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize;
AcpiOsPrintf ("There are %u tables defined in the %4.4s\n\n",
NumTables, NewTable->Signature);
/* Get the FADT */
ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_FADT);
AcpiOsTableOverride (&TableHeader, &NewTable);
if (NewTable)
{
AdWriteTable (NewTable, NewTable->Length,
ACPI_SIG_FADT, NewTable->OemTableId);
}
AcpiOsPrintf ("\n");
/* Don't bother with FACS, it is usually all zeros */
}
/* Always get the DSDT */
/* Get the DSDT via table override */
ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_DSDT);
AcpiOsTableOverride (&TableHeader, &NewTable);
if (NewTable)
{
AdWriteTable (NewTable, NewTable->Length,
ACPI_SIG_DSDT, NewTable->OemTableId);
/* Store DSDT in the Table Manager */
Status = AcpiTbStoreTable (0, NewTable, NewTable->Length,
0, &TableIndex);
if (ACPI_FAILURE (Status))
{
fprintf (stderr, "Could not store DSDT\n");
return (AE_NO_ACPI_TABLES);
}
}
else
if (!NewTable)
{
fprintf (stderr, "Could not obtain DSDT\n");
return (AE_NO_ACPI_TABLES);
}
#if 0
/* TBD: Future implementation */
AdWriteTable (NewTable, NewTable->Length,
ACPI_SIG_DSDT, NewTable->OemTableId);
AcpiOsPrintf ("\n");
/* Store DSDT in the Table Manager */
/* Get all SSDTs */
ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_SSDT);
do
Status = AcpiTbStoreTable (0, NewTable, NewTable->Length,
0, &TableIndex);
if (ACPI_FAILURE (Status))
{
NewTable = NULL;
Status = AcpiOsTableOverride (&TableHeader, &NewTable);
} while (NewTable);
#endif
fprintf (stderr, "Could not store DSDT\n");
return (AE_NO_ACPI_TABLES);
}
return (AE_OK);
}

View File

@ -231,7 +231,6 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NoErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_WarningsAsErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NoResourceChecking, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisasmFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_GetAllTables, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_IntegerOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ReferenceOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayRemarks, TRUE);

View File

@ -230,7 +230,6 @@ Usage (
ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)");
ACPI_OPTION ("-e <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution");
ACPI_OPTION ("-fe <file>", "Specify external symbol declaration file");
ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)");
ACPI_OPTION ("-in", "Ignore NoOp opcodes");
ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file");
@ -391,16 +390,6 @@ main (
/* Perform global actions first/only */
if (Gbl_GetAllTables)
{
Status = AslDoOneFile (NULL);
if (ACPI_FAILURE (Status))
{
return (-1);
}
return (0);
}
if (Gbl_DisassembleAll)
{
while (argv[Index1])

View File

@ -190,8 +190,7 @@ AslCommandLine (
/* Next parameter must be the input filename */
if (!argv[AcpiGbl_Optind] &&
!Gbl_DisasmFlag &&
!Gbl_GetAllTables)
!Gbl_DisasmFlag)
{
printf ("Missing input filename\n");
BadCommandLine = TRUE;
@ -390,9 +389,8 @@ AslDoOptions (
case 'g': /* Get all ACPI tables */
Gbl_GetAllTables = TRUE;
Gbl_DoCompile = FALSE;
break;
printf ("-g option is deprecated, use acpidump utility instead\n");
exit (1);
case 'h':

View File

@ -323,7 +323,7 @@ AslDoDisassembly (
AcpiGbl_DbOpt_disasm = TRUE;
Status = AdAmlDisassemble (AslToFile,
Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_OutputFilenamePrefix,
&Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_GetAllTables);
&Gbl_Files[ASL_FILE_INPUT].Filename);
if (ACPI_FAILURE (Status))
{
return (Status);
@ -403,7 +403,7 @@ AslDoOneFile (
/*
* AML Disassembly (Optional)
*/
if (Gbl_DisasmFlag || Gbl_GetAllTables)
if (Gbl_DisasmFlag)
{
Status = AslDoDisassembly ();
if (Status != AE_CTRL_CONTINUE)

View File

@ -197,8 +197,7 @@ AdAmlDisassemble (
BOOLEAN OutToFile,
char *Filename,
char *Prefix,
char **OutFilename,
BOOLEAN GetAllTables);
char **OutFilename);
void
AdPrintStatistics (
@ -215,8 +214,7 @@ AdDumpTables (
ACPI_STATUS
AdGetLocalTables (
char *Filename,
BOOLEAN GetAllTables);
void);
ACPI_STATUS
AdParseTable (

View File

@ -310,10 +310,6 @@ AcpiOsTableOverride (
ACPI_TABLE_HEADER *ExistingTable,
ACPI_TABLE_HEADER **NewTable)
{
#ifdef ACPI_ASL_COMPILER
ACPI_STATUS Status;
ACPI_PHYSICAL_ADDRESS Address;
#endif
if (!ExistingTable || !NewTable)
{
@ -330,29 +326,6 @@ AcpiOsTableOverride (
AeTableOverride (ExistingTable, NewTable);
#endif
#ifdef ACPI_ASL_COMPILER
/* Attempt to get the table from the registry */
/* Construct a null-terminated string from table signature */
ACPI_MOVE_NAME (TableName, ExistingTable->Signature);
TableName[ACPI_NAME_SIZE] = 0;
Status = AcpiOsGetTableByName (TableName, 0, NewTable, &Address);
if (ACPI_SUCCESS (Status))
{
AcpiOsPrintf ("Table [%s] obtained from registry, %u bytes\n",
TableName, (*NewTable)->Length);
}
else
{
AcpiOsPrintf ("Could not read table %s from registry (%s)\n",
TableName, AcpiFormatException (Status));
}
#endif
return (AE_OK);
}