|
||||
Warning, cross-references for /kernel/include/drivers/acpi/acpiosxf.h need to be fixed.
0001 0002 /****************************************************************************** 0003 * 0004 * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These 0005 * interfaces must be implemented by OSL to interface the 0006 * ACPI components to the host operating system. 0007 * 0008 *****************************************************************************/ 0009 0010 0011 /****************************************************************************** 0012 * 0013 * 1. Copyright Notice 0014 * 0015 * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. 0016 * All rights reserved. 0017 * 0018 * 2. License 0019 * 0020 * 2.1. This is your license from Intel Corp. under its intellectual property 0021 * rights. You may have additional license terms from the party that provided 0022 * you this software, covering your right to use that party's intellectual 0023 * property rights. 0024 * 0025 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 0026 * copy of the source code appearing in this file ("Covered Code") an 0027 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 0028 * base code distributed originally by Intel ("Original Intel Code") to copy, 0029 * make derivatives, distribute, use and display any portion of the Covered 0030 * Code in any form, with the right to sublicense such rights; and 0031 * 0032 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 0033 * license (with the right to sublicense), under only those claims of Intel 0034 * patents that are infringed by the Original Intel Code, to make, use, sell, 0035 * offer to sell, and import the Covered Code and derivative works thereof 0036 * solely to the minimum extent necessary to exer 0037 se the above copyright 0038 * license, and in no event shall the patent license extend to any additions 0039 * to or modifications of the Original Intel Code. No other license or right 0040 * is granted directly or by implication, estoppel or otherwise; 0041 * 0042 * The above copyright and patent license is granted only if the following 0043 * conditions are met: 0044 * 0045 * 3. Conditions 0046 * 0047 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 0048 * Redistribution of source code of any substantial portion of the Covered 0049 * Code or modification with rights to further distribute source must include 0050 * the above Copyright Notice, the above License, this list of Conditions, 0051 * and the following Disclaimer and Export Compliance provision. In addition, 0052 * Licensee must cause all Covered Code to which Licensee contributes to 0053 * contain a file documenting the changes Licensee made to create that Covered 0054 * Code and the date of any change. Licensee must include in that file the 0055 * documentation of any changes made by any predecessor Licensee. Licensee 0056 * must include a prominent statement that the modification is derived, 0057 * directly or indirectly, from Original Intel Code. 0058 * 0059 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 0060 * Redistribution of source code of any substantial portion of the Covered 0061 * Code or modification without rights to further distribute source must 0062 * include the following Disclaimer and Export Compliance provision in the 0063 * documentation and/or other materials provided with distribution. In 0064 * addition, Licensee may not authorize further sublicense of source of any 0065 * portion of the Covered Code, and must include terms to the effect that the 0066 * license from Licensee to its licensee is limited to the intellectual 0067 * property embodied in the software Licensee provides to its licensee, and 0068 * not to intellectual property embodied in modifications its licensee may 0069 * make. 0070 * 0071 * 3.3. Redistribution of Executable. Redistribution in executable form of any 0072 * substantial portion of the Covered Code or modification must reproduce the 0073 * above Copyright Notice, and the following Disclaimer and Export Compliance 0074 * provision in the documentation and/or other materials provided with the 0075 * distribution. 0076 * 0077 * 3.4. Intel retains all right, title, and interest in and to the Original 0078 * Intel Code. 0079 * 0080 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 0081 * Intel shall be used in advertising or otherwise to promote the sale, use or 0082 * other dealings in products derived from or relating to the Covered Code 0083 * without prior written authorization from Intel. 0084 * 0085 * 4. Disclaimer and Export Compliance 0086 * 0087 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 0088 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 0089 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 0090 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 0091 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 0092 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 0093 * PARTICULAR PURPOSE. 0094 * 0095 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 0096 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 0097 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 0098 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 0099 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 0100 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 0101 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 0102 * LIMITED REMEDY. 0103 * 0104 * 4.3. Licensee shall not export, either directly or indirectly, any of this 0105 * software or system incorporating such software without first obtaining any 0106 * required license or other approval from the U. S. Department of Commerce or 0107 * any other agency or department of the United States Government. In the 0108 * event Licensee exports any such software from the United States or 0109 * re-exports any such software from a foreign destination, Licensee shall 0110 * ensure that the distribution and export/re-export of the software is in 0111 * compliance with all laws, regulations, orders, or other restrictions of the 0112 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 0113 * any of its subsidiaries will export/re-export any technical data, process, 0114 * software, or service, directly or indirectly, to any country for which the 0115 * United States government or any agency thereof requires an export license, 0116 * other governmental approval, or letter of assurance, without first obtaining 0117 * such license, approval or letter. 0118 * 0119 *****************************************************************************/ 0120 0121 #ifndef __ACPIOSXF_H__ 0122 #define __ACPIOSXF_H__ 0123 0124 #include "platform/acenv.h" 0125 #include "actypes.h" 0126 0127 0128 /* Types for AcpiOsExecute */ 0129 0130 typedef enum 0131 { 0132 OSL_GLOBAL_LOCK_HANDLER, 0133 OSL_NOTIFY_HANDLER, 0134 OSL_GPE_HANDLER, 0135 OSL_DEBUGGER_THREAD, 0136 OSL_EC_POLL_HANDLER, 0137 OSL_EC_BURST_HANDLER 0138 0139 } ACPI_EXECUTE_TYPE; 0140 0141 #define ACPI_NO_UNIT_LIMIT ((UINT32) -1) 0142 #define ACPI_MUTEX_SEM 1 0143 0144 0145 /* Functions for AcpiOsSignal */ 0146 0147 #define ACPI_SIGNAL_FATAL 0 0148 #define ACPI_SIGNAL_BREAKPOINT 1 0149 0150 typedef struct acpi_signal_fatal_info 0151 { 0152 UINT32 Type; 0153 UINT32 Code; 0154 UINT32 Argument; 0155 0156 } ACPI_SIGNAL_FATAL_INFO; 0157 0158 0159 /* 0160 * OSL Initialization and shutdown primitives 0161 */ 0162 ACPI_STATUS 0163 AcpiOsInitialize ( 0164 void); 0165 0166 ACPI_STATUS 0167 AcpiOsTerminate ( 0168 void); 0169 0170 0171 /* 0172 * ACPI Table interfaces 0173 */ 0174 ACPI_PHYSICAL_ADDRESS 0175 AcpiOsGetRootPointer ( 0176 void); 0177 0178 ACPI_STATUS 0179 AcpiOsPredefinedOverride ( 0180 const ACPI_PREDEFINED_NAMES *InitVal, 0181 ACPI_STRING *NewVal); 0182 0183 ACPI_STATUS 0184 AcpiOsTableOverride ( 0185 ACPI_TABLE_HEADER *ExistingTable, 0186 ACPI_TABLE_HEADER **NewTable); 0187 0188 0189 /* 0190 * Spinlock primitives 0191 */ 0192 ACPI_STATUS 0193 AcpiOsCreateLock ( 0194 ACPI_SPINLOCK *OutHandle); 0195 0196 void 0197 AcpiOsDeleteLock ( 0198 ACPI_SPINLOCK Handle); 0199 0200 ACPI_CPU_FLAGS 0201 AcpiOsAcquireLock ( 0202 ACPI_SPINLOCK Handle); 0203 0204 void 0205 AcpiOsReleaseLock ( 0206 ACPI_SPINLOCK Handle, 0207 ACPI_CPU_FLAGS Flags); 0208 0209 0210 /* 0211 * Semaphore primitives 0212 */ 0213 ACPI_STATUS 0214 AcpiOsCreateSemaphore ( 0215 UINT32 MaxUnits, 0216 UINT32 InitialUnits, 0217 ACPI_SEMAPHORE *OutHandle); 0218 0219 ACPI_STATUS 0220 AcpiOsDeleteSemaphore ( 0221 ACPI_SEMAPHORE Handle); 0222 0223 ACPI_STATUS 0224 AcpiOsWaitSemaphore ( 0225 ACPI_SEMAPHORE Handle, 0226 UINT32 Units, 0227 UINT16 Timeout); 0228 0229 ACPI_STATUS 0230 AcpiOsSignalSemaphore ( 0231 ACPI_SEMAPHORE Handle, 0232 UINT32 Units); 0233 0234 0235 /* 0236 * Mutex primitives. May be configured to use semaphores instead via 0237 * ACPI_MUTEX_TYPE (see platform/acenv.h) 0238 */ 0239 #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE) 0240 0241 ACPI_STATUS 0242 AcpiOsCreateMutex ( 0243 ACPI_MUTEX *OutHandle); 0244 0245 void 0246 AcpiOsDeleteMutex ( 0247 ACPI_MUTEX Handle); 0248 0249 ACPI_STATUS 0250 AcpiOsAcquireMutex ( 0251 ACPI_MUTEX Handle, 0252 UINT16 Timeout); 0253 0254 void 0255 AcpiOsReleaseMutex ( 0256 ACPI_MUTEX Handle); 0257 #endif 0258 0259 0260 /* 0261 * Memory allocation and mapping 0262 */ 0263 void * 0264 AcpiOsAllocate ( 0265 ACPI_SIZE Size); 0266 0267 void 0268 AcpiOsFree ( 0269 void * Memory); 0270 0271 void * 0272 AcpiOsMapMemory ( 0273 ACPI_PHYSICAL_ADDRESS Where, 0274 ACPI_SIZE Length); 0275 0276 void 0277 AcpiOsUnmapMemory ( 0278 void *LogicalAddress, 0279 ACPI_SIZE Size); 0280 0281 ACPI_STATUS 0282 AcpiOsGetPhysicalAddress ( 0283 void *LogicalAddress, 0284 ACPI_PHYSICAL_ADDRESS *PhysicalAddress); 0285 0286 0287 /* 0288 * Memory/Object Cache 0289 */ 0290 ACPI_STATUS 0291 AcpiOsCreateCache ( 0292 char *CacheName, 0293 UINT16 ObjectSize, 0294 UINT16 MaxDepth, 0295 ACPI_CACHE_T **ReturnCache); 0296 0297 ACPI_STATUS 0298 AcpiOsDeleteCache ( 0299 ACPI_CACHE_T *Cache); 0300 0301 ACPI_STATUS 0302 AcpiOsPurgeCache ( 0303 ACPI_CACHE_T *Cache); 0304 0305 void * 0306 AcpiOsAcquireObject ( 0307 ACPI_CACHE_T *Cache); 0308 0309 ACPI_STATUS 0310 AcpiOsReleaseObject ( 0311 ACPI_CACHE_T *Cache, 0312 void *Object); 0313 0314 0315 /* 0316 * Interrupt handlers 0317 */ 0318 ACPI_STATUS 0319 AcpiOsInstallInterruptHandler ( 0320 UINT32 InterruptNumber, 0321 ACPI_OSD_HANDLER ServiceRoutine, 0322 void *Context); 0323 0324 ACPI_STATUS 0325 AcpiOsRemoveInterruptHandler ( 0326 UINT32 InterruptNumber, 0327 ACPI_OSD_HANDLER ServiceRoutine); 0328 0329 0330 /* 0331 * Threads and Scheduling 0332 */ 0333 ACPI_THREAD_ID 0334 AcpiOsGetThreadId ( 0335 void); 0336 0337 ACPI_STATUS 0338 AcpiOsExecute ( 0339 ACPI_EXECUTE_TYPE Type, 0340 ACPI_OSD_EXEC_CALLBACK Function, 0341 void *Context); 0342 0343 void 0344 AcpiOsWaitEventsComplete ( 0345 void *Context); 0346 0347 void 0348 AcpiOsSleep ( 0349 ACPI_INTEGER Milliseconds); 0350 0351 void 0352 AcpiOsStall ( 0353 UINT32 Microseconds); 0354 0355 0356 /* 0357 * Platform and hardware-independent I/O interfaces 0358 */ 0359 ACPI_STATUS 0360 AcpiOsReadPort ( 0361 ACPI_IO_ADDRESS Address, 0362 UINT32 *Value, 0363 UINT32 Width); 0364 0365 ACPI_STATUS 0366 AcpiOsWritePort ( 0367 ACPI_IO_ADDRESS Address, 0368 UINT32 Value, 0369 UINT32 Width); 0370 0371 0372 /* 0373 * Platform and hardware-independent physical memory interfaces 0374 */ 0375 ACPI_STATUS 0376 AcpiOsReadMemory ( 0377 ACPI_PHYSICAL_ADDRESS Address, 0378 UINT32 *Value, 0379 UINT32 Width); 0380 0381 ACPI_STATUS 0382 AcpiOsWriteMemory ( 0383 ACPI_PHYSICAL_ADDRESS Address, 0384 UINT32 Value, 0385 UINT32 Width); 0386 0387 0388 /* 0389 * Platform and hardware-independent PCI configuration space access 0390 * Note: Can't use "Register" as a parameter, changed to "Reg" -- 0391 * certain compilers complain. 0392 */ 0393 ACPI_STATUS 0394 AcpiOsReadPciConfiguration ( 0395 ACPI_PCI_ID *PciId, 0396 UINT32 Reg, 0397 void *Value, 0398 UINT32 Width); 0399 0400 ACPI_STATUS 0401 AcpiOsWritePciConfiguration ( 0402 ACPI_PCI_ID *PciId, 0403 UINT32 Reg, 0404 ACPI_INTEGER Value, 0405 UINT32 Width); 0406 0407 0408 /* 0409 * Interim function needed for PCI IRQ routing 0410 */ 0411 void 0412 AcpiOsDerivePciId( 0413 ACPI_HANDLE Rhandle, 0414 ACPI_HANDLE Chandle, 0415 ACPI_PCI_ID **PciId); 0416 0417 0418 /* 0419 * Miscellaneous 0420 */ 0421 ACPI_STATUS 0422 AcpiOsValidateInterface ( 0423 char *Interface); 0424 0425 BOOLEAN 0426 AcpiOsReadable ( 0427 void *Pointer, 0428 ACPI_SIZE Length); 0429 0430 BOOLEAN 0431 AcpiOsWritable ( 0432 void *Pointer, 0433 ACPI_SIZE Length); 0434 0435 UINT64 0436 AcpiOsGetTimer ( 0437 void); 0438 0439 ACPI_STATUS 0440 AcpiOsSignal ( 0441 UINT32 Function, 0442 void *Info); 0443 0444 0445 /* 0446 * Debug print routines 0447 */ 0448 void ACPI_INTERNAL_VAR_XFACE 0449 AcpiOsPrintf ( 0450 const char *Format, 0451 ...); 0452 0453 void 0454 AcpiOsVprintf ( 0455 const char *Format, 0456 va_list Args); 0457 0458 void 0459 AcpiOsRedirectOutput ( 0460 void *Destination); 0461 0462 0463 /* 0464 * Debug input 0465 */ 0466 UINT32 0467 AcpiOsGetLine ( 0468 char *Buffer); 0469 0470 0471 /* 0472 * Directory manipulation 0473 */ 0474 void * 0475 AcpiOsOpenDirectory ( 0476 char *Pathname, 0477 char *WildcardSpec, 0478 char RequestedFileType); 0479 0480 /* RequesteFileType values */ 0481 0482 #define REQUEST_FILE_ONLY 0 0483 #define REQUEST_DIR_ONLY 1 0484 0485 0486 char * 0487 AcpiOsGetNextFilename ( 0488 void *DirHandle); 0489 0490 void 0491 AcpiOsCloseDirectory ( 0492 void *DirHandle); 0493 0494 0495 #endif /* __ACPIOSXF_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 1.2.0 LXR engine. |