mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 01:44:33 +03:00
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:
parent
0e88479c98
commit
548bef3d1a
@ -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"
|
||||
>
|
||||
|
@ -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,71 +826,24 @@ 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)
|
||||
if (!NewTable)
|
||||
{
|
||||
fprintf (stderr, "Could not obtain DSDT\n");
|
||||
return (AE_NO_ACPI_TABLES);
|
||||
}
|
||||
|
||||
AdWriteTable (NewTable, NewTable->Length,
|
||||
ACPI_SIG_DSDT, NewTable->OemTableId);
|
||||
|
||||
@ -906,28 +856,6 @@ AdGetLocalTables (
|
||||
fprintf (stderr, "Could not store DSDT\n");
|
||||
return (AE_NO_ACPI_TABLES);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (stderr, "Could not obtain DSDT\n");
|
||||
return (AE_NO_ACPI_TABLES);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* TBD: Future implementation */
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
/* Get all SSDTs */
|
||||
|
||||
ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_SSDT);
|
||||
do
|
||||
{
|
||||
NewTable = NULL;
|
||||
Status = AcpiOsTableOverride (&TableHeader, &NewTable);
|
||||
|
||||
} while (NewTable);
|
||||
#endif
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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])
|
||||
|
@ -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':
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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 (
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user