From 9d39e615a85d5e81e8442ec3bf65c8dff5e393c5 Mon Sep 17 00:00:00 2001 From: msmith Date: Fri, 7 Sep 2001 01:22:25 +0000 Subject: Vendor-branch import of the Intel ACPI CA 20010831 snapshot. --- sys/contrib/dev/acpica/acmacros.h | 73 ++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 35 deletions(-) (limited to 'sys/contrib/dev/acpica/acmacros.h') diff --git a/sys/contrib/dev/acpica/acmacros.h b/sys/contrib/dev/acpica/acmacros.h index 620a8d5..755bdb0 100644 --- a/sys/contrib/dev/acpica/acmacros.h +++ b/sys/contrib/dev/acpica/acmacros.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acmacros.h - C macros for the entire subsystem. - * $Revision: 86 $ + * $Revision: 94 $ * *****************************************************************************/ @@ -320,7 +320,7 @@ #define ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) -/* +/* * Bitmask creation * Bit positions start at zero. * MASK_BITS_ABOVE creates a mask starting AT the position and above @@ -330,7 +330,6 @@ #define MASK_BITS_BELOW(position) (((UINT32)(-1)) << ((UINT32) (position))) - /* Macros for GAS addressing */ #ifndef _IA16 @@ -395,9 +394,9 @@ * Macros for the master AML opcode table */ #ifdef ACPI_DEBUG -#define OP_INFO_ENTRY(Flags,Name,PArgs,IArgs) {Flags,PArgs,IArgs,Name} +#define ACPI_OP(Name,PArgs,IArgs,Flags) {PArgs,IArgs,Flags,Name} #else -#define OP_INFO_ENTRY(Flags,Name,PArgs,IArgs) {Flags,PArgs,IArgs} +#define ACPI_OP(Name,PArgs,IArgs,Flags) {PArgs,IArgs,Flags} #endif #define ARG_TYPE_WIDTH 5 @@ -460,37 +459,33 @@ #ifdef ACPI_DEBUG -#define REPORT_INFO(fp) {_ReportInfo(_THIS_MODULE,__LINE__,_COMPONENT); \ +#define REPORT_INFO(fp) {AcpiUtReportInfo(_THIS_MODULE,__LINE__,_COMPONENT); \ AcpiOsPrintf PARAM_LIST(fp);} -#define REPORT_ERROR(fp) {_ReportError(_THIS_MODULE,__LINE__,_COMPONENT); \ +#define REPORT_ERROR(fp) {AcpiUtReportError(_THIS_MODULE,__LINE__,_COMPONENT); \ AcpiOsPrintf PARAM_LIST(fp);} -#define REPORT_WARNING(fp) {_ReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \ +#define REPORT_WARNING(fp) {AcpiUtReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \ AcpiOsPrintf PARAM_LIST(fp);} #else -#define REPORT_INFO(fp) {_ReportInfo("ACPI",__LINE__,_COMPONENT); \ +#define REPORT_INFO(fp) {AcpiUtReportInfo("ACPI",__LINE__,_COMPONENT); \ AcpiOsPrintf PARAM_LIST(fp);} -#define REPORT_ERROR(fp) {_ReportError("ACPI",__LINE__,_COMPONENT); \ +#define REPORT_ERROR(fp) {AcpiUtReportError("ACPI",__LINE__,_COMPONENT); \ AcpiOsPrintf PARAM_LIST(fp);} -#define REPORT_WARNING(fp) {_ReportWarning("ACPI",__LINE__,_COMPONENT); \ +#define REPORT_WARNING(fp) {AcpiUtReportWarning("ACPI",__LINE__,_COMPONENT); \ AcpiOsPrintf PARAM_LIST(fp);} #endif /* Error reporting. These versions pass thru the module and line# */ -#define _REPORT_INFO(a,b,c,fp) {_ReportInfo(a,b,c); \ +#define _REPORT_INFO(a,b,c,fp) {AcpiUtReportInfo(a,b,c); \ AcpiOsPrintf PARAM_LIST(fp);} -#define _REPORT_ERROR(a,b,c,fp) {_ReportError(a,b,c); \ +#define _REPORT_ERROR(a,b,c,fp) {AcpiUtReportError(a,b,c); \ AcpiOsPrintf PARAM_LIST(fp);} -#define _REPORT_WARNING(a,b,c,fp) {_ReportWarning(a,b,c); \ +#define _REPORT_WARNING(a,b,c,fp) {AcpiUtReportWarning(a,b,c); \ AcpiOsPrintf PARAM_LIST(fp);} -/* Buffer dump macros */ - -#define DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) - /* * Debug macros that are conditionally compiled */ @@ -505,15 +500,22 @@ * as a local string ("_ProcName) so that it can be also used by the function exit macros below. */ -#define PROC_NAME(a) char * _ProcName = a; -#define FUNCTION_TRACE(a) char * _ProcName = a;\ - FunctionTrace(_THIS_MODULE,__LINE__,_COMPONENT,a) -#define FUNCTION_TRACE_PTR(a,b) char * _ProcName = a;\ - FunctionTracePtr(_THIS_MODULE,__LINE__,_COMPONENT,a,(void *)b) -#define FUNCTION_TRACE_U32(a,b) char * _ProcName = a;\ - FunctionTraceU32(_THIS_MODULE,__LINE__,_COMPONENT,a,(UINT32)b) -#define FUNCTION_TRACE_STR(a,b) char * _ProcName = a;\ - FunctionTraceStr(_THIS_MODULE,__LINE__,_COMPONENT,a,(NATIVE_CHAR *)b) +#define PROC_NAME(a) ACPI_DEBUG_PRINT_INFO _Dbg; \ + _Dbg.ComponentId = _COMPONENT; \ + _Dbg.ProcName = a; \ + _Dbg.ModuleName = _THIS_MODULE; + +#define FUNCTION_TRACE(a) PROC_NAME(a)\ + AcpiUtTrace(__LINE__,&_Dbg) +#define FUNCTION_TRACE_PTR(a,b) PROC_NAME(a)\ + AcpiUtTracePtr(__LINE__,&_Dbg,(void *)b) +#define FUNCTION_TRACE_U32(a,b) PROC_NAME(a)\ + AcpiUtTraceU32(__LINE__,&_Dbg,(UINT32)b) +#define FUNCTION_TRACE_STR(a,b) PROC_NAME(a)\ + AcpiUtTraceStr(__LINE__,&_Dbg,(NATIVE_CHAR *)b) + +#define FUNCTION_ENTRY() AcpiUtTrackStackPtr() + /* * Function exit tracing. * WARNING: These macros include a return statement. This is usually considered @@ -521,10 +523,10 @@ * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros * so that "_ProcName" is defined. */ -#define return_VOID {FunctionExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName);return;} -#define return_ACPI_STATUS(s) {FunctionStatusExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);} -#define return_VALUE(s) {FunctionValueExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);} -#define return_PTR(s) {FunctionPtrExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(UINT8 *)s);return(s);} +#define return_VOID {AcpiUtExit(__LINE__,&_Dbg);return;} +#define return_ACPI_STATUS(s) {AcpiUtStatusExit(__LINE__,&_Dbg,s);return(s);} +#define return_VALUE(s) {AcpiUtValueExit(__LINE__,&_Dbg,s);return(s);} +#define return_PTR(s) {AcpiUtPtrExit(__LINE__,&_Dbg,(UINT8 *)s);return(s);} /* Conditional execution */ @@ -548,6 +550,7 @@ #define DUMP_TABLES(a,b) AcpiNsDumpTables(a,b) #define DUMP_PATHNAME(a,b,c,d) AcpiNsDumpPathname(a,b,c,d) #define DUMP_RESOURCE_LIST(a) AcpiRsDumpResourceList(a) +#define DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) #define BREAK_MSG(a) AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT,(a)) @@ -595,12 +598,14 @@ #define FUNCTION_EXIT #define FUNCTION_STATUS_EXIT(s) #define FUNCTION_VALUE_EXIT(s) +#define FUNCTION_ENTRY() #define DUMP_STACK_ENTRY(a) #define DUMP_OPERANDS(a,b,c,d,e) #define DUMP_ENTRY(a,b) #define DUMP_TABLES(a,b) #define DUMP_PATHNAME(a,b,c,d) #define DUMP_RESOURCE_LIST(a) +#define DUMP_BUFFER(a,b) #define ACPI_DEBUG_PRINT(pl) #define ACPI_DEBUG_PRINT_RAW(pl) #define BREAK_MSG(a) @@ -636,19 +641,15 @@ #ifdef ACPI_DEBUG - /* * 1) Set name to blanks * 2) Copy the object name */ - #define ADD_OBJECT_NAME(a,b) MEMSET (a->Common.Name, ' ', sizeof (a->Common.Name));\ STRNCPY (a->Common.Name, AcpiGbl_NsTypeNames[b], sizeof (a->Common.Name)) - #else #define ADD_OBJECT_NAME(a,b) - #endif @@ -678,4 +679,6 @@ #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ +#define ACPI_GET_STACK_POINTER _asm {mov eax, ebx} + #endif /* ACMACROS_H */ -- cgit v1.1