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
47 /* Functions for Acpi_os_signal */
49 #define ACPI_SIGNAL_FATAL 0
50 #define ACPI_SIGNAL_BREAKPOINT 1
52 typedef struct acpi_fatal_info
58 } ACPI_SIGNAL_FATAL_INFO;
62 * Types specific to the OS service interfaces
70 void (*OSD_EXECUTION_CALLBACK) (
75 * OSL Initialization and shutdown primitives
87 acpi_os_get_root_pointer (
89 ACPI_PHYSICAL_ADDRESS *rsdp_physical_address);
93 * Synchronization primitives
97 acpi_os_create_semaphore (
100 acpi_handle *out_handle);
103 acpi_os_delete_semaphore (
107 acpi_os_wait_semaphore (
113 acpi_os_signal_semaphore (
119 * Memory allocation and mapping
136 ACPI_PHYSICAL_ADDRESS physical_address,
138 void **logical_address);
141 acpi_os_unmap_memory (
142 void *logical_address,
146 acpi_os_get_physical_address (
147 void *logical_address,
148 ACPI_PHYSICAL_ADDRESS *physical_address);
156 acpi_os_install_interrupt_handler (
157 u32 interrupt_number,
158 OSD_HANDLER service_routine,
162 acpi_os_remove_interrupt_handler (
163 u32 interrupt_number,
164 OSD_HANDLER service_routine);
168 * Threads and Scheduling
172 acpi_os_get_thread_id (
176 acpi_os_queue_for_execution (
178 OSD_EXECUTION_CALLBACK function,
192 * Platform and hardware-independent I/O interfaces
197 ACPI_IO_ADDRESS address,
204 ACPI_IO_ADDRESS address,
210 * Platform and hardware-independent physical memory interfaces
214 acpi_os_read_memory (
215 ACPI_PHYSICAL_ADDRESS address,
221 acpi_os_write_memory (
222 ACPI_PHYSICAL_ADDRESS address,
228 * Platform and hardware-independent PCI configuration space access
232 acpi_os_read_pci_configuration (
240 acpi_os_write_pci_configuration (
272 * Debug print routines
277 const NATIVE_CHAR *format,
282 const NATIVE_CHAR *format,
292 NATIVE_CHAR *buffer);
301 void *failed_assertion,
304 NATIVE_CHAR *message);
307 #endif /* __ACPIOSXF_H__ */