acpiosxf.h 20 KB

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