Author: tfaber
Date: Sat Feb 25 20:06:05 2017
New Revision: 73909
URL:
http://svn.reactos.org/svn/reactos?rev=73909&view=rev
Log:
[ACPICA]
- Update to version 20160527
CORE-12833
Added:
trunk/reactos/drivers/bus/acpi/acpica/utilities/utascii.c (with props)
Modified:
trunk/reactos/drivers/bus/acpi/CMakeLists.txt
trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c
trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c
trunk/reactos/drivers/bus/acpi/acpica/executer/exnames.c
trunk/reactos/drivers/bus/acpi/acpica/include/acdisasm.h
trunk/reactos/drivers/bus/acpi/acpica/include/acglobal.h
trunk/reactos/drivers/bus/acpi/acpica/include/aclocal.h
trunk/reactos/drivers/bus/acpi/acpica/include/acmacros.h
trunk/reactos/drivers/bus/acpi/acpica/include/acoutput.h
trunk/reactos/drivers/bus/acpi/acpica/include/acpixf.h
trunk/reactos/drivers/bus/acpi/acpica/include/acpredef.h
trunk/reactos/drivers/bus/acpi/acpica/include/acrestyp.h
trunk/reactos/drivers/bus/acpi/acpica/include/actables.h
trunk/reactos/drivers/bus/acpi/acpica/include/actbl3.h
trunk/reactos/drivers/bus/acpi/acpica/include/acutils.h
trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h
trunk/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c
trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c
trunk/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c
trunk/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c
trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c
trunk/reactos/drivers/bus/acpi/acpica/parser/psutils.c
trunk/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c
trunk/reactos/drivers/bus/acpi/acpica/resources/rsserial.c
trunk/reactos/drivers/bus/acpi/acpica/tables/tbdata.c
trunk/reactos/drivers/bus/acpi/acpica/tables/tbfind.c
trunk/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c
trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c
trunk/reactos/drivers/bus/acpi/acpica/utilities/utclib.c
trunk/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c
trunk/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c
trunk/reactos/drivers/bus/acpi/acpica/utilities/utstring.c
Modified: trunk/reactos/drivers/bus/acpi/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/CMakeList…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/CMakeLists.txt [iso-8859-1] Sat Feb 25 20:06:05 2017
@@ -132,9 +132,10 @@
acpica/tables/tbxfroot.c
acpica/utilities/utaddress.c
acpica/utilities/utalloc.c
+ acpica/utilities/utascii.c
acpica/utilities/utbuffer.c
acpica/utilities/utcache.c
- acpica/utilities/utclib.c
+ # acpica/utilities/utclib.c
acpica/utilities/utcopy.c
# acpica/utilities/utdebug.c
acpica/utilities/utdecode.c
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -460,6 +460,9 @@
{
ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
ObjDesc->Method.Mutex->Mutex.SyncLevel;
+
+ ObjDesc->Method.Mutex->Mutex.ThreadId =
+ AcpiOsGetThreadId ();
}
}
Modified: trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/di…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -603,12 +603,14 @@
}
else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
{
- /* TBD: May only be temporary */
-
- ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
-
- strncpy (ObjDesc->String.Pointer, NameString, NameLength);
- Status = AE_OK;
+ /*
+ * This opcode should never appear here. It is used only
+ * by AML disassemblers and is surrounded by an If(0)
+ * by the ASL compiler.
+ *
+ * Therefore, if we see it here, it is a serious error.
+ */
+ Status = AE_AML_BAD_OPCODE;
}
else
{
Modified: trunk/reactos/drivers/bus/acpi/acpica/executer/exnames.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ex…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/executer/exnames.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/executer/exnames.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -204,7 +204,7 @@
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Bytes from stream:\n"));
for (Index = 0;
- (Index < ACPI_NAME_SIZE) && (AcpiUtValidAcpiChar (*AmlAddress, 0));
+ (Index < ACPI_NAME_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0));
Index++)
{
CharBuf[Index] = *AmlAddress++;
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acdisasm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acdisasm.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acdisasm.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -385,6 +385,7 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acglobal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acglobal.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acglobal.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -321,6 +321,7 @@
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE);
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE);
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, TRUE);
+ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmEmitExternalOpcodes, FALSE);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Disasm);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Listing);
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/aclocal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/aclocal.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/aclocal.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -1025,24 +1025,24 @@
/* Parse object flags */
-#define ACPI_PARSEOP_GENERIC 0x01
-#define ACPI_PARSEOP_NAMED 0x02
-#define ACPI_PARSEOP_DEFERRED 0x04
-#define ACPI_PARSEOP_BYTELIST 0x08
-#define ACPI_PARSEOP_IN_STACK 0x10
-#define ACPI_PARSEOP_TARGET 0x20
-#define ACPI_PARSEOP_IN_CACHE 0x80
+#define ACPI_PARSEOP_GENERIC 0x01
+#define ACPI_PARSEOP_NAMED_OBJECT 0x02
+#define ACPI_PARSEOP_DEFERRED 0x04
+#define ACPI_PARSEOP_BYTELIST 0x08
+#define ACPI_PARSEOP_IN_STACK 0x10
+#define ACPI_PARSEOP_TARGET 0x20
+#define ACPI_PARSEOP_IN_CACHE 0x80
/* Parse object DisasmFlags */
-#define ACPI_PARSEOP_IGNORE 0x01
-#define ACPI_PARSEOP_PARAMLIST 0x02
-#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
-#define ACPI_PARSEOP_PREDEF_CHECKED 0x08
-#define ACPI_PARSEOP_CLOSING_PAREN 0x10
-#define ACPI_PARSEOP_COMPOUND 0x20
-#define ACPI_PARSEOP_ASSIGNMENT 0x40
-#define ACPI_PARSEOP_ELSEIF 0x80
+#define ACPI_PARSEOP_IGNORE 0x01
+#define ACPI_PARSEOP_PARAMETER_LIST 0x02
+#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
+#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08
+#define ACPI_PARSEOP_CLOSING_PAREN 0x10
+#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20
+#define ACPI_PARSEOP_ASSIGNMENT 0x40
+#define ACPI_PARSEOP_ELSEIF 0x80
/*****************************************************************************
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acmacros.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acmacros.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acmacros.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -264,10 +264,6 @@
#define ACPI_IS_MISALIGNED(value) (((ACPI_SIZE) value) &
(sizeof(ACPI_SIZE)-1))
-/* Generic (power-of-two) rounding */
-
-#define ACPI_IS_POWER_OF_TWO(a) (((a) & ((a) - 1)) == 0)
-
/*
* Bitmask creation
* Bit positions start at zero.
@@ -291,10 +287,10 @@
/* Generic bitfield macros and masks */
#define ACPI_GET_BITS(SourcePtr, Position, Mask) \
- ((*SourcePtr >> Position) & Mask)
+ ((*(SourcePtr) >> (Position)) & (Mask))
#define ACPI_SET_BITS(TargetPtr, Position, Mask, Value) \
- (*TargetPtr |= ((Value & Mask) << Position))
+ (*(TargetPtr) |= (((Value) & (Mask)) << (Position)))
#define ACPI_1BIT_MASK 0x00000001
#define ACPI_2BIT_MASK 0x00000003
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acoutput.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acoutput.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acoutput.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -372,7 +372,7 @@
ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, UINT32, Value)
#define ACPI_FUNCTION_TRACE_STR(Name, String) \
- ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, char *, String)
+ ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, const char *, String)
#define ACPI_FUNCTION_ENTRY() \
AcpiUtTrackStackPtr()
@@ -431,6 +431,9 @@
#define return_PTR(Pointer) \
ACPI_TRACE_EXIT (AcpiUtPtrExit, void *, Pointer)
+
+#define return_STR(String) \
+ ACPI_TRACE_EXIT (AcpiUtStrExit, const char *, String)
#define return_VALUE(Value) \
ACPI_TRACE_EXIT (AcpiUtValueExit, UINT64, Value)
@@ -486,6 +489,7 @@
#define return_VOID return
#define return_ACPI_STATUS(s) return(s)
#define return_PTR(s) return(s)
+#define return_STR(s) return(s)
#define return_VALUE(s) return(s)
#define return_UINT8(s) return(s)
#define return_UINT32(s) return(s)
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acpixf.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acpixf.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acpixf.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20160318
+#define ACPI_CA_VERSION 0x20160527
#include "acconfig.h"
#include "actypes.h"
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acpredef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acpredef.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acpredef.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -131,7 +131,8 @@
ACPI_PTYPE2_REV_FIXED = 9,
ACPI_PTYPE2_FIX_VAR = 10,
ACPI_PTYPE2_VAR_VAR = 11,
- ACPI_PTYPE2_UUID_PAIR = 12
+ ACPI_PTYPE2_UUID_PAIR = 12,
+ ACPI_PTYPE_CUSTOM = 13
};
@@ -344,7 +345,7 @@
{{"_BIX", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (16 Int),(4 Str)
*/
- PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16,
ACPI_RTYPE_STRING, 4,0),
+ PACKAGE_INFO (ACPI_PTYPE_CUSTOM, ACPI_RTYPE_INTEGER, 16,
ACPI_RTYPE_STRING, 4,0),
{{"_BLT", METHOD_3ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
ACPI_TYPE_INTEGER),
METHOD_NO_RETURN_VALUE}},
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acrestyp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acrestyp.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acrestyp.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -485,6 +485,7 @@
UINT8 Type; \
UINT8 ProducerConsumer; /* For values, see
Producer/Consumer above */\
UINT8 SlaveMode; \
+ UINT8 ConnectionSharing; \
UINT8 TypeRevisionId; \
UINT16 TypeDataLength; \
UINT16 VendorLength; \
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actables.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/actables.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/actables.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -246,10 +246,6 @@
AcpiTbParseRootTable (
ACPI_PHYSICAL_ADDRESS RsdpAddress);
-BOOLEAN
-AcpiIsValidSignature (
- char *Signature);
-
/*
* tbxfload
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/actbl3.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/actbl3.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/actbl3.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -563,9 +563,10 @@
enum AcpiPcctType
{
- ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
- ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
- ACPI_PCCT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
+ ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
+ ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
+ ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
+ ACPI_PCCT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
};
/*
@@ -609,6 +610,30 @@
} ACPI_PCCT_HW_REDUCED;
+
+/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
+
+typedef struct acpi_pcct_hw_reduced_type2
+{
+ ACPI_SUBTABLE_HEADER Header;
+ UINT32 DoorbellInterrupt;
+ UINT8 Flags;
+ UINT8 Reserved;
+ UINT64 BaseAddress;
+ UINT64 Length;
+ ACPI_GENERIC_ADDRESS DoorbellRegister;
+ UINT64 PreserveMask;
+ UINT64 WriteMask;
+ UINT32 Latency;
+ UINT32 MaxAccessRate;
+ UINT16 MinTurnaroundTime;
+ ACPI_GENERIC_ADDRESS DoorbellAckRegister;
+ UINT64 AckPreserveMask;
+ UINT64 AckWriteMask;
+
+} ACPI_PCCT_HW_REDUCED_TYPE2;
+
+
/* Values for doorbell flags above */
#define ACPI_PCCT_INTERRUPT_POLARITY (1)
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acutils.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acutils.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acutils.h [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -115,13 +115,25 @@
/*
* Common error message prefixes
*/
+#ifndef ACPI_MSG_ERROR
#define ACPI_MSG_ERROR "ACPI Error: "
+#endif
+#ifndef ACPI_MSG_EXCEPTION
#define ACPI_MSG_EXCEPTION "ACPI Exception: "
+#endif
+#ifndef ACPI_MSG_WARNING
#define ACPI_MSG_WARNING "ACPI Warning: "
+#endif
+#ifndef ACPI_MSG_INFO
#define ACPI_MSG_INFO "ACPI: "
-
+#endif
+
+#ifndef ACPI_MSG_BIOS_ERROR
#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): "
+#endif
+#ifndef ACPI_MSG_BIOS_WARNING
#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): "
+#endif
/*
* Common message suffix
@@ -175,6 +187,25 @@
/*
+ * utascii - ASCII utilities
+ */
+BOOLEAN
+AcpiUtValidNameseg (
+ char *Signature);
+
+BOOLEAN
+AcpiUtValidNameChar (
+ char Character,
+ UINT32 Position);
+
+void
+AcpiUtCheckAndRepairAscii (
+ UINT8 *Name,
+ char *RepairedName,
+ UINT32 Count);
+
+
+/*
* utnonansi - Non-ANSI C library functions
*/
void
@@ -395,6 +426,14 @@
const char *ModuleName,
UINT32 ComponentId,
UINT8 *Ptr);
+
+void
+AcpiUtStrExit (
+ UINT32 LineNumber,
+ const char *FunctionName,
+ const char *ModuleName,
+ UINT32 ComponentId,
+ const char *String);
void
AcpiUtDebugDumpBuffer (
@@ -831,15 +870,6 @@
UtConvertBackslashes (
char *Pathname);
#endif
-
-BOOLEAN
-AcpiUtValidAcpiName (
- char *Name);
-
-BOOLEAN
-AcpiUtValidAcpiChar (
- char Character,
- UINT32 Position);
void
AcpiUtRepairName (
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h [iso-8859-1]
(original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h [iso-8859-1] Sat Feb
25 20:06:05 2017
@@ -163,6 +163,14 @@
#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetNextFilename
#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseDirectory
+#define ACPI_MSG_ERROR KERN_ERR "ACPI Error: "
+#define ACPI_MSG_EXCEPTION KERN_ERR "ACPI Exception: "
+#define ACPI_MSG_WARNING KERN_WARNING "ACPI Warning: "
+#define ACPI_MSG_INFO KERN_INFO "ACPI: "
+
+#define ACPI_MSG_BIOS_ERROR KERN_ERR "ACPI BIOS Error (bug): "
+#define ACPI_MSG_BIOS_WARNING KERN_WARNING "ACPI BIOS Warning (bug): "
+
#else /* !__KERNEL__ */
#include <stdarg.h>
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -116,8 +116,8 @@
continue;
}
- Status = AcpiNsLookup (NULL, (char *) InitVal->Name, InitVal->Type,
- ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
+ Status = AcpiNsLookup (NULL, ACPI_CAST_PTR (char, InitVal->Name),
+ InitVal->Type, ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
NULL, &NewNode);
if (ACPI_FAILURE (Status))
{
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -381,7 +381,7 @@
case ACPI_TYPE_STRING:
AcpiOsPrintf ("Len %.2X ", ObjDesc->String.Length);
- AcpiUtPrintString (ObjDesc->String.Pointer, 32);
+ AcpiUtPrintString (ObjDesc->String.Pointer, 80);
AcpiOsPrintf ("\n");
break;
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -215,7 +215,7 @@
/*
* Execute \_SB._INI.
- * There appears to be a strict order requirement for \_SB._INI,
+ * There appears to be a strict order requirement for \_SB._INI,
* which should be evaluated before any _REG evaluations.
*/
Status = AcpiGetHandle (NULL, "\\_SB", &Handle);
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/namespace/nsprepkg.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -70,6 +70,12 @@
UINT32 Count2,
UINT32 StartIndex);
+static ACPI_STATUS
+AcpiNsCustomPackage (
+ ACPI_EVALUATE_INFO *Info,
+ ACPI_OPERAND_OBJECT **Elements,
+ UINT32 Count);
+
/*******************************************************************************
*
@@ -148,6 +154,11 @@
*/
switch (Package->RetInfo.Type)
{
+ case ACPI_PTYPE_CUSTOM:
+
+ Status = AcpiNsCustomPackage (Info, Elements, Count);
+ break;
+
case ACPI_PTYPE1_FIXED:
/*
* The package count is fixed and there are no subpackages
@@ -626,6 +637,92 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiNsCustomPackage
+ *
+ * PARAMETERS: Info - Method execution information block
+ * Elements - Pointer to the package elements array
+ * Count - Element count for the package
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Check a returned package object for the correct count and
+ * correct type of all sub-objects.
+ *
+ * NOTE: Currently used for the _BIX method only. When needed for two or more
+ * methods, probably a detect/dispatch mechanism will be required.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiNsCustomPackage (
+ ACPI_EVALUATE_INFO *Info,
+ ACPI_OPERAND_OBJECT **Elements,
+ UINT32 Count)
+{
+ UINT32 ExpectedCount;
+ UINT32 Version;
+ ACPI_STATUS Status = AE_OK;
+
+
+ ACPI_FUNCTION_NAME (NsCustomPackage);
+
+
+ /* Get version number, must be Integer */
+
+ if ((*Elements)->Common.Type != ACPI_TYPE_INTEGER)
+ {
+ ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ "Return Package has invalid object type for version number"));
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ Version = (UINT32) (*Elements)->Integer.Value;
+ ExpectedCount = 21; /* Version 1 */
+
+ if (Version == 0)
+ {
+ ExpectedCount = 20; /* Version 0 */
+ }
+
+ if (Count < ExpectedCount)
+ {
+ ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ "Return Package is too small - found %u elements, expected %u",
+ Count, ExpectedCount));
+ return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
+ }
+ else if (Count > ExpectedCount)
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
+ "%s: Return Package is larger than needed - "
+ "found %u, expected %u\n",
+ Info->FullPathname, Count, ExpectedCount));
+ }
+
+ /* Validate all elements of the returned package */
+
+ Status = AcpiNsCheckPackageElements (Info, Elements,
+ ACPI_RTYPE_INTEGER, 16,
+ ACPI_RTYPE_STRING, 4, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Version 1 has a single trailing integer */
+
+ if (Version > 0)
+ {
+ Status = AcpiNsCheckPackageElements (Info, Elements + 20,
+ ACPI_RTYPE_INTEGER, 1, 0, 0, 20);
+ }
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiNsCheckPackageElements
*
* PARAMETERS: Info - Method execution information block
Modified: trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/na…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -305,13 +305,12 @@
}
-#if 0
+#ifdef _FUTURE_FEATURE
/*
* Begin incoming argument count analysis. Check for too few args
* and too many args.
*/
-
switch (AcpiNsGetType (Info->Node))
{
case ACPI_TYPE_METHOD:
@@ -399,68 +398,73 @@
* If we are expecting a return value, and all went well above,
* copy the return value to an external object.
*/
- if (ReturnBuffer)
- {
- if (!Info->ReturnObject)
- {
- ReturnBuffer->Length = 0;
+ if (!ReturnBuffer)
+ {
+ goto CleanupReturnObject;
+ }
+
+ if (!Info->ReturnObject)
+ {
+ ReturnBuffer->Length = 0;
+ goto Cleanup;
+ }
+
+ if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
+ ACPI_DESC_TYPE_NAMED)
+ {
+ /*
+ * If we received a NS Node as a return object, this means that
+ * the object we are evaluating has nothing interesting to
+ * return (such as a mutex, etc.) We return an error because
+ * these types are essentially unsupported by this interface.
+ * We don't check up front because this makes it easier to add
+ * support for various types at a later date if necessary.
+ */
+ Status = AE_TYPE;
+ Info->ReturnObject = NULL; /* No need to delete a NS Node */
+ ReturnBuffer->Length = 0;
+ }
+
+ if (ACPI_FAILURE (Status))
+ {
+ goto CleanupReturnObject;
+ }
+
+ /* Dereference Index and RefOf references */
+
+ AcpiNsResolveReferences (Info);
+
+ /* Get the size of the returned object */
+
+ Status = AcpiUtGetObjectSize (Info->ReturnObject,
+ &BufferSpaceNeeded);
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Validate/Allocate/Clear caller buffer */
+
+ Status = AcpiUtInitializeBuffer (ReturnBuffer,
+ BufferSpaceNeeded);
+ if (ACPI_FAILURE (Status))
+ {
+ /*
+ * Caller's buffer is too small or a new one can't
+ * be allocated
+ */
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Needed buffer size %X, %s\n",
+ (UINT32) BufferSpaceNeeded,
+ AcpiFormatException (Status)));
}
else
{
- if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
- ACPI_DESC_TYPE_NAMED)
- {
- /*
- * If we received a NS Node as a return object, this means that
- * the object we are evaluating has nothing interesting to
- * return (such as a mutex, etc.) We return an error because
- * these types are essentially unsupported by this interface.
- * We don't check up front because this makes it easier to add
- * support for various types at a later date if necessary.
- */
- Status = AE_TYPE;
- Info->ReturnObject = NULL; /* No need to delete a NS Node */
- ReturnBuffer->Length = 0;
- }
-
- if (ACPI_SUCCESS (Status))
- {
- /* Dereference Index and RefOf references */
-
- AcpiNsResolveReferences (Info);
-
- /* Get the size of the returned object */
-
- Status = AcpiUtGetObjectSize (Info->ReturnObject,
- &BufferSpaceNeeded);
- if (ACPI_SUCCESS (Status))
- {
- /* Validate/Allocate/Clear caller buffer */
-
- Status = AcpiUtInitializeBuffer (ReturnBuffer,
- BufferSpaceNeeded);
- if (ACPI_FAILURE (Status))
- {
- /*
- * Caller's buffer is too small or a new one can't
- * be allocated
- */
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Needed buffer size %X, %s\n",
- (UINT32) BufferSpaceNeeded,
- AcpiFormatException (Status)));
- }
- else
- {
- /* We have enough space for the object, build it */
-
- Status = AcpiUtCopyIobjectToEobject (
- Info->ReturnObject, ReturnBuffer);
- }
- }
- }
- }
- }
+ /* We have enough space for the object, build it */
+
+ Status = AcpiUtCopyIobjectToEobject (
+ Info->ReturnObject, ReturnBuffer);
+ }
+ }
+
+CleanupReturnObject:
if (Info->ReturnObject)
{
Modified: trunk/reactos/drivers/bus/acpi/acpica/parser/psutils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/pa…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/parser/psutils.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/parser/psutils.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -148,7 +148,7 @@
}
else if (OpInfo->Flags & AML_NAMED)
{
- Flags = ACPI_PARSEOP_NAMED;
+ Flags = ACPI_PARSEOP_NAMED_OBJECT;
}
else if (Opcode == AML_INT_BYTELIST_OP)
{
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/resources/rsdumpinfo.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -265,19 +265,20 @@
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (CommonSerialBus.Type),
"Type", AcpiGbl_SbtDecode}, \
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.ProducerConsumer),
"ProducerConsumer", AcpiGbl_ConsumeDecode}, \
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.SlaveMode),
"SlaveMode", AcpiGbl_SmDecode}, \
+ {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET
(CommonSerialBus.ConnectionSharing),"ConnectionSharing",
AcpiGbl_ShrDecode}, \
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (CommonSerialBus.TypeRevisionId),
"TypeRevisionId", NULL}, \
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (CommonSerialBus.TypeDataLength),
"TypeDataLength", NULL}, \
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (CommonSerialBus.ResourceSource),
"ResourceSource", NULL}, \
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (CommonSerialBus.VendorLength),
"VendorLength", NULL}, \
{ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (CommonSerialBus.VendorData),
"VendorData", NULL},
-ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[10] =
+ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[11] =
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpCommonSerialBus), "Common
Serial Bus", NULL},
ACPI_RS_DUMP_COMMON_SERIAL_BUS
};
-ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[13] =
+ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[14] =
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpI2cSerialBus), "I2C
Serial Bus", NULL},
ACPI_RS_DUMP_COMMON_SERIAL_BUS
@@ -286,7 +287,7 @@
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (I2cSerialBus.SlaveAddress),
"SlaveAddress", NULL},
};
-ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[17] =
+ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[18] =
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpSpiSerialBus), "Spi
Serial Bus", NULL},
ACPI_RS_DUMP_COMMON_SERIAL_BUS
@@ -299,7 +300,7 @@
{ACPI_RSD_UINT32, ACPI_RSD_OFFSET (SpiSerialBus.ConnectionSpeed),
"ConnectionSpeed", NULL},
};
-ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[19] =
+ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[20] =
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpUartSerialBus), "Uart
Serial Bus", NULL},
ACPI_RS_DUMP_COMMON_SERIAL_BUS
Modified: trunk/reactos/drivers/bus/acpi/acpica/resources/rsserial.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/re…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/resources/rsserial.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/resources/rsserial.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -153,7 +153,7 @@
*
******************************************************************************/
-ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[16] =
+ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[17] =
{
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
@@ -179,6 +179,10 @@
AML_OFFSET (CommonSerialBus.Flags),
1},
+ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
+ AML_OFFSET (CommonSerialBus.Flags),
+ 2},
+
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
AML_OFFSET (CommonSerialBus.TypeRevisionId),
1},
@@ -233,7 +237,7 @@
*
******************************************************************************/
-ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[20] =
+ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[21] =
{
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
@@ -259,6 +263,10 @@
AML_OFFSET (CommonSerialBus.Flags),
1},
+ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
+ AML_OFFSET (CommonSerialBus.Flags),
+ 2},
+
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
AML_OFFSET (CommonSerialBus.TypeRevisionId),
1},
@@ -329,7 +337,7 @@
*
******************************************************************************/
-ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[22] =
+ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[23] =
{
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
@@ -355,6 +363,10 @@
AML_OFFSET (CommonSerialBus.Flags),
1},
+ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
+ AML_OFFSET (CommonSerialBus.Flags),
+ 2},
+
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
AML_OFFSET (CommonSerialBus.TypeRevisionId),
1},
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/tables/tbdata.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/tables/tbdata.c [iso-8859-1] Sat Feb 25 20:06:05
2017
@@ -441,7 +441,7 @@
ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
"%4.4s 0x%8.8X%8.8X"
" Attempted table install failed",
- AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
+ AcpiUtValidNameseg (TableDesc->Signature.Ascii) ?
TableDesc->Signature.Ascii : "????",
ACPI_FORMAT_UINT64 (TableDesc->Address)));
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbfind.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/tables/tbfind.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/tables/tbfind.c [iso-8859-1] Sat Feb 25 20:06:05
2017
@@ -83,7 +83,7 @@
/* Validate the input table signature */
- if (!AcpiIsValidSignature (Signature))
+ if (!AcpiUtValidNameseg (Signature))
{
return_ACPI_STATUS (AE_BAD_SIGNATURE);
}
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -326,7 +326,7 @@
ACPI_BIOS_ERROR ((AE_INFO,
"Table has invalid signature [%4.4s] (0x%8.8X), "
"must be SSDT or OEMx",
- AcpiUtValidAcpiName (NewTableDesc.Signature.Ascii) ?
+ AcpiUtValidNameseg (NewTableDesc.Signature.Ascii) ?
NewTableDesc.Signature.Ascii : "????",
NewTableDesc.Signature.Integer));
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -411,36 +411,3 @@
AcpiOsUnmapMemory (Table, Length);
return_ACPI_STATUS (AE_OK);
}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiIsValidSignature
- *
- * PARAMETERS: Signature - Sig string to be validated
- *
- * RETURN: TRUE if signature is has 4 valid ACPI characters
- *
- * DESCRIPTION: Validate an ACPI table signature.
- *
- ******************************************************************************/
-
-BOOLEAN
-AcpiIsValidSignature (
- char *Signature)
-{
- UINT32 i;
-
-
- /* Validate each character in the signature */
-
- for (i = 0; i < ACPI_NAME_SIZE; i++)
- {
- if (!AcpiUtValidAcpiChar (Signature[i], i))
- {
- return (FALSE);
- }
- }
-
- return (TRUE);
-}
Added: trunk/reactos/drivers/bus/acpi/acpica/utilities/utascii.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/utilities/utascii.c (added)
+++ trunk/reactos/drivers/bus/acpi/acpica/utilities/utascii.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -0,0 +1,161 @@
+/******************************************************************************
+ *
+ * Module Name: utascii - Utility ascii functions
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2016, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "acpi.h"
+#include "accommon.h"
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtValidNameseg
+ *
+ * PARAMETERS: Name - The name or table signature to be examined.
+ * Four characters, does not have to be a
+ * NULL terminated string.
+ *
+ * RETURN: TRUE if signature is has 4 valid ACPI characters
+ *
+ * DESCRIPTION: Validate an ACPI table signature.
+ *
+ ******************************************************************************/
+
+BOOLEAN
+AcpiUtValidNameseg (
+ char *Name)
+{
+ UINT32 i;
+
+
+ /* Validate each character in the signature */
+
+ for (i = 0; i < ACPI_NAME_SIZE; i++)
+ {
+ if (!AcpiUtValidNameChar (Name[i], i))
+ {
+ return (FALSE);
+ }
+ }
+
+ return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtValidNameChar
+ *
+ * PARAMETERS: Char - The character to be examined
+ * Position - Byte position (0-3)
+ *
+ * RETURN: TRUE if the character is valid, FALSE otherwise
+ *
+ * DESCRIPTION: Check for a valid ACPI character. Must be one of:
+ * 1) Upper case alpha
+ * 2) numeric
+ * 3) underscore
+ *
+ * We allow a '!' as the last character because of the ASF! table
+ *
+ ******************************************************************************/
+
+BOOLEAN
+AcpiUtValidNameChar (
+ char Character,
+ UINT32 Position)
+{
+
+ if (!((Character >= 'A' && Character <= 'Z') ||
+ (Character >= '0' && Character <= '9') ||
+ (Character == '_')))
+ {
+ /* Allow a '!' in the last position */
+
+ if (Character == '!' && Position == 3)
+ {
+ return (TRUE);
+ }
+
+ return (FALSE);
+ }
+
+ return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtCheckAndRepairAscii
+ *
+ * PARAMETERS: Name - Ascii string
+ * Count - Number of characters to check
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Ensure that the requested number of characters are printable
+ * Ascii characters. Sets non-printable and null chars to <space>.
+ *
+ ******************************************************************************/
+
+void
+AcpiUtCheckAndRepairAscii (
+ UINT8 *Name,
+ char *RepairedName,
+ UINT32 Count)
+{
+ UINT32 i;
+
+
+ for (i = 0; i < Count; i++)
+ {
+ RepairedName[i] = (char) Name[i];
+
+ if (!Name[i])
+ {
+ return;
+ }
+ if (!isprint (Name[i]))
+ {
+ RepairedName[i] = ' ';
+ }
+ }
+}
Propchange: trunk/reactos/drivers/bus/acpi/acpica/utilities/utascii.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utclib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/utilities/utclib.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/utilities/utclib.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -107,6 +107,7 @@
* DESCRIPTION: Compare two Buffers, with a maximum length
*
******************************************************************************/
+
int
memcmp (
void *VBuffer1,
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -632,6 +632,48 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiUtStrExit
+ *
+ * PARAMETERS: LineNumber - Caller's line number
+ * FunctionName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
+ * String - String to display
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
+ * set in DebugLevel. Prints exit value also.
+ *
+ ******************************************************************************/
+
+void
+AcpiUtStrExit (
+ UINT32 LineNumber,
+ const char *FunctionName,
+ const char *ModuleName,
+ UINT32 ComponentId,
+ const char *String)
+{
+
+ /* Check if enabled up-front for performance */
+
+ if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
+ {
+ AcpiDebugPrint (ACPI_LV_FUNCTIONS,
+ LineNumber, FunctionName, ModuleName, ComponentId,
+ "%s %s\n", AcpiGbl_FunctionExitPrefix, String);
+ }
+
+ if (AcpiGbl_NestingLevel)
+ {
+ AcpiGbl_NestingLevel--;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiTracePoint
*
* PARAMETERS: Type - Trace event type
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -284,7 +284,7 @@
return_PTR ("Invalid object");
}
- return_PTR (AcpiUtGetTypeName (ObjDesc->Common.Type));
+ return_STR (AcpiUtGetTypeName (ObjDesc->Common.Type));
}
Modified: trunk/reactos/drivers/bus/acpi/acpica/utilities/utstring.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ut…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/utilities/utstring.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/utilities/utstring.c [iso-8859-1] Sat Feb 25
20:06:05 2017
@@ -159,86 +159,6 @@
/*******************************************************************************
*
- * FUNCTION: AcpiUtValidAcpiChar
- *
- * PARAMETERS: Char - The character to be examined
- * Position - Byte position (0-3)
- *
- * RETURN: TRUE if the character is valid, FALSE otherwise
- *
- * DESCRIPTION: Check for a valid ACPI character. Must be one of:
- * 1) Upper case alpha
- * 2) numeric
- * 3) underscore
- *
- * We allow a '!' as the last character because of the ASF! table
- *
- ******************************************************************************/
-
-BOOLEAN
-AcpiUtValidAcpiChar (
- char Character,
- UINT32 Position)
-{
-
- if (!((Character >= 'A' && Character <= 'Z') ||
- (Character >= '0' && Character <= '9') ||
- (Character == '_')))
- {
- /* Allow a '!' in the last position */
-
- if (Character == '!' && Position == 3)
- {
- return (TRUE);
- }
-
- return (FALSE);
- }
-
- return (TRUE);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtValidAcpiName
- *
- * PARAMETERS: Name - The name to be examined. Does not have to
- * be NULL terminated string.
- *
- * RETURN: TRUE if the name is valid, FALSE otherwise
- *
- * DESCRIPTION: Check for a valid ACPI name. Each character must be one of:
- * 1) Upper case alpha
- * 2) numeric
- * 3) underscore
- *
- ******************************************************************************/
-
-BOOLEAN
-AcpiUtValidAcpiName (
- char *Name)
-{
- UINT32 i;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- for (i = 0; i < ACPI_NAME_SIZE; i++)
- {
- if (!AcpiUtValidAcpiChar (Name[i], i))
- {
- return (FALSE);
- }
- }
-
- return (TRUE);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiUtRepairName
*
* PARAMETERS: Name - The ACPI name to be repaired
@@ -286,7 +206,7 @@
for (i = 0; i < ACPI_NAME_SIZE; i++)
{
- if (AcpiUtValidAcpiChar (Name[i], i))
+ if (AcpiUtValidNameChar (Name[i], i))
{
continue;
}