1c2c66affSColin Finck /****************************************************************************** 2c2c66affSColin Finck * 3c2c66affSColin Finck * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These 4c2c66affSColin Finck * interfaces must be implemented by OSL to interface the 5c2c66affSColin Finck * ACPI components to the host operating system. 6c2c66affSColin Finck * 7c2c66affSColin Finck *****************************************************************************/ 8c2c66affSColin Finck 9c2c66affSColin Finck /* 10*03b24380SThomas Faber * Copyright (C) 2000 - 2022, Intel Corp. 11c2c66affSColin Finck * All rights reserved. 12c2c66affSColin Finck * 13c2c66affSColin Finck * Redistribution and use in source and binary forms, with or without 14c2c66affSColin Finck * modification, are permitted provided that the following conditions 15c2c66affSColin Finck * are met: 16c2c66affSColin Finck * 1. Redistributions of source code must retain the above copyright 17c2c66affSColin Finck * notice, this list of conditions, and the following disclaimer, 18c2c66affSColin Finck * without modification. 19c2c66affSColin Finck * 2. Redistributions in binary form must reproduce at minimum a disclaimer 20c2c66affSColin Finck * substantially similar to the "NO WARRANTY" disclaimer below 21c2c66affSColin Finck * ("Disclaimer") and any redistribution must be conditioned upon 22c2c66affSColin Finck * including a substantially similar Disclaimer requirement for further 23c2c66affSColin Finck * binary redistribution. 24c2c66affSColin Finck * 3. Neither the names of the above-listed copyright holders nor the names 25c2c66affSColin Finck * of any contributors may be used to endorse or promote products derived 26c2c66affSColin Finck * from this software without specific prior written permission. 27c2c66affSColin Finck * 28c2c66affSColin Finck * Alternatively, this software may be distributed under the terms of the 29c2c66affSColin Finck * GNU General Public License ("GPL") version 2 as published by the Free 30c2c66affSColin Finck * Software Foundation. 31c2c66affSColin Finck * 32c2c66affSColin Finck * NO WARRANTY 33c2c66affSColin Finck * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34c2c66affSColin Finck * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 356eb8cc49SThomas Faber * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36c2c66affSColin Finck * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37c2c66affSColin Finck * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 38c2c66affSColin Finck * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 39c2c66affSColin Finck * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 40c2c66affSColin Finck * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 41c2c66affSColin Finck * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 42c2c66affSColin Finck * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 43c2c66affSColin Finck * POSSIBILITY OF SUCH DAMAGES. 44c2c66affSColin Finck */ 45c2c66affSColin Finck 46c2c66affSColin Finck #ifndef __ACPIOSXF_H__ 47c2c66affSColin Finck #define __ACPIOSXF_H__ 48c2c66affSColin Finck 49c2c66affSColin Finck #include "platform/acenv.h" 50c2c66affSColin Finck #include "actypes.h" 51c2c66affSColin Finck 52c2c66affSColin Finck 53c2c66affSColin Finck /* Types for AcpiOsExecute */ 54c2c66affSColin Finck 55c2c66affSColin Finck typedef enum 56c2c66affSColin Finck { 57c2c66affSColin Finck OSL_GLOBAL_LOCK_HANDLER, 58c2c66affSColin Finck OSL_NOTIFY_HANDLER, 59c2c66affSColin Finck OSL_GPE_HANDLER, 60c2c66affSColin Finck OSL_DEBUGGER_MAIN_THREAD, 61c2c66affSColin Finck OSL_DEBUGGER_EXEC_THREAD, 62c2c66affSColin Finck OSL_EC_POLL_HANDLER, 63c2c66affSColin Finck OSL_EC_BURST_HANDLER 64c2c66affSColin Finck 65c2c66affSColin Finck } ACPI_EXECUTE_TYPE; 66c2c66affSColin Finck 67c2c66affSColin Finck #define ACPI_NO_UNIT_LIMIT ((UINT32) -1) 68c2c66affSColin Finck #define ACPI_MUTEX_SEM 1 69c2c66affSColin Finck 70c2c66affSColin Finck 71c2c66affSColin Finck /* Functions for AcpiOsSignal */ 72c2c66affSColin Finck 73c2c66affSColin Finck #define ACPI_SIGNAL_FATAL 0 74c2c66affSColin Finck #define ACPI_SIGNAL_BREAKPOINT 1 75c2c66affSColin Finck 76c2c66affSColin Finck typedef struct acpi_signal_fatal_info 77c2c66affSColin Finck { 78c2c66affSColin Finck UINT32 Type; 79c2c66affSColin Finck UINT32 Code; 80c2c66affSColin Finck UINT32 Argument; 81c2c66affSColin Finck 82c2c66affSColin Finck } ACPI_SIGNAL_FATAL_INFO; 83c2c66affSColin Finck 84c2c66affSColin Finck 85c2c66affSColin Finck /* 86c2c66affSColin Finck * OSL Initialization and shutdown primitives 87c2c66affSColin Finck */ 88c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInitialize 89c2c66affSColin Finck ACPI_STATUS 90c2c66affSColin Finck AcpiOsInitialize ( 91c2c66affSColin Finck void); 92c2c66affSColin Finck #endif 93c2c66affSColin Finck 94c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTerminate 95c2c66affSColin Finck ACPI_STATUS 96c2c66affSColin Finck AcpiOsTerminate ( 97c2c66affSColin Finck void); 98c2c66affSColin Finck #endif 99c2c66affSColin Finck 100c2c66affSColin Finck 101c2c66affSColin Finck /* 102c2c66affSColin Finck * ACPI Table interfaces 103c2c66affSColin Finck */ 104c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetRootPointer 105c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS 106c2c66affSColin Finck AcpiOsGetRootPointer ( 107c2c66affSColin Finck void); 108c2c66affSColin Finck #endif 109c2c66affSColin Finck 110c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPredefinedOverride 111c2c66affSColin Finck ACPI_STATUS 112c2c66affSColin Finck AcpiOsPredefinedOverride ( 113c2c66affSColin Finck const ACPI_PREDEFINED_NAMES *InitVal, 114c2c66affSColin Finck ACPI_STRING *NewVal); 115c2c66affSColin Finck #endif 116c2c66affSColin Finck 117c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTableOverride 118c2c66affSColin Finck ACPI_STATUS 119c2c66affSColin Finck AcpiOsTableOverride ( 120c2c66affSColin Finck ACPI_TABLE_HEADER *ExistingTable, 121c2c66affSColin Finck ACPI_TABLE_HEADER **NewTable); 122c2c66affSColin Finck #endif 123c2c66affSColin Finck 124c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPhysicalTableOverride 125c2c66affSColin Finck ACPI_STATUS 126c2c66affSColin Finck AcpiOsPhysicalTableOverride ( 127c2c66affSColin Finck ACPI_TABLE_HEADER *ExistingTable, 128c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS *NewAddress, 129c2c66affSColin Finck UINT32 *NewTableLength); 130c2c66affSColin Finck #endif 131c2c66affSColin Finck 132c2c66affSColin Finck 133c2c66affSColin Finck /* 134c2c66affSColin Finck * Spinlock primitives 135c2c66affSColin Finck */ 136c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateLock 137c2c66affSColin Finck ACPI_STATUS 138c2c66affSColin Finck AcpiOsCreateLock ( 139c2c66affSColin Finck ACPI_SPINLOCK *OutHandle); 140c2c66affSColin Finck #endif 141c2c66affSColin Finck 142c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteLock 143c2c66affSColin Finck void 144c2c66affSColin Finck AcpiOsDeleteLock ( 145c2c66affSColin Finck ACPI_SPINLOCK Handle); 146c2c66affSColin Finck #endif 147c2c66affSColin Finck 148c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireLock 149c2c66affSColin Finck ACPI_CPU_FLAGS 150c2c66affSColin Finck AcpiOsAcquireLock ( 151c2c66affSColin Finck ACPI_SPINLOCK Handle); 152c2c66affSColin Finck #endif 153c2c66affSColin Finck 154c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseLock 155c2c66affSColin Finck void 156c2c66affSColin Finck AcpiOsReleaseLock ( 157c2c66affSColin Finck ACPI_SPINLOCK Handle, 158c2c66affSColin Finck ACPI_CPU_FLAGS Flags); 159c2c66affSColin Finck #endif 160c2c66affSColin Finck 161c2c66affSColin Finck 162c2c66affSColin Finck /* 163c2c66affSColin Finck * Semaphore primitives 164c2c66affSColin Finck */ 165c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateSemaphore 166c2c66affSColin Finck ACPI_STATUS 167c2c66affSColin Finck AcpiOsCreateSemaphore ( 168c2c66affSColin Finck UINT32 MaxUnits, 169c2c66affSColin Finck UINT32 InitialUnits, 170c2c66affSColin Finck ACPI_SEMAPHORE *OutHandle); 171c2c66affSColin Finck #endif 172c2c66affSColin Finck 173c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteSemaphore 174c2c66affSColin Finck ACPI_STATUS 175c2c66affSColin Finck AcpiOsDeleteSemaphore ( 176c2c66affSColin Finck ACPI_SEMAPHORE Handle); 177c2c66affSColin Finck #endif 178c2c66affSColin Finck 179c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitSemaphore 180c2c66affSColin Finck ACPI_STATUS 181c2c66affSColin Finck AcpiOsWaitSemaphore ( 182c2c66affSColin Finck ACPI_SEMAPHORE Handle, 183c2c66affSColin Finck UINT32 Units, 184c2c66affSColin Finck UINT16 Timeout); 185c2c66affSColin Finck #endif 186c2c66affSColin Finck 187c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignalSemaphore 188c2c66affSColin Finck ACPI_STATUS 189c2c66affSColin Finck AcpiOsSignalSemaphore ( 190c2c66affSColin Finck ACPI_SEMAPHORE Handle, 191c2c66affSColin Finck UINT32 Units); 192c2c66affSColin Finck #endif 193c2c66affSColin Finck 194c2c66affSColin Finck 195c2c66affSColin Finck /* 196c2c66affSColin Finck * Mutex primitives. May be configured to use semaphores instead via 197c2c66affSColin Finck * ACPI_MUTEX_TYPE (see platform/acenv.h) 198c2c66affSColin Finck */ 199c2c66affSColin Finck #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE) 200c2c66affSColin Finck 201c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateMutex 202c2c66affSColin Finck ACPI_STATUS 203c2c66affSColin Finck AcpiOsCreateMutex ( 204c2c66affSColin Finck ACPI_MUTEX *OutHandle); 205c2c66affSColin Finck #endif 206c2c66affSColin Finck 207c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteMutex 208c2c66affSColin Finck void 209c2c66affSColin Finck AcpiOsDeleteMutex ( 210c2c66affSColin Finck ACPI_MUTEX Handle); 211c2c66affSColin Finck #endif 212c2c66affSColin Finck 213c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireMutex 214c2c66affSColin Finck ACPI_STATUS 215c2c66affSColin Finck AcpiOsAcquireMutex ( 216c2c66affSColin Finck ACPI_MUTEX Handle, 217c2c66affSColin Finck UINT16 Timeout); 218c2c66affSColin Finck #endif 219c2c66affSColin Finck 220c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseMutex 221c2c66affSColin Finck void 222c2c66affSColin Finck AcpiOsReleaseMutex ( 223c2c66affSColin Finck ACPI_MUTEX Handle); 224c2c66affSColin Finck #endif 225c2c66affSColin Finck 226c2c66affSColin Finck #endif 227c2c66affSColin Finck 228c2c66affSColin Finck 229c2c66affSColin Finck /* 230c2c66affSColin Finck * Memory allocation and mapping 231c2c66affSColin Finck */ 232c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocate 233c2c66affSColin Finck void * 234c2c66affSColin Finck AcpiOsAllocate ( 235c2c66affSColin Finck ACPI_SIZE Size); 236c2c66affSColin Finck #endif 237c2c66affSColin Finck 238c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocateZeroed 239c2c66affSColin Finck void * 240c2c66affSColin Finck AcpiOsAllocateZeroed ( 241c2c66affSColin Finck ACPI_SIZE Size); 242c2c66affSColin Finck #endif 243c2c66affSColin Finck 244c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsFree 245c2c66affSColin Finck void 246c2c66affSColin Finck AcpiOsFree ( 247c2c66affSColin Finck void * Memory); 248c2c66affSColin Finck #endif 249c2c66affSColin Finck 250c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsMapMemory 251c2c66affSColin Finck void * 252c2c66affSColin Finck AcpiOsMapMemory ( 253c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS Where, 254c2c66affSColin Finck ACPI_SIZE Length); 255c2c66affSColin Finck #endif 256c2c66affSColin Finck 257c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsUnmapMemory 258c2c66affSColin Finck void 259c2c66affSColin Finck AcpiOsUnmapMemory ( 260c2c66affSColin Finck void *LogicalAddress, 261c2c66affSColin Finck ACPI_SIZE Size); 262c2c66affSColin Finck #endif 263c2c66affSColin Finck 264c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetPhysicalAddress 265c2c66affSColin Finck ACPI_STATUS 266c2c66affSColin Finck AcpiOsGetPhysicalAddress ( 267c2c66affSColin Finck void *LogicalAddress, 268c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS *PhysicalAddress); 269c2c66affSColin Finck #endif 270c2c66affSColin Finck 271c2c66affSColin Finck 272c2c66affSColin Finck /* 273c2c66affSColin Finck * Memory/Object Cache 274c2c66affSColin Finck */ 275c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateCache 276c2c66affSColin Finck ACPI_STATUS 277c2c66affSColin Finck AcpiOsCreateCache ( 278c2c66affSColin Finck char *CacheName, 279c2c66affSColin Finck UINT16 ObjectSize, 280c2c66affSColin Finck UINT16 MaxDepth, 281c2c66affSColin Finck ACPI_CACHE_T **ReturnCache); 282c2c66affSColin Finck #endif 283c2c66affSColin Finck 284c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteCache 285c2c66affSColin Finck ACPI_STATUS 286c2c66affSColin Finck AcpiOsDeleteCache ( 287c2c66affSColin Finck ACPI_CACHE_T *Cache); 288c2c66affSColin Finck #endif 289c2c66affSColin Finck 290c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPurgeCache 291c2c66affSColin Finck ACPI_STATUS 292c2c66affSColin Finck AcpiOsPurgeCache ( 293c2c66affSColin Finck ACPI_CACHE_T *Cache); 294c2c66affSColin Finck #endif 295c2c66affSColin Finck 296c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireObject 297c2c66affSColin Finck void * 298c2c66affSColin Finck AcpiOsAcquireObject ( 299c2c66affSColin Finck ACPI_CACHE_T *Cache); 300c2c66affSColin Finck #endif 301c2c66affSColin Finck 302c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseObject 303c2c66affSColin Finck ACPI_STATUS 304c2c66affSColin Finck AcpiOsReleaseObject ( 305c2c66affSColin Finck ACPI_CACHE_T *Cache, 306c2c66affSColin Finck void *Object); 307c2c66affSColin Finck #endif 308c2c66affSColin Finck 309c2c66affSColin Finck 310c2c66affSColin Finck /* 311c2c66affSColin Finck * Interrupt handlers 312c2c66affSColin Finck */ 313c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInstallInterruptHandler 314c2c66affSColin Finck ACPI_STATUS 315c2c66affSColin Finck AcpiOsInstallInterruptHandler ( 316c2c66affSColin Finck UINT32 InterruptNumber, 317c2c66affSColin Finck ACPI_OSD_HANDLER ServiceRoutine, 318c2c66affSColin Finck void *Context); 319c2c66affSColin Finck #endif 320c2c66affSColin Finck 321c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRemoveInterruptHandler 322c2c66affSColin Finck ACPI_STATUS 323c2c66affSColin Finck AcpiOsRemoveInterruptHandler ( 324c2c66affSColin Finck UINT32 InterruptNumber, 325c2c66affSColin Finck ACPI_OSD_HANDLER ServiceRoutine); 326c2c66affSColin Finck #endif 327c2c66affSColin Finck 328c2c66affSColin Finck 329c2c66affSColin Finck /* 330c2c66affSColin Finck * Threads and Scheduling 331c2c66affSColin Finck */ 332c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetThreadId 333c2c66affSColin Finck ACPI_THREAD_ID 334c2c66affSColin Finck AcpiOsGetThreadId ( 335c2c66affSColin Finck void); 336c2c66affSColin Finck #endif 337c2c66affSColin Finck 338c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsExecute 339c2c66affSColin Finck ACPI_STATUS 340c2c66affSColin Finck AcpiOsExecute ( 341c2c66affSColin Finck ACPI_EXECUTE_TYPE Type, 342c2c66affSColin Finck ACPI_OSD_EXEC_CALLBACK Function, 343c2c66affSColin Finck void *Context); 344c2c66affSColin Finck #endif 345c2c66affSColin Finck 346c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitEventsComplete 347c2c66affSColin Finck void 348c2c66affSColin Finck AcpiOsWaitEventsComplete ( 349c2c66affSColin Finck void); 350c2c66affSColin Finck #endif 351c2c66affSColin Finck 352c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSleep 353c2c66affSColin Finck void 354c2c66affSColin Finck AcpiOsSleep ( 355c2c66affSColin Finck UINT64 Milliseconds); 356c2c66affSColin Finck #endif 357c2c66affSColin Finck 358c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsStall 359c2c66affSColin Finck void 360c2c66affSColin Finck AcpiOsStall ( 361c2c66affSColin Finck UINT32 Microseconds); 362c2c66affSColin Finck #endif 363c2c66affSColin Finck 364c2c66affSColin Finck 365c2c66affSColin Finck /* 366c2c66affSColin Finck * Platform and hardware-independent I/O interfaces 367c2c66affSColin Finck */ 368c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPort 369c2c66affSColin Finck ACPI_STATUS 370c2c66affSColin Finck AcpiOsReadPort ( 371c2c66affSColin Finck ACPI_IO_ADDRESS Address, 372c2c66affSColin Finck UINT32 *Value, 373c2c66affSColin Finck UINT32 Width); 374c2c66affSColin Finck #endif 375c2c66affSColin Finck 376c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePort 377c2c66affSColin Finck ACPI_STATUS 378c2c66affSColin Finck AcpiOsWritePort ( 379c2c66affSColin Finck ACPI_IO_ADDRESS Address, 380c2c66affSColin Finck UINT32 Value, 381c2c66affSColin Finck UINT32 Width); 382c2c66affSColin Finck #endif 383c2c66affSColin Finck 384c2c66affSColin Finck 385c2c66affSColin Finck /* 386c2c66affSColin Finck * Platform and hardware-independent physical memory interfaces 387c2c66affSColin Finck */ 388c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadMemory 389c2c66affSColin Finck ACPI_STATUS 390c2c66affSColin Finck AcpiOsReadMemory ( 391c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS Address, 392c2c66affSColin Finck UINT64 *Value, 393c2c66affSColin Finck UINT32 Width); 394c2c66affSColin Finck #endif 395c2c66affSColin Finck 396c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteMemory 397c2c66affSColin Finck ACPI_STATUS 398c2c66affSColin Finck AcpiOsWriteMemory ( 399c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS Address, 400c2c66affSColin Finck UINT64 Value, 401c2c66affSColin Finck UINT32 Width); 402c2c66affSColin Finck #endif 403c2c66affSColin Finck 404c2c66affSColin Finck 405c2c66affSColin Finck /* 406c2c66affSColin Finck * Platform and hardware-independent PCI configuration space access 407c2c66affSColin Finck * Note: Can't use "Register" as a parameter, changed to "Reg" -- 408c2c66affSColin Finck * certain compilers complain. 409c2c66affSColin Finck */ 410c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPciConfiguration 411c2c66affSColin Finck ACPI_STATUS 412c2c66affSColin Finck AcpiOsReadPciConfiguration ( 413c2c66affSColin Finck ACPI_PCI_ID *PciId, 414c2c66affSColin Finck UINT32 Reg, 415c2c66affSColin Finck UINT64 *Value, 416c2c66affSColin Finck UINT32 Width); 417c2c66affSColin Finck #endif 418c2c66affSColin Finck 419c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePciConfiguration 420c2c66affSColin Finck ACPI_STATUS 421c2c66affSColin Finck AcpiOsWritePciConfiguration ( 422c2c66affSColin Finck ACPI_PCI_ID *PciId, 423c2c66affSColin Finck UINT32 Reg, 424c2c66affSColin Finck UINT64 Value, 425c2c66affSColin Finck UINT32 Width); 426c2c66affSColin Finck #endif 427c2c66affSColin Finck 428c2c66affSColin Finck 429c2c66affSColin Finck /* 430c2c66affSColin Finck * Miscellaneous 431c2c66affSColin Finck */ 432c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadable 433c2c66affSColin Finck BOOLEAN 434c2c66affSColin Finck AcpiOsReadable ( 435c2c66affSColin Finck void *Pointer, 436c2c66affSColin Finck ACPI_SIZE Length); 437c2c66affSColin Finck #endif 438c2c66affSColin Finck 439c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritable 440c2c66affSColin Finck BOOLEAN 441c2c66affSColin Finck AcpiOsWritable ( 442c2c66affSColin Finck void *Pointer, 443c2c66affSColin Finck ACPI_SIZE Length); 444c2c66affSColin Finck #endif 445c2c66affSColin Finck 446c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTimer 447c2c66affSColin Finck UINT64 448c2c66affSColin Finck AcpiOsGetTimer ( 449c2c66affSColin Finck void); 450c2c66affSColin Finck #endif 451c2c66affSColin Finck 452c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignal 453c2c66affSColin Finck ACPI_STATUS 454c2c66affSColin Finck AcpiOsSignal ( 455c2c66affSColin Finck UINT32 Function, 456c2c66affSColin Finck void *Info); 457c2c66affSColin Finck #endif 458c2c66affSColin Finck 459c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsEnterSleep 460c2c66affSColin Finck ACPI_STATUS 461c2c66affSColin Finck AcpiOsEnterSleep ( 462c2c66affSColin Finck UINT8 SleepState, 463c2c66affSColin Finck UINT32 RegaValue, 464c2c66affSColin Finck UINT32 RegbValue); 465c2c66affSColin Finck #endif 466c2c66affSColin Finck 467c2c66affSColin Finck 468c2c66affSColin Finck /* 469c2c66affSColin Finck * Debug print routines 470c2c66affSColin Finck */ 471c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPrintf 4725d4f13f6SThomas Faber ACPI_PRINTF_LIKE (1) 473c2c66affSColin Finck void ACPI_INTERNAL_VAR_XFACE 474c2c66affSColin Finck AcpiOsPrintf ( 475c2c66affSColin Finck const char *Format, 476c2c66affSColin Finck ...); 477c2c66affSColin Finck #endif 478c2c66affSColin Finck 479c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsVprintf 480c2c66affSColin Finck void 481c2c66affSColin Finck AcpiOsVprintf ( 482c2c66affSColin Finck const char *Format, 483c2c66affSColin Finck va_list Args); 484c2c66affSColin Finck #endif 485c2c66affSColin Finck 486c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRedirectOutput 487c2c66affSColin Finck void 488c2c66affSColin Finck AcpiOsRedirectOutput ( 489c2c66affSColin Finck void *Destination); 490c2c66affSColin Finck #endif 491c2c66affSColin Finck 492c2c66affSColin Finck 493c2c66affSColin Finck /* 494c2c66affSColin Finck * Debug IO 495c2c66affSColin Finck */ 496c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetLine 497c2c66affSColin Finck ACPI_STATUS 498c2c66affSColin Finck AcpiOsGetLine ( 499c2c66affSColin Finck char *Buffer, 500c2c66affSColin Finck UINT32 BufferLength, 501c2c66affSColin Finck UINT32 *BytesRead); 502c2c66affSColin Finck #endif 503c2c66affSColin Finck 504c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInitializeDebugger 505c2c66affSColin Finck ACPI_STATUS 506c2c66affSColin Finck AcpiOsInitializeDebugger ( 507c2c66affSColin Finck void); 508c2c66affSColin Finck #endif 509c2c66affSColin Finck 510c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTerminateDebugger 511c2c66affSColin Finck void 512c2c66affSColin Finck AcpiOsTerminateDebugger ( 513c2c66affSColin Finck void); 514c2c66affSColin Finck #endif 515c2c66affSColin Finck 516c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitCommandReady 517c2c66affSColin Finck ACPI_STATUS 518c2c66affSColin Finck AcpiOsWaitCommandReady ( 519c2c66affSColin Finck void); 520c2c66affSColin Finck #endif 521c2c66affSColin Finck 522c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsNotifyCommandComplete 523c2c66affSColin Finck ACPI_STATUS 524c2c66affSColin Finck AcpiOsNotifyCommandComplete ( 525c2c66affSColin Finck void); 526c2c66affSColin Finck #endif 527c2c66affSColin Finck 528c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint 529c2c66affSColin Finck void 530c2c66affSColin Finck AcpiOsTracePoint ( 531c2c66affSColin Finck ACPI_TRACE_EVENT_TYPE Type, 532c2c66affSColin Finck BOOLEAN Begin, 533c2c66affSColin Finck UINT8 *Aml, 534c2c66affSColin Finck char *Pathname); 535c2c66affSColin Finck #endif 536c2c66affSColin Finck 537c2c66affSColin Finck 538c2c66affSColin Finck /* 539c2c66affSColin Finck * Obtain ACPI table(s) 540c2c66affSColin Finck */ 541c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByName 542c2c66affSColin Finck ACPI_STATUS 543c2c66affSColin Finck AcpiOsGetTableByName ( 544c2c66affSColin Finck char *Signature, 545c2c66affSColin Finck UINT32 Instance, 546c2c66affSColin Finck ACPI_TABLE_HEADER **Table, 547c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS *Address); 548c2c66affSColin Finck #endif 549c2c66affSColin Finck 550c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByIndex 551c2c66affSColin Finck ACPI_STATUS 552c2c66affSColin Finck AcpiOsGetTableByIndex ( 553c2c66affSColin Finck UINT32 Index, 554c2c66affSColin Finck ACPI_TABLE_HEADER **Table, 555c2c66affSColin Finck UINT32 *Instance, 556c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS *Address); 557c2c66affSColin Finck #endif 558c2c66affSColin Finck 559c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByAddress 560c2c66affSColin Finck ACPI_STATUS 561c2c66affSColin Finck AcpiOsGetTableByAddress ( 562c2c66affSColin Finck ACPI_PHYSICAL_ADDRESS Address, 563c2c66affSColin Finck ACPI_TABLE_HEADER **Table); 564c2c66affSColin Finck #endif 565c2c66affSColin Finck 566c2c66affSColin Finck 567c2c66affSColin Finck /* 568c2c66affSColin Finck * Directory manipulation 569c2c66affSColin Finck */ 570c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsOpenDirectory 571c2c66affSColin Finck void * 572c2c66affSColin Finck AcpiOsOpenDirectory ( 573c2c66affSColin Finck char *Pathname, 574c2c66affSColin Finck char *WildcardSpec, 575c2c66affSColin Finck char RequestedFileType); 576c2c66affSColin Finck #endif 577c2c66affSColin Finck 578c2c66affSColin Finck /* RequesteFileType values */ 579c2c66affSColin Finck 580c2c66affSColin Finck #define REQUEST_FILE_ONLY 0 581c2c66affSColin Finck #define REQUEST_DIR_ONLY 1 582c2c66affSColin Finck 583c2c66affSColin Finck 584c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetNextFilename 585c2c66affSColin Finck char * 586c2c66affSColin Finck AcpiOsGetNextFilename ( 587c2c66affSColin Finck void *DirHandle); 588c2c66affSColin Finck #endif 589c2c66affSColin Finck 590c2c66affSColin Finck #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseDirectory 591c2c66affSColin Finck void 592c2c66affSColin Finck AcpiOsCloseDirectory ( 593c2c66affSColin Finck void *DirHandle); 594c2c66affSColin Finck #endif 595c2c66affSColin Finck 596c2c66affSColin Finck 597c2c66affSColin Finck #endif /* __ACPIOSXF_H__ */ 598