ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

acpiosxf.h
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003  *
00004  * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL).  These
00005  *                    interfaces must be implemented by OSL to interface the
00006  *                    ACPI components to the host operating system.
00007  *
00008  *****************************************************************************/
00009 
00010 
00011 /******************************************************************************
00012  *
00013  * 1. Copyright Notice
00014  *
00015  * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
00016  * All rights reserved.
00017  *
00018  * 2. License
00019  *
00020  * 2.1. This is your license from Intel Corp. under its intellectual property
00021  * rights.  You may have additional license terms from the party that provided
00022  * you this software, covering your right to use that party's intellectual
00023  * property rights.
00024  *
00025  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
00026  * copy of the source code appearing in this file ("Covered Code") an
00027  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
00028  * base code distributed originally by Intel ("Original Intel Code") to copy,
00029  * make derivatives, distribute, use and display any portion of the Covered
00030  * Code in any form, with the right to sublicense such rights; and
00031  *
00032  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
00033  * license (with the right to sublicense), under only those claims of Intel
00034  * patents that are infringed by the Original Intel Code, to make, use, sell,
00035  * offer to sell, and import the Covered Code and derivative works thereof
00036  * solely to the minimum extent necessary to exer
00037  se the above copyright
00038  * license, and in no event shall the patent license extend to any additions
00039  * to or modifications of the Original Intel Code.  No other license or right
00040  * is granted directly or by implication, estoppel or otherwise;
00041  *
00042  * The above copyright and patent license is granted only if the following
00043  * conditions are met:
00044  *
00045  * 3. Conditions
00046  *
00047  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
00048  * Redistribution of source code of any substantial portion of the Covered
00049  * Code or modification with rights to further distribute source must include
00050  * the above Copyright Notice, the above License, this list of Conditions,
00051  * and the following Disclaimer and Export Compliance provision.  In addition,
00052  * Licensee must cause all Covered Code to which Licensee contributes to
00053  * contain a file documenting the changes Licensee made to create that Covered
00054  * Code and the date of any change.  Licensee must include in that file the
00055  * documentation of any changes made by any predecessor Licensee.  Licensee
00056  * must include a prominent statement that the modification is derived,
00057  * directly or indirectly, from Original Intel Code.
00058  *
00059  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
00060  * Redistribution of source code of any substantial portion of the Covered
00061  * Code or modification without rights to further distribute source must
00062  * include the following Disclaimer and Export Compliance provision in the
00063  * documentation and/or other materials provided with distribution.  In
00064  * addition, Licensee may not authorize further sublicense of source of any
00065  * portion of the Covered Code, and must include terms to the effect that the
00066  * license from Licensee to its licensee is limited to the intellectual
00067  * property embodied in the software Licensee provides to its licensee, and
00068  * not to intellectual property embodied in modifications its licensee may
00069  * make.
00070  *
00071  * 3.3. Redistribution of Executable. Redistribution in executable form of any
00072  * substantial portion of the Covered Code or modification must reproduce the
00073  * above Copyright Notice, and the following Disclaimer and Export Compliance
00074  * provision in the documentation and/or other materials provided with the
00075  * distribution.
00076  *
00077  * 3.4. Intel retains all right, title, and interest in and to the Original
00078  * Intel Code.
00079  *
00080  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
00081  * Intel shall be used in advertising or otherwise to promote the sale, use or
00082  * other dealings in products derived from or relating to the Covered Code
00083  * without prior written authorization from Intel.
00084  *
00085  * 4. Disclaimer and Export Compliance
00086  *
00087  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
00088  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
00089  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
00090  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
00091  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
00092  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
00093  * PARTICULAR PURPOSE.
00094  *
00095  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
00096  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
00097  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
00098  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
00099  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
00100  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
00101  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
00102  * LIMITED REMEDY.
00103  *
00104  * 4.3. Licensee shall not export, either directly or indirectly, any of this
00105  * software or system incorporating such software without first obtaining any
00106  * required license or other approval from the U. S. Department of Commerce or
00107  * any other agency or department of the United States Government.  In the
00108  * event Licensee exports any such software from the United States or
00109  * re-exports any such software from a foreign destination, Licensee shall
00110  * ensure that the distribution and export/re-export of the software is in
00111  * compliance with all laws, regulations, orders, or other restrictions of the
00112  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
00113  * any of its subsidiaries will export/re-export any technical data, process,
00114  * software, or service, directly or indirectly, to any country for which the
00115  * United States government or any agency thereof requires an export license,
00116  * other governmental approval, or letter of assurance, without first obtaining
00117  * such license, approval or letter.
00118  *
00119  *****************************************************************************/
00120 
00121 #ifndef __ACPIOSXF_H__
00122 #define __ACPIOSXF_H__
00123 
00124 #include "platform/acenv.h"
00125 #include "actypes.h"
00126 
00127 
00128 /* Types for AcpiOsExecute */
00129 
00130 typedef enum
00131 {
00132     OSL_GLOBAL_LOCK_HANDLER,
00133     OSL_NOTIFY_HANDLER,
00134     OSL_GPE_HANDLER,
00135     OSL_DEBUGGER_THREAD,
00136     OSL_EC_POLL_HANDLER,
00137     OSL_EC_BURST_HANDLER
00138 
00139 } ACPI_EXECUTE_TYPE;
00140 
00141 #define ACPI_NO_UNIT_LIMIT          ((UINT32) -1)
00142 #define ACPI_MUTEX_SEM              1
00143 
00144 
00145 /* Functions for AcpiOsSignal */
00146 
00147 #define ACPI_SIGNAL_FATAL           0
00148 #define ACPI_SIGNAL_BREAKPOINT      1
00149 
00150 typedef struct acpi_signal_fatal_info
00151 {
00152     UINT32                  Type;
00153     UINT32                  Code;
00154     UINT32                  Argument;
00155 
00156 } ACPI_SIGNAL_FATAL_INFO;
00157 
00158 
00159 /*
00160  * OSL Initialization and shutdown primitives
00161  */
00162 ACPI_STATUS
00163 AcpiOsInitialize (
00164     void);
00165 
00166 ACPI_STATUS
00167 AcpiOsTerminate (
00168     void);
00169 
00170 
00171 /*
00172  * ACPI Table interfaces
00173  */
00174 ACPI_PHYSICAL_ADDRESS
00175 AcpiOsGetRootPointer (
00176     void);
00177 
00178 ACPI_STATUS
00179 AcpiOsPredefinedOverride (
00180     const ACPI_PREDEFINED_NAMES *InitVal,
00181     ACPI_STRING                 *NewVal);
00182 
00183 ACPI_STATUS
00184 AcpiOsTableOverride (
00185     ACPI_TABLE_HEADER       *ExistingTable,
00186     ACPI_TABLE_HEADER       **NewTable);
00187 
00188 
00189 /*
00190  * Spinlock primitives
00191  */
00192 ACPI_STATUS
00193 AcpiOsCreateLock (
00194     ACPI_SPINLOCK           *OutHandle);
00195 
00196 void
00197 AcpiOsDeleteLock (
00198     ACPI_SPINLOCK           Handle);
00199 
00200 ACPI_CPU_FLAGS
00201 AcpiOsAcquireLock (
00202     ACPI_SPINLOCK           Handle);
00203 
00204 void
00205 AcpiOsReleaseLock (
00206     ACPI_SPINLOCK           Handle,
00207     ACPI_CPU_FLAGS          Flags);
00208 
00209 
00210 /*
00211  * Semaphore primitives
00212  */
00213 ACPI_STATUS
00214 AcpiOsCreateSemaphore (
00215     UINT32                  MaxUnits,
00216     UINT32                  InitialUnits,
00217     ACPI_SEMAPHORE          *OutHandle);
00218 
00219 ACPI_STATUS
00220 AcpiOsDeleteSemaphore (
00221     ACPI_SEMAPHORE          Handle);
00222 
00223 ACPI_STATUS
00224 AcpiOsWaitSemaphore (
00225     ACPI_SEMAPHORE          Handle,
00226     UINT32                  Units,
00227     UINT16                  Timeout);
00228 
00229 ACPI_STATUS
00230 AcpiOsSignalSemaphore (
00231     ACPI_SEMAPHORE          Handle,
00232     UINT32                  Units);
00233 
00234 
00235 /*
00236  * Mutex primitives. May be configured to use semaphores instead via
00237  * ACPI_MUTEX_TYPE (see platform/acenv.h)
00238  */
00239 #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
00240 
00241 ACPI_STATUS
00242 AcpiOsCreateMutex (
00243     ACPI_MUTEX              *OutHandle);
00244 
00245 void
00246 AcpiOsDeleteMutex (
00247     ACPI_MUTEX              Handle);
00248 
00249 ACPI_STATUS
00250 AcpiOsAcquireMutex (
00251     ACPI_MUTEX              Handle,
00252     UINT16                  Timeout);
00253 
00254 void
00255 AcpiOsReleaseMutex (
00256     ACPI_MUTEX              Handle);
00257 #endif
00258 
00259 
00260 /*
00261  * Memory allocation and mapping
00262  */
00263 void *
00264 AcpiOsAllocate (
00265     ACPI_SIZE               Size);
00266 
00267 void
00268 AcpiOsFree (
00269     void *                  Memory);
00270 
00271 void *
00272 AcpiOsMapMemory (
00273     ACPI_PHYSICAL_ADDRESS   Where,
00274     ACPI_SIZE               Length);
00275 
00276 void
00277 AcpiOsUnmapMemory (
00278     void                    *LogicalAddress,
00279     ACPI_SIZE               Size);
00280 
00281 ACPI_STATUS
00282 AcpiOsGetPhysicalAddress (
00283     void                    *LogicalAddress,
00284     ACPI_PHYSICAL_ADDRESS   *PhysicalAddress);
00285 
00286 
00287 /*
00288  * Memory/Object Cache
00289  */
00290 ACPI_STATUS
00291 AcpiOsCreateCache (
00292     char                    *CacheName,
00293     UINT16                  ObjectSize,
00294     UINT16                  MaxDepth,
00295     ACPI_CACHE_T            **ReturnCache);
00296 
00297 ACPI_STATUS
00298 AcpiOsDeleteCache (
00299     ACPI_CACHE_T            *Cache);
00300 
00301 ACPI_STATUS
00302 AcpiOsPurgeCache (
00303     ACPI_CACHE_T            *Cache);
00304 
00305 void *
00306 AcpiOsAcquireObject (
00307     ACPI_CACHE_T            *Cache);
00308 
00309 ACPI_STATUS
00310 AcpiOsReleaseObject (
00311     ACPI_CACHE_T            *Cache,
00312     void                    *Object);
00313 
00314 
00315 /*
00316  * Interrupt handlers
00317  */
00318 ACPI_STATUS
00319 AcpiOsInstallInterruptHandler (
00320     UINT32                  InterruptNumber,
00321     ACPI_OSD_HANDLER        ServiceRoutine,
00322     void                    *Context);
00323 
00324 ACPI_STATUS
00325 AcpiOsRemoveInterruptHandler (
00326     UINT32                  InterruptNumber,
00327     ACPI_OSD_HANDLER        ServiceRoutine);
00328 
00329 
00330 /*
00331  * Threads and Scheduling
00332  */
00333 ACPI_THREAD_ID
00334 AcpiOsGetThreadId (
00335     void);
00336 
00337 ACPI_STATUS
00338 AcpiOsExecute (
00339     ACPI_EXECUTE_TYPE       Type,
00340     ACPI_OSD_EXEC_CALLBACK  Function,
00341     void                    *Context);
00342 
00343 void
00344 AcpiOsWaitEventsComplete (
00345     void                    *Context);
00346 
00347 void
00348 AcpiOsSleep (
00349     UINT64                  Milliseconds);
00350 
00351 void
00352 AcpiOsStall (
00353     UINT32                  Microseconds);
00354 
00355 
00356 /*
00357  * Platform and hardware-independent I/O interfaces
00358  */
00359 ACPI_STATUS
00360 AcpiOsReadPort (
00361     ACPI_IO_ADDRESS         Address,
00362     UINT32                  *Value,
00363     UINT32                  Width);
00364 
00365 ACPI_STATUS
00366 AcpiOsWritePort (
00367     ACPI_IO_ADDRESS         Address,
00368     UINT32                  Value,
00369     UINT32                  Width);
00370 
00371 
00372 /*
00373  * Platform and hardware-independent physical memory interfaces
00374  */
00375 ACPI_STATUS
00376 AcpiOsReadMemory (
00377     ACPI_PHYSICAL_ADDRESS   Address,
00378     UINT32                  *Value,
00379     UINT32                  Width);
00380 
00381 ACPI_STATUS
00382 AcpiOsWriteMemory (
00383     ACPI_PHYSICAL_ADDRESS   Address,
00384     UINT32                  Value,
00385     UINT32                  Width);
00386 
00387 
00388 /*
00389  * Platform and hardware-independent PCI configuration space access
00390  * Note: Can't use "Register" as a parameter, changed to "Reg" --
00391  * certain compilers complain.
00392  */
00393 ACPI_STATUS
00394 AcpiOsReadPciConfiguration (
00395     ACPI_PCI_ID             *PciId,
00396     UINT32                  Reg,
00397     UINT64                  *Value,
00398     UINT32                  Width);
00399 
00400 ACPI_STATUS
00401 AcpiOsWritePciConfiguration (
00402     ACPI_PCI_ID             *PciId,
00403     UINT32                  Reg,
00404     UINT64                  Value,
00405     UINT32                  Width);
00406 
00407 
00408 /*
00409  * Miscellaneous
00410  */
00411 BOOLEAN
00412 AcpiOsReadable (
00413     void                    *Pointer,
00414     ACPI_SIZE               Length);
00415 
00416 BOOLEAN
00417 AcpiOsWritable (
00418     void                    *Pointer,
00419     ACPI_SIZE               Length);
00420 
00421 UINT64
00422 AcpiOsGetTimer (
00423     void);
00424 
00425 ACPI_STATUS
00426 AcpiOsSignal (
00427     UINT32                  Function,
00428     void                    *Info);
00429 
00430 
00431 /*
00432  * Debug print routines
00433  */
00434 void ACPI_INTERNAL_VAR_XFACE
00435 AcpiOsPrintf (
00436     const char              *Format,
00437     ...);
00438 
00439 void
00440 AcpiOsVprintf (
00441     const char              *Format,
00442     va_list                 Args);
00443 
00444 void
00445 AcpiOsRedirectOutput (
00446     void                    *Destination);
00447 
00448 
00449 /*
00450  * Debug input
00451  */
00452 ACPI_STATUS
00453 AcpiOsGetLine (
00454     char                    *Buffer,
00455     UINT32                  BufferLength,
00456     UINT32                  *BytesRead);
00457 
00458 
00459 /*
00460  * Directory manipulation
00461  */
00462 void *
00463 AcpiOsOpenDirectory (
00464     char                    *Pathname,
00465     char                    *WildcardSpec,
00466     char                    RequestedFileType);
00467 
00468 /* RequesteFileType values */
00469 
00470 #define REQUEST_FILE_ONLY                   0
00471 #define REQUEST_DIR_ONLY                    1
00472 
00473 
00474 char *
00475 AcpiOsGetNextFilename (
00476     void                    *DirHandle);
00477 
00478 void
00479 AcpiOsCloseDirectory (
00480     void                    *DirHandle);
00481 
00482 
00483 #endif /* __ACPIOSXF_H__ */

Generated on Sat May 26 2012 04:25:52 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.