2 /******************************************************************************
4 * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These
5 * interfaces must be implemented by OSL to interface the
6 * ACPI components to the host operating system.
8 *****************************************************************************/
12 * Copyright (C) 2000, 2001 R. Byron Moore
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef __ACPIOSXF_H__
30 #define __ACPIOSXF_H__
32 #include "platform/acenv.h"
36 /* Priorities for Acpi_os_queue_for_execution */
38 #define OSD_PRIORITY_GPE 1
39 #define OSD_PRIORITY_HIGH 2
40 #define OSD_PRIORITY_MED 3
41 #define OSD_PRIORITY_LO 4
43 #define ACPI_NO_UNIT_LIMIT ((u32) -1)
44 #define ACPI_MUTEX_SEM 1
48 * Types specific to the OS service interfaces
56 void (*OSD_EXECUTION_CALLBACK) (
61 * OSL Initialization and shutdown primitives
74 * Synchronization primitives
78 acpi_os_create_semaphore (
81 ACPI_HANDLE *out_handle);
84 acpi_os_delete_semaphore (
88 acpi_os_wait_semaphore (
94 acpi_os_signal_semaphore (
100 * Memory allocation and mapping
117 ACPI_PHYSICAL_ADDRESS physical_address,
119 void **logical_address);
122 acpi_os_unmap_memory (
123 void *logical_address,
127 acpi_os_get_physical_address (
128 void *logical_address,
129 ACPI_PHYSICAL_ADDRESS *physical_address);
137 acpi_os_install_interrupt_handler (
138 u32 interrupt_number,
139 OSD_HANDLER service_routine,
143 acpi_os_remove_interrupt_handler (
144 u32 interrupt_number,
145 OSD_HANDLER service_routine);
149 * Threads and Scheduling
153 acpi_os_get_thread_id (
157 acpi_os_queue_for_execution (
159 OSD_EXECUTION_CALLBACK function,
173 * Platform/Hardware independent I/O interfaces
178 ACPI_IO_ADDRESS in_port);
183 ACPI_IO_ADDRESS in_port);
187 ACPI_IO_ADDRESS in_port);
191 ACPI_IO_ADDRESS out_port,
196 ACPI_IO_ADDRESS out_port,
201 ACPI_IO_ADDRESS out_port,
206 * Platform/Hardware independent physical memory interfaces
211 ACPI_PHYSICAL_ADDRESS in_addr);
215 ACPI_PHYSICAL_ADDRESS in_addr);
219 ACPI_PHYSICAL_ADDRESS in_addr);
223 ACPI_PHYSICAL_ADDRESS out_addr,
228 ACPI_PHYSICAL_ADDRESS out_addr,
233 ACPI_PHYSICAL_ADDRESS out_addr,
238 * Standard access to PCI configuration space
242 acpi_os_read_pci_cfg_byte (
249 acpi_os_read_pci_cfg_word (
256 acpi_os_read_pci_cfg_dword (
263 acpi_os_write_pci_cfg_byte (
270 acpi_os_write_pci_cfg_word (
278 acpi_os_write_pci_cfg_dword (
291 NATIVE_CHAR *message);
306 * Debug print routines
311 const NATIVE_CHAR *format,
316 const NATIVE_CHAR *format,
326 NATIVE_CHAR *buffer);
335 void *failed_assertion,
338 NATIVE_CHAR *message);
341 #endif /* __ACPIOSXF_H__ */