1/****************************************************************************** 2 * 3 * Name: acmacros.h - C macros for the entire subsystem. |
4 * $Revision: 86 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 155 unchanged lines hidden (view full) --- 168#define HIDWORD(l) (0) 169#endif 170 171#define ACPI_GET_ADDRESS(a) ((a).Lo) 172#define ACPI_STORE_ADDRESS(a,b) {(a).Hi=0;(a).Lo=(b);} 173#define ACPI_VALID_ADDRESS(a) ((a).Hi | (a).Lo) 174 175#else |
176#ifdef ACPI_NO_INTEGER64_SUPPORT |
177/* |
178 * ACPI_INTEGER is 32-bits, no 64-bit support on this platform |
179 */ 180#ifndef LODWORD |
181#define LODWORD(l) ((UINT32)(l)) 182#endif 183 184#ifndef HIDWORD 185#define HIDWORD(l) (0) 186#endif 187 188#define ACPI_GET_ADDRESS(a) (a) 189#define ACPI_STORE_ADDRESS(a,b) ((a)=(b)) 190#define ACPI_VALID_ADDRESS(a) (a) 191 192#else 193 194/* 195 * Full 64-bit address/integer on both 32-bit and 64-bit platforms 196 */ 197#ifndef LODWORD |
198#define LODWORD(l) ((UINT32)(UINT64)(l)) 199#endif 200 201#ifndef HIDWORD |
202#define HIDWORD(l) ((UINT32)(((*(UINT64_STRUCT *)(&l))).Hi)) |
203#endif 204 205#define ACPI_GET_ADDRESS(a) (a) 206#define ACPI_STORE_ADDRESS(a,b) ((a)=(b)) 207#define ACPI_VALID_ADDRESS(a) (a) 208#endif |
209#endif |
210 211 /* 212 * Extract a byte of data using a pointer. Any more than a byte and we 213 * get into potential aligment issues -- see the STORE macros below 214 */ 215#define GET8(addr) (*(UINT8*)(addr)) 216 217/* Pointer arithmetic */ --- 238 unchanged lines hidden (view full) --- 456 * Error reporting. These versions add callers module and line#. Since 457 * _THIS_MODULE gets compiled out when ACPI_DEBUG isn't defined, only 458 * use it in debug mode. 459 */ 460 461#ifdef ACPI_DEBUG 462 463#define REPORT_INFO(fp) {_ReportInfo(_THIS_MODULE,__LINE__,_COMPONENT); \ |
464 AcpiOsPrintf PARAM_LIST(fp);} |
465#define REPORT_ERROR(fp) {_ReportError(_THIS_MODULE,__LINE__,_COMPONENT); \ |
466 AcpiOsPrintf PARAM_LIST(fp);} |
467#define REPORT_WARNING(fp) {_ReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \ |
468 AcpiOsPrintf PARAM_LIST(fp);} |
469 470#else 471 472#define REPORT_INFO(fp) {_ReportInfo("ACPI",__LINE__,_COMPONENT); \ |
473 AcpiOsPrintf PARAM_LIST(fp);} |
474#define REPORT_ERROR(fp) {_ReportError("ACPI",__LINE__,_COMPONENT); \ |
475 AcpiOsPrintf PARAM_LIST(fp);} |
476#define REPORT_WARNING(fp) {_ReportWarning("ACPI",__LINE__,_COMPONENT); \ |
477 AcpiOsPrintf PARAM_LIST(fp);} |
478 479#endif 480 481/* Error reporting. These versions pass thru the module and line# */ 482 483#define _REPORT_INFO(a,b,c,fp) {_ReportInfo(a,b,c); \ |
484 AcpiOsPrintf PARAM_LIST(fp);} |
485#define _REPORT_ERROR(a,b,c,fp) {_ReportError(a,b,c); \ |
486 AcpiOsPrintf PARAM_LIST(fp);} |
487#define _REPORT_WARNING(a,b,c,fp) {_ReportWarning(a,b,c); \ |
488 AcpiOsPrintf PARAM_LIST(fp);} |
489 490/* Buffer dump macros */ 491 492#define DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) 493 494/* 495 * Debug macros that are conditionally compiled 496 */ --- 65 unchanged lines hidden (view full) --- 562#define BREAK_ON_ERROR(lvl) 563#endif 564 565/* 566 * Master debug print macros 567 * Print iff: 568 * 1) Debug print for the current component is enabled 569 * 2) Debug error level or trace level for the print statement is enabled |
570 */ 571 |
572#define ACPI_DEBUG_PRINT(pl) AcpiUtDebugPrint PARAM_LIST(pl) 573#define ACPI_DEBUG_PRINT_RAW(pl) AcpiUtDebugPrintRaw PARAM_LIST(pl) |
574 |
575 |
576#else 577/* 578 * This is the non-debug case -- make everything go away, 579 * leaving no executable debug code! 580 */ 581 582#define MODULE_NAME(name) 583#define _THIS_MODULE "" --- 12 unchanged lines hidden (view full) --- 596#define FUNCTION_STATUS_EXIT(s) 597#define FUNCTION_VALUE_EXIT(s) 598#define DUMP_STACK_ENTRY(a) 599#define DUMP_OPERANDS(a,b,c,d,e) 600#define DUMP_ENTRY(a,b) 601#define DUMP_TABLES(a,b) 602#define DUMP_PATHNAME(a,b,c,d) 603#define DUMP_RESOURCE_LIST(a) |
604#define ACPI_DEBUG_PRINT(pl) 605#define ACPI_DEBUG_PRINT_RAW(pl) |
606#define BREAK_MSG(a) 607 608#define return_VOID return 609#define return_ACPI_STATUS(s) return(s) 610#define return_VALUE(s) return(s) 611#define return_PTR(s) return(s) 612 613#endif --- 44 unchanged lines hidden (view full) --- 658 659#ifndef ACPI_DBG_TRACK_ALLOCATIONS 660 661/* Memory allocation */ 662 663#define ACPI_MEM_ALLOCATE(a) AcpiOsAllocate(a) 664#define ACPI_MEM_CALLOCATE(a) AcpiOsCallocate(a) 665#define ACPI_MEM_FREE(a) AcpiOsFree(a) |
666#define ACPI_MEM_TRACKING(a) |
667 668 |
669#else 670 671/* Memory allocation */ 672 673#define ACPI_MEM_ALLOCATE(a) AcpiUtAllocate(a,_COMPONENT,_THIS_MODULE,__LINE__) 674#define ACPI_MEM_CALLOCATE(a) AcpiUtCallocate(a, _COMPONENT,_THIS_MODULE,__LINE__) 675#define ACPI_MEM_FREE(a) AcpiUtFree(a,_COMPONENT,_THIS_MODULE,__LINE__) |
676#define ACPI_MEM_TRACKING(a) a |
677 |
678#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ 679 680 681#endif /* ACMACROS_H */ |