2 /******************************************************************************
4 * Name: acpiosd.h - All interfaces to the OS-dependent layer. These
5 * interfaces must be implemented by the OS-dependent
6 * front-end to the ACPI subsystem.
8 *****************************************************************************/
12 * Copyright (C) 2000 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
36 /* Priorities for Acpi_os_queue_for_execution */
38 #define OSD_PRIORITY_HIGH 1
39 #define OSD_PRIORITY_MED 2
40 #define OSD_PRIORITY_LO 3
41 #define OSD_PRIORITY_GPE OSD_PRIORITY_HIGH
43 #define ACPI_NO_UNIT_LIMIT ((u32) -1)
44 #define ACPI_MUTEX_SEM 1
48 * Types specific to the OS-dependent layer interfaces
56 void (*OSD_EXECUTION_CALLBACK
) (
61 * Initialization and shutdown primitives (Optional)
73 * Synchronization primitives
77 acpi_os_create_semaphore (
80 ACPI_HANDLE
*out_handle
);
83 acpi_os_delete_semaphore (
87 acpi_os_wait_semaphore (
93 acpi_os_signal_semaphore (
98 * Memory allocation and mapping
115 ACPI_PHYSICAL_ADDRESS physical_address
,
117 void **logical_address
);
120 acpi_os_unmap_memory (
121 void *logical_address
,
130 acpi_os_install_interrupt_handler (
131 u32 interrupt_number
,
132 OSD_HANDLER service_routine
,
136 acpi_os_remove_interrupt_handler (
137 u32 interrupt_number
,
138 OSD_HANDLER service_routine
);
146 acpi_os_queue_for_execution (
148 OSD_EXECUTION_CALLBACK function
,
161 * Platform/Hardware independent I/O interfaces
166 ACPI_IO_ADDRESS in_port
);
171 ACPI_IO_ADDRESS in_port
);
175 ACPI_IO_ADDRESS in_port
);
179 ACPI_IO_ADDRESS out_port
,
184 ACPI_IO_ADDRESS out_port
,
189 ACPI_IO_ADDRESS out_port
,
193 * Platform/Hardware independent physical memory interfaces
198 ACPI_PHYSICAL_ADDRESS in_addr
);
202 ACPI_PHYSICAL_ADDRESS in_addr
);
206 ACPI_PHYSICAL_ADDRESS in_addr
);
210 ACPI_PHYSICAL_ADDRESS out_addr
,
215 ACPI_PHYSICAL_ADDRESS out_addr
,
220 ACPI_PHYSICAL_ADDRESS out_addr
,
225 * Standard access to PCI configuration space
229 acpi_os_read_pci_cfg_byte (
236 acpi_os_read_pci_cfg_word (
243 acpi_os_read_pci_cfg_dword (
250 acpi_os_write_pci_cfg_byte (
257 acpi_os_write_pci_cfg_word (
265 acpi_os_write_pci_cfg_dword (
278 NATIVE_CHAR
*message
);
293 * Debug print routines
298 const NATIVE_CHAR
*format
,
303 const NATIVE_CHAR
*format
,
312 NATIVE_CHAR
*buffer
);
321 void *failed_assertion
,
324 NATIVE_CHAR
*message
);
327 #endif /* __ACPIOSD_H__ */