Import ACPICA 20130117.

This commit is contained in:
Jung-uk Kim 2013-01-17 21:32:03 +00:00
parent b28e481ae9
commit ee39d6d85c
327 changed files with 829 additions and 519 deletions

View File

@ -1,9 +1,71 @@
----------------------------------------
17 January 2013. Summary of changes for version 20130117:
1) ACPICA Kernel-resident Subsystem:
Updated the AcpiGetSleepTypeData interface: Allow the \_Sx methods to
return either 1 or 2 integers. Although the ACPI spec defines the \_Sx
objects to return a package containing one integer, most BIOS code returns
two integers and the previous code reflects that. However, we also need to
support BIOS code that actually implements to the ACPI spec, and this
change reflects this.
Fixed two issues with the ACPI_DEBUG_PRINT macros:
1) Added the ACPI_DO_WHILE macro to the main DEBUG_PRINT helper macro for
C compilers that require this support.
2) Renamed the internal ACPI_DEBUG macro to ACPI_DO_DEBUG_PRINT since
ACPI_DEBUG is already used by many of the various hosts.
Updated all ACPICA copyrights and signons to 2013. Added the 2013
copyright to all module headers and signons, including the standard Linux
header. This affects virtually every file in the ACPICA core subsystem,
iASL compiler, all ACPICA utilities, and the test suites.
Example Code and Data Size: These are the sizes for the OS-independent
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The
debug version of the code includes the debug output trace mechanism and
has a much larger code and data size.
Previous Release:
Non-Debug Version: 94.5K Code, 25.5K Data, 120.0K Total
Debug Version: 182.2K Code, 74.9K Data, 257.1K Total
Current Release:
Non-Debug Version: 94.5K Code, 25.4K Data, 119.9K Total
Debug Version: 182.3K Code, 75.0K Data, 257.3K Total
2) iASL Compiler/Disassembler and Tools:
Generic Unix OSL: Use a buffer to eliminate multiple vfprintf()s and
prevent a possible fault on some hosts. Some C libraries modify the arg
pointer parameter to vfprintf making it difficult to call it twice in the
AcpiOsVprintf function. Use a local buffer to workaround this issue. This
does not affect the Windows OSL since the Win C library does not modify
the arg pointer. Chao Guan, Bob Moore.
iASL: Fixed a possible infinite loop when the maximum error count is
reached. If an output file other than the .AML file is specified (such as
a listing file), and the maximum number of errors is reached, do not
attempt to flush data to the output file(s) as the compiler is aborting.
This can cause an infinite loop as the max error count code essentially
keeps calling itself.
iASL/Disassembler: Added an option (-in) to ignore NOOP opcodes/operators.
Implemented for both the compiler and the disassembler. Often, the NOOP
opcode is used as padding for packages that are changed dynamically by the
BIOS. When disassembled and recompiled, these NOOPs will cause syntax
errors. This option causes the disassembler to ignore all NOOP opcodes
(0xA3), and it also causes the compiler to ignore all ASL source code NOOP
statements as well.
Debugger: Enhanced the Sleep command to execute all sleep states. This
change allows Sleep to be invoked with no arguments and causes the
debugger to execute all of the sleep states, 0-5, automatically.
----------------------------------------
20 December 2012. Summary of changes for version 20121220:
This release is available at https://www.acpica.org/downloads
The ACPI 5.0 specification is available at www.acpi.info
1) ACPICA Kernel-resident Subsystem:
Implemented a new interface, AcpiWalkResourceBuffer. This interface is an
@ -88,9 +150,6 @@ been updated.
----------------------------------------
14 November 2012. Summary of changes for version 20121114:
This release is available at https://www.acpica.org/downloads
The ACPI 5.0 specification is available at www.acpi.info
1) ACPICA Kernel-resident Subsystem:
Implemented a performance enhancement for ACPI/AML Package objects. This

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -201,7 +201,7 @@ NamePathTail [.]{NameSeg}
"Mutex" { count (2); return (PARSEOP_MUTEX); }
"Name" { count (2); return (PARSEOP_NAME); }
"NAnd" { count (3); return (PARSEOP_NAND); }
"Noop" { count (3); return (PARSEOP_NOOP); }
"Noop" { if (!AcpiGbl_IgnoreNoopOperator) {count (3); return (PARSEOP_NOOP);} }
"NOr" { count (3); return (PARSEOP_NOR); }
"Not" { count (3); return (PARSEOP_NOT); }
"Notify" { count (3); return (PARSEOP_NOTIFY); }

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -660,7 +660,6 @@ AslCommonError (
Gbl_SourceLine = 0;
Gbl_NextError = Gbl_ErrorLog;
CmDoOutputFiles ();
CmCleanupAndExit ();
exit(1);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -117,6 +117,8 @@ LsTreeWriteWalk (
UINT32 Level,
void *Context);
#define ASL_LISTING_LINE_PREFIX ": "
/*******************************************************************************
*
@ -665,7 +667,8 @@ LsWriteListingHexBytes (
{
case ASL_FILE_LISTING_OUTPUT:
FlPrintFile (FileId, "%8.8X....", Gbl_CurrentAmlOffset);
FlPrintFile (FileId, "%8.8X%s", Gbl_CurrentAmlOffset,
ASL_LISTING_LINE_PREFIX);
break;
case ASL_FILE_ASM_SOURCE_OUTPUT:
@ -725,6 +728,24 @@ LsWriteOneSourceLine (
Gbl_SourceLine++;
Gbl_ListingNode->LineNumber++;
/* Ignore lines that are completely blank (but count the line above) */
if (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) != AE_OK)
{
return (0);
}
if (FileByte == '\n')
{
return (1);
}
/*
* This is a non-empty line, we will print the entire line with
* the line number and possibly other prefixes and transforms.
*/
/* Line prefixes for special files, C and ASM output */
if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
{
FlPrintFile (FileId, " *");
@ -740,19 +761,21 @@ LsWriteOneSourceLine (
* This file contains "include" statements, print the current
* filename and line number within the current file
*/
FlPrintFile (FileId, "%12s %5d....",
Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber);
FlPrintFile (FileId, "%12s %5d%s",
Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber,
ASL_LISTING_LINE_PREFIX);
}
else
{
/* No include files, just print the line number */
FlPrintFile (FileId, "%8d....", Gbl_SourceLine);
FlPrintFile (FileId, "%8u%s", Gbl_SourceLine,
ASL_LISTING_LINE_PREFIX);
}
/* Read one line (up to a newline or EOF) */
/* Read the rest of this line (up to a newline or EOF) */
while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK)
do
{
if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
{
@ -766,13 +789,15 @@ LsWriteOneSourceLine (
if (FileByte == '\n')
{
/*
* This line has been completed.
* Check if an error occurred on this source line during the compile.
* If so, we print the error message after the source line.
*/
LsCheckException (Gbl_SourceLine, FileId);
return (1);
}
}
} while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK);
/* EOF on the input file was reached */

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -153,6 +153,7 @@ Options (
ACPI_OPTION ("-oi", "Disable integer optimization to Zero/One/Ones");
ACPI_OPTION ("-on", "Disable named reference string optimization");
ACPI_OPTION ("-cr", "Disable Resource Descriptor error checking");
ACPI_OPTION ("-in", "Ignore NoOp operators");
ACPI_OPTION ("-r <revision>", "Override table header Revision (1-255)");
printf ("\nASL Listing Files:\n");
@ -172,6 +173,7 @@ Options (
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 ("-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");
printf ("\nHelp:\n");
@ -622,6 +624,13 @@ AslDoOptions (
Gbl_C_IncludeOutputFlag = TRUE;
break;
case 'n':
/* Compiler/Disassembler: Ignore the NOOP operator */
AcpiGbl_IgnoreNoopOperator = TRUE;
break;
default:
printf ("Unknown option: -i%s\n", AcpiGbl_Optarg);
return (-1);

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -66,6 +66,7 @@ ApCheckForSpecialName (
static void
ApCheckObjectType (
const char *PredefinedName,
ACPI_PARSE_OBJECT *Op,
UINT32 ExpectedBtypes);
@ -383,7 +384,8 @@ ApCheckPredefinedReturnValue (
/* Static data return object - check against expected type */
ApCheckObjectType (ReturnValueOp,
ApCheckObjectType (PredefinedNames[Index].Info.Name,
ReturnValueOp,
PredefinedNames[Index].Info.ExpectedBtypes);
break;
@ -482,7 +484,8 @@ ApCheckForPredefinedObject (
/* Typecheck the actual object, it is the next argument */
ApCheckObjectType (Op->Asl.Child->Asl.Next,
ApCheckObjectType (PredefinedNames[Index].Info.Name,
Op->Asl.Child->Asl.Next,
PredefinedNames[Index].Info.ExpectedBtypes);
return;
}
@ -640,7 +643,8 @@ ApCheckForSpecialName (
*
* FUNCTION: ApCheckObjectType
*
* PARAMETERS: Op - Current parse node
* PARAMETERS: PredefinedName - Name of the predefined object we are checking
* Op - Current parse node
* ExpectedBtypes - Bitmap of expected return type(s)
*
* RETURN: None
@ -653,6 +657,7 @@ ApCheckForSpecialName (
static void
ApCheckObjectType (
const char *PredefinedName,
ACPI_PARSE_OBJECT *Op,
UINT32 ExpectedBtypes)
{
@ -701,8 +706,8 @@ TypeErrorExit:
ApGetExpectedTypes (StringBuffer, ExpectedBtypes);
sprintf (MsgBuffer, "found %s, requires %s",
UtGetOpName (Op->Asl.ParseOpcode), StringBuffer);
sprintf (MsgBuffer, "%s: found %s, requires %s",
PredefinedName, UtGetOpName (Op->Asl.ParseOpcode), StringBuffer);
AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op,
MsgBuffer);

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -82,6 +82,10 @@ AcpiDbDeviceResources (
void *Context,
void **ReturnValue);
static void
AcpiDbDoOneSleepState (
UINT8 SleepState);
/*******************************************************************************
*
@ -145,11 +149,12 @@ AcpiDbConvertToNode (
*
* FUNCTION: AcpiDbSleep
*
* PARAMETERS: ObjectArg - Desired sleep state (0-5)
* PARAMETERS: ObjectArg - Desired sleep state (0-5). NULL means
* invoke all possible sleep states.
*
* RETURN: Status
*
* DESCRIPTION: Simulate a sleep/wake sequence
* DESCRIPTION: Simulate sleep/wake sequences
*
******************************************************************************/
@ -157,50 +162,124 @@ ACPI_STATUS
AcpiDbSleep (
char *ObjectArg)
{
ACPI_STATUS Status;
UINT8 SleepState;
UINT32 i;
ACPI_FUNCTION_TRACE (AcpiDbSleep);
SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
/* Null input (no arguments) means to invoke all sleep states */
AcpiOsPrintf ("**** Prepare to sleep ****\n");
if (!ObjectArg)
{
AcpiOsPrintf ("Invoking all possible sleep states, 0-%d\n",
ACPI_S_STATES_MAX);
for (i = 0; i <= ACPI_S_STATES_MAX; i++)
{
AcpiDbDoOneSleepState ((UINT8) i);
}
return_ACPI_STATUS (AE_OK);
}
/* Convert argument to binary and invoke the sleep state */
SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
AcpiDbDoOneSleepState (SleepState);
return_ACPI_STATUS (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDoOneSleepState
*
* PARAMETERS: SleepState - Desired sleep state (0-5)
*
* RETURN: Status
*
* DESCRIPTION: Simulate a sleep/wake sequence
*
******************************************************************************/
static void
AcpiDbDoOneSleepState (
UINT8 SleepState)
{
ACPI_STATUS Status;
UINT8 SleepTypeA;
UINT8 SleepTypeB;
/* Validate parameter */
if (SleepState > ACPI_S_STATES_MAX)
{
AcpiOsPrintf ("Sleep state %d out of range (%d max)\n",
SleepState, ACPI_S_STATES_MAX);
return;
}
AcpiOsPrintf ("\n---- Invoking sleep state S%d (%s):\n",
SleepState, AcpiGbl_SleepStateNames[SleepState]);
/* Get the values for the sleep type registers (for display only) */
Status = AcpiGetSleepTypeData (SleepState, &SleepTypeA, &SleepTypeB);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not evaluate [%s] method, %s\n",
AcpiGbl_SleepStateNames[SleepState],
AcpiFormatException (Status));
return;
}
AcpiOsPrintf (
"Register values for sleep state S%d: Sleep-A: %.2X, Sleep-B: %.2X\n",
SleepState, SleepTypeA, SleepTypeB);
/* Invoke the various sleep/wake interfaces */
AcpiOsPrintf ("**** Sleep: Prepare to sleep (S%d) ****\n",
SleepState);
Status = AcpiEnterSleepStatePrep (SleepState);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
}
AcpiOsPrintf ("**** Going to sleep ****\n");
AcpiOsPrintf ("**** Sleep: Going to sleep (S%d) ****\n",
SleepState);
Status = AcpiEnterSleepState (SleepState);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
}
AcpiOsPrintf ("**** Prepare to return from sleep ****\n");
AcpiOsPrintf ("**** Wake: Prepare to return from sleep (S%d) ****\n",
SleepState);
Status = AcpiLeaveSleepStatePrep (SleepState);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
}
AcpiOsPrintf ("**** Returning from sleep ****\n");
AcpiOsPrintf ("**** Wake: Return from sleep (S%d) ****\n",
SleepState);
Status = AcpiLeaveSleepState (SleepState);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
}
return_ACPI_STATUS (Status);
return;
ErrorExit:
ACPI_EXCEPTION ((AE_INFO, Status, "During sleep test"));
return_ACPI_STATUS (Status);
ACPI_EXCEPTION ((AE_INFO, Status, "During invocation of sleep state S%d",
SleepState));
}

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -210,7 +210,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
{"RESOURCES", 1},
{"RESULTS", 0},
{"SET", 3},
{"SLEEP", 1},
{"SLEEP", 0},
{"STATS", 1},
{"STOP", 0},
{"TABLES", 0},
@ -274,7 +274,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " References <Addr>", "Find all references to object at addr\n"},
{1, " Resources <DeviceName | *>", "Display Device resources (* = all devices)\n"},
{1, " Set N <NamedObject> <Value>", "Set value for named integer\n"},
{1, " Sleep <SleepState>", "Simulate sleep/wake sequence\n"},
{1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"},
{1, " Template <Object>", "Format/dump a Buffer/ResourceTemplate\n"},
{1, " Terminate", "Delete namespace and all internal objects\n"},
{1, " Type <Object>", "Display object type\n"},

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -398,7 +398,6 @@ AcpiDbDisassembleMethod (
/* Now we can disassemble the method */
AcpiGbl_DbOpt_verbose = TRUE;
AcpiGbl_DbOpt_verbose = FALSE;
AcpiDmDisassemble (NULL, Op, 0);
AcpiGbl_DbOpt_verbose = TRUE;

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -441,7 +441,30 @@ AcpiDmDescendingOp (
* This is a first-level element of a term list,
* indent a new line
*/
AcpiDmIndent (Level);
switch (Op->Common.AmlOpcode)
{
case AML_NOOP_OP:
/*
* Optionally just ignore this opcode. Some tables use
* NoOp opcodes for "padding" out packages that the BIOS
* changes dynamically. This can leave hundreds or
* thousands of NoOp opcodes that if disassembled,
* cannot be compiled because they are syntactically
* incorrect.
*/
if (AcpiGbl_IgnoreNoopOperator)
{
Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
return (AE_OK);
}
/* Fallthrough */
default:
AcpiDmIndent (Level);
break;
}
Info->LastLevel = Level;
Info->Count = 0;
}

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2012, Intel Corp.
* Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

Some files were not shown because too many files have changed in this diff Show More