acutils.h (253690) | acutils.h (272444) |
---|---|
1/****************************************************************************** 2 * 3 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 4 * 5 *****************************************************************************/ 6 7/* | 1/****************************************************************************** 2 * 3 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 4 * 5 *****************************************************************************/ 6 7/* |
8 * Copyright (C) 2000 - 2013, Intel Corp. | 8 * Copyright (C) 2000 - 2014, Intel Corp. |
9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. --- 28 unchanged lines hidden (view full) --- 45#define _ACUTILS_H 46 47 48extern const UINT8 AcpiGbl_ResourceAmlSizes[]; 49extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[]; 50 51/* Strings used by the disassembler and debugger resource dump routines */ 52 | 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. --- 28 unchanged lines hidden (view full) --- 45#define _ACUTILS_H 46 47 48extern const UINT8 AcpiGbl_ResourceAmlSizes[]; 49extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[]; 50 51/* Strings used by the disassembler and debugger resource dump routines */ 52 |
53#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) | 53#if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) |
54 55extern const char *AcpiGbl_BmDecode[]; 56extern const char *AcpiGbl_ConfigDecode[]; 57extern const char *AcpiGbl_ConsumeDecode[]; 58extern const char *AcpiGbl_DecDecode[]; 59extern const char *AcpiGbl_HeDecode[]; 60extern const char *AcpiGbl_IoDecode[]; 61extern const char *AcpiGbl_LlDecode[]; --- 29 unchanged lines hidden (view full) --- 91/* 92 * For the iASL compiler case, the output is redirected to stderr so that 93 * any of the various ACPI errors and warnings do not appear in the output 94 * files, for either the compiler or disassembler portions of the tool. 95 */ 96#ifdef ACPI_ASL_COMPILER 97 98#include <stdio.h> | 54 55extern const char *AcpiGbl_BmDecode[]; 56extern const char *AcpiGbl_ConfigDecode[]; 57extern const char *AcpiGbl_ConsumeDecode[]; 58extern const char *AcpiGbl_DecDecode[]; 59extern const char *AcpiGbl_HeDecode[]; 60extern const char *AcpiGbl_IoDecode[]; 61extern const char *AcpiGbl_LlDecode[]; --- 29 unchanged lines hidden (view full) --- 91/* 92 * For the iASL compiler case, the output is redirected to stderr so that 93 * any of the various ACPI errors and warnings do not appear in the output 94 * files, for either the compiler or disassembler portions of the tool. 95 */ 96#ifdef ACPI_ASL_COMPILER 97 98#include <stdio.h> |
99extern FILE *AcpiGbl_OutputFile; | |
100 101#define ACPI_MSG_REDIRECT_BEGIN \ 102 FILE *OutputFile = AcpiGbl_OutputFile; \ 103 AcpiOsRedirectOutput (stderr); 104 105#define ACPI_MSG_REDIRECT_END \ 106 AcpiOsRedirectOutput (OutputFile); 107 --- 76 unchanged lines hidden (view full) --- 184#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 185 186char * 187AcpiUtGetMutexName ( 188 UINT32 MutexId); 189 190const char * 191AcpiUtGetNotifyName ( | 99 100#define ACPI_MSG_REDIRECT_BEGIN \ 101 FILE *OutputFile = AcpiGbl_OutputFile; \ 102 AcpiOsRedirectOutput (stderr); 103 104#define ACPI_MSG_REDIRECT_END \ 105 AcpiOsRedirectOutput (OutputFile); 106 --- 76 unchanged lines hidden (view full) --- 183#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 184 185char * 186AcpiUtGetMutexName ( 187 UINT32 MutexId); 188 189const char * 190AcpiUtGetNotifyName ( |
192 UINT32 NotifyValue); 193 | 191 UINT32 NotifyValue, 192 ACPI_OBJECT_TYPE Type); |
194#endif 195 196char * 197AcpiUtGetTypeName ( 198 ACPI_OBJECT_TYPE Type); 199 200char * 201AcpiUtGetNodeName ( --- 19 unchanged lines hidden (view full) --- 221AcpiUtGetEventName ( 222 UINT32 EventId); 223 224char 225AcpiUtHexToAsciiChar ( 226 UINT64 Integer, 227 UINT32 Position); 228 | 193#endif 194 195char * 196AcpiUtGetTypeName ( 197 ACPI_OBJECT_TYPE Type); 198 199char * 200AcpiUtGetNodeName ( --- 19 unchanged lines hidden (view full) --- 220AcpiUtGetEventName ( 221 UINT32 EventId); 222 223char 224AcpiUtHexToAsciiChar ( 225 UINT64 Integer, 226 UINT32 Position); 227 |
228UINT8 229AcpiUtAsciiCharToHex ( 230 int HexChar); 231 |
|
229BOOLEAN 230AcpiUtValidObjectType ( 231 ACPI_OBJECT_TYPE Type); 232 233 234/* 235 * utinit - miscellaneous initialization and shutdown 236 */ --- 11 unchanged lines hidden (view full) --- 248 */ 249#ifndef ACPI_USE_SYSTEM_CLIBRARY 250 251ACPI_SIZE 252AcpiUtStrlen ( 253 const char *String); 254 255char * | 232BOOLEAN 233AcpiUtValidObjectType ( 234 ACPI_OBJECT_TYPE Type); 235 236 237/* 238 * utinit - miscellaneous initialization and shutdown 239 */ --- 11 unchanged lines hidden (view full) --- 251 */ 252#ifndef ACPI_USE_SYSTEM_CLIBRARY 253 254ACPI_SIZE 255AcpiUtStrlen ( 256 const char *String); 257 258char * |
259AcpiUtStrchr ( 260 const char *String, 261 int ch); 262 263char * |
|
256AcpiUtStrcpy ( 257 char *DstString, 258 const char *SrcString); 259 260char * 261AcpiUtStrncpy ( 262 char *DstString, 263 const char *SrcString, --- 71 unchanged lines hidden (view full) --- 335#define _ACPI_UP 0x01 /* 'A'-'Z' */ 336#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 337 338#define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) 339#define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) 340#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD)) 341#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP)) 342#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) | 264AcpiUtStrcpy ( 265 char *DstString, 266 const char *SrcString); 267 268char * 269AcpiUtStrncpy ( 270 char *DstString, 271 const char *SrcString, --- 71 unchanged lines hidden (view full) --- 343#define _ACPI_UP 0x01 /* 'A'-'Z' */ 344#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 345 346#define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) 347#define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) 348#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD)) 349#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP)) 350#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) |
343#define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) | 351#define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU)) |
344#define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 345 346#endif /* !ACPI_USE_SYSTEM_CLIBRARY */ 347 348#define ACPI_IS_ASCII(c) ((c) < 0x80) 349 350 351/* --- 125 unchanged lines hidden (view full) --- 477 478void 479AcpiUtDumpBuffer ( 480 UINT8 *Buffer, 481 UINT32 Count, 482 UINT32 Display, 483 UINT32 Offset); 484 | 352#define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 353 354#endif /* !ACPI_USE_SYSTEM_CLIBRARY */ 355 356#define ACPI_IS_ASCII(c) ((c) < 0x80) 357 358 359/* --- 125 unchanged lines hidden (view full) --- 485 486void 487AcpiUtDumpBuffer ( 488 UINT8 *Buffer, 489 UINT32 Count, 490 UINT32 Display, 491 UINT32 Offset); 492 |
493#ifdef ACPI_APPLICATION |
|
485void | 494void |
495AcpiUtDumpBufferToFile ( 496 ACPI_FILE File, 497 UINT8 *Buffer, 498 UINT32 Count, 499 UINT32 Display, 500 UINT32 BaseOffset); 501#endif 502 503void |
|
486AcpiUtReportError ( 487 char *ModuleName, 488 UINT32 LineNumber); 489 490void 491AcpiUtReportInfo ( 492 char *ModuleName, 493 UINT32 LineNumber); --- 52 unchanged lines hidden (view full) --- 546AcpiUtExecutePowerMethods ( 547 ACPI_NAMESPACE_NODE *DeviceNode, 548 const char **MethodNames, 549 UINT8 MethodCount, 550 UINT8 *OutValues); 551 552 553/* | 504AcpiUtReportError ( 505 char *ModuleName, 506 UINT32 LineNumber); 507 508void 509AcpiUtReportInfo ( 510 char *ModuleName, 511 UINT32 LineNumber); --- 52 unchanged lines hidden (view full) --- 564AcpiUtExecutePowerMethods ( 565 ACPI_NAMESPACE_NODE *DeviceNode, 566 const char **MethodNames, 567 UINT8 MethodCount, 568 UINT8 *OutValues); 569 570 571/* |
572 * utfileio - file operations 573 */ 574#ifdef ACPI_APPLICATION 575ACPI_STATUS 576AcpiUtReadTableFromFile ( 577 char *Filename, 578 ACPI_TABLE_HEADER **Table); 579#endif 580 581 582/* |
|
554 * utids - device ID support 555 */ 556ACPI_STATUS 557AcpiUtExecute_HID ( 558 ACPI_NAMESPACE_NODE *DeviceNode, 559 ACPI_PNP_DEVICE_ID **ReturnId); 560 561ACPI_STATUS --- 359 unchanged lines hidden (view full) --- 921AcpiUtValidAcpiChar ( 922 char Character, 923 UINT32 Position); 924 925void 926AcpiUtRepairName ( 927 char *Name); 928 | 583 * utids - device ID support 584 */ 585ACPI_STATUS 586AcpiUtExecute_HID ( 587 ACPI_NAMESPACE_NODE *DeviceNode, 588 ACPI_PNP_DEVICE_ID **ReturnId); 589 590ACPI_STATUS --- 359 unchanged lines hidden (view full) --- 950AcpiUtValidAcpiChar ( 951 char Character, 952 UINT32 Position); 953 954void 955AcpiUtRepairName ( 956 char *Name); 957 |
958#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) 959BOOLEAN 960AcpiUtSafeStrcpy ( 961 char *Dest, 962 ACPI_SIZE DestSize, 963 char *Source); |
|
929 | 964 |
965BOOLEAN 966AcpiUtSafeStrcat ( 967 char *Dest, 968 ACPI_SIZE DestSize, 969 char *Source); 970 971#ifndef _KERNEL 972BOOLEAN 973AcpiUtSafeStrncat ( 974 char *Dest, 975 ACPI_SIZE DestSize, 976 char *Source, 977 ACPI_SIZE MaxTransferLength); 978#endif 979#endif 980 981 |
|
930/* 931 * utmutex - mutex support 932 */ 933ACPI_STATUS 934AcpiUtMutexInitialize ( 935 void); 936 937void --- 24 unchanged lines hidden (view full) --- 962AcpiUtValidateBuffer ( 963 ACPI_BUFFER *Buffer); 964 965ACPI_STATUS 966AcpiUtInitializeBuffer ( 967 ACPI_BUFFER *Buffer, 968 ACPI_SIZE RequiredLength); 969 | 982/* 983 * utmutex - mutex support 984 */ 985ACPI_STATUS 986AcpiUtMutexInitialize ( 987 void); 988 989void --- 24 unchanged lines hidden (view full) --- 1014AcpiUtValidateBuffer ( 1015 ACPI_BUFFER *Buffer); 1016 1017ACPI_STATUS 1018AcpiUtInitializeBuffer ( 1019 ACPI_BUFFER *Buffer, 1020 ACPI_SIZE RequiredLength); 1021 |
970void * 971AcpiUtAllocate ( 972 ACPI_SIZE Size, 973 UINT32 Component, 974 const char *Module, 975 UINT32 Line); 976 977void * 978AcpiUtAllocateZeroed ( 979 ACPI_SIZE Size, 980 UINT32 Component, 981 const char *Module, 982 UINT32 Line); 983 | |
984#ifdef ACPI_DBG_TRACK_ALLOCATIONS 985void * 986AcpiUtAllocateAndTrack ( 987 ACPI_SIZE Size, 988 UINT32 Component, 989 const char *Module, 990 UINT32 Line); 991 --- 95 unchanged lines hidden (view full) --- 1087AcpiUtMethodError ( 1088 const char *ModuleName, 1089 UINT32 LineNumber, 1090 const char *Message, 1091 ACPI_NAMESPACE_NODE *Node, 1092 const char *Path, 1093 ACPI_STATUS LookupStatus); 1094 | 1022#ifdef ACPI_DBG_TRACK_ALLOCATIONS 1023void * 1024AcpiUtAllocateAndTrack ( 1025 ACPI_SIZE Size, 1026 UINT32 Component, 1027 const char *Module, 1028 UINT32 Line); 1029 --- 95 unchanged lines hidden (view full) --- 1125AcpiUtMethodError ( 1126 const char *ModuleName, 1127 UINT32 LineNumber, 1128 const char *Message, 1129 ACPI_NAMESPACE_NODE *Node, 1130 const char *Path, 1131 ACPI_STATUS LookupStatus); 1132 |
1133/* 1134 * Utility functions for ACPI names and IDs 1135 */ 1136const AH_PREDEFINED_NAME * 1137AcpiAhMatchPredefinedName ( 1138 char *Nameseg); 1139 1140const AH_DEVICE_ID * 1141AcpiAhMatchHardwareId ( 1142 char *Hid); 1143 1144const char * 1145AcpiAhMatchUuid ( 1146 UINT8 *Data); 1147 1148/* 1149 * utprint - printf/vprintf output functions 1150 */ 1151const char * 1152AcpiUtScanNumber ( 1153 const char *String, 1154 UINT64 *NumberPtr); 1155 1156const char * 1157AcpiUtPrintNumber ( 1158 char *String, 1159 UINT64 Number); 1160 1161int 1162AcpiUtVsnprintf ( 1163 char *String, 1164 ACPI_SIZE Size, 1165 const char *Format, 1166 va_list Args); 1167 1168int 1169AcpiUtSnprintf ( 1170 char *String, 1171 ACPI_SIZE Size, 1172 const char *Format, 1173 ...); 1174 1175#ifdef ACPI_APPLICATION 1176int 1177AcpiUtFileVprintf ( 1178 ACPI_FILE File, 1179 const char *Format, 1180 va_list Args); 1181 1182int 1183AcpiUtFilePrintf ( 1184 ACPI_FILE File, 1185 const char *Format, 1186 ...); 1187#endif 1188 1189/* 1190 * utuuid -- UUID support functions 1191 */ 1192void 1193AcpiUtConvertStringToUuid ( 1194 char *InString, 1195 UINT8 *UuidBuffer); 1196 |
|
1095#endif /* _ACUTILS_H */ | 1197#endif /* _ACUTILS_H */ |