⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acpiosxf.h

📁 Linux内核源代码 为压缩文件 是<<Linux内核>>一书中的源代码
💻 H
字号:
/****************************************************************************** * * Name: acpiosxf.h - All interfaces to the OS-dependent layer.  These *                    interfaces must be implemented by the OS-dependent *                    front-end to the ACPI subsystem. * *****************************************************************************//* *  Copyright (C) 2000 R. Byron Moore * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#ifndef __ACPIOSD_H__#define __ACPIOSD_H__#include "acenv.h"#include "actypes.h"/* Priorities for Acpi_os_queue_for_execution */#define OSD_PRIORITY_GPE    1#define OSD_PRIORITY_HIGH   2#define OSD_PRIORITY_MED    3#define OSD_PRIORITY_LO     4#define ACPI_NO_UNIT_LIMIT  ((u32) -1)#define ACPI_MUTEX_SEM      1/* * Types specific to the OS-dependent layer interfaces */typedefu32 (*OSD_HANDLER) (	void                    *context);typedefvoid (*OSD_EXECUTION_CALLBACK) (	void                    *context);/* * Initialization and shutdown primitives  (Optional) */ACPI_STATUSacpi_os_initialize (	void);ACPI_STATUSacpi_os_terminate (	void);/* * Synchronization primitives */ACPI_STATUSacpi_os_create_semaphore (	u32                     max_units,	u32                     initial_units,	ACPI_HANDLE             *out_handle);ACPI_STATUSacpi_os_delete_semaphore (	ACPI_HANDLE             handle);ACPI_STATUSacpi_os_wait_semaphore (	ACPI_HANDLE             handle,	u32                     units,	u32                     timeout);ACPI_STATUSacpi_os_signal_semaphore (	ACPI_HANDLE             handle,	u32                     units);/* * Memory allocation and mapping */void *acpi_os_allocate (	u32                     size);void *acpi_os_callocate (	u32                     size);voidacpi_os_free (	void *                  memory);ACPI_STATUSacpi_os_map_memory (	ACPI_PHYSICAL_ADDRESS   physical_address,	u32                     length,	void                    **logical_address);voidacpi_os_unmap_memory (	void                    *logical_address,	u32                     length);/* * Interrupt handlers */ACPI_STATUSacpi_os_install_interrupt_handler (	u32                     interrupt_number,	OSD_HANDLER             service_routine,	void                    *context);ACPI_STATUSacpi_os_remove_interrupt_handler (	u32                     interrupt_number,	OSD_HANDLER             service_routine);/* * Scheduling */ACPI_STATUSacpi_os_queue_for_execution (	u32                     priority,	OSD_EXECUTION_CALLBACK  function,	void                    *context);voidacpi_os_sleep (	u32                     seconds,	u32                     milliseconds);voidacpi_os_sleep_usec (	u32                     microseconds);/* * Platform/Hardware independent I/O interfaces */u8acpi_os_in8 (	ACPI_IO_ADDRESS         in_port);u16acpi_os_in16 (	ACPI_IO_ADDRESS         in_port);u32acpi_os_in32 (	ACPI_IO_ADDRESS         in_port);voidacpi_os_out8 (	ACPI_IO_ADDRESS         out_port,	u8                      value);voidacpi_os_out16 (	ACPI_IO_ADDRESS         out_port,	u16                     value);voidacpi_os_out32 (	ACPI_IO_ADDRESS         out_port,	u32                     value);/* * Platform/Hardware independent physical memory interfaces */u8acpi_os_mem_in8 (	ACPI_PHYSICAL_ADDRESS   in_addr);u16acpi_os_mem_in16 (	ACPI_PHYSICAL_ADDRESS   in_addr);u32acpi_os_mem_in32 (	ACPI_PHYSICAL_ADDRESS   in_addr);voidacpi_os_mem_out8 (	ACPI_PHYSICAL_ADDRESS   out_addr,	u8                      value);voidacpi_os_mem_out16 (	ACPI_PHYSICAL_ADDRESS   out_addr,	u16                     value);voidacpi_os_mem_out32 (	ACPI_PHYSICAL_ADDRESS   out_addr,	u32                     value);/* * Standard access to PCI configuration space */ACPI_STATUSacpi_os_read_pci_cfg_byte (	u32                     bus,	u32                     device_function,	u32                     register,	u8                      *value);ACPI_STATUSacpi_os_read_pci_cfg_word (	u32                     bus,	u32                     device_function,	u32                     register,	u16                     *value);ACPI_STATUSacpi_os_read_pci_cfg_dword (	u32                     bus,	u32                     device_function,	u32                     register,	u32                     *value);ACPI_STATUSacpi_os_write_pci_cfg_byte (	u32                     bus,	u32                     device_function,	u32                     register,	u8                      value);ACPI_STATUSacpi_os_write_pci_cfg_word (	u32                     bus,	u32                     device_function,	u32                     register,	u16                     value);ACPI_STATUSacpi_os_write_pci_cfg_dword (	u32                     bus,	u32                     device_function,	u32                     register,	u32                     value);/* * Miscellaneous */ACPI_STATUSacpi_os_breakpoint (	NATIVE_CHAR             *message);u8acpi_os_readable (	void                    *pointer,	u32                     length);u8acpi_os_writable (	void                    *pointer,	u32                     length);/* * Debug print routines */s32acpi_os_printf (	const NATIVE_CHAR       *format,	...);s32acpi_os_vprintf (	const NATIVE_CHAR       *format,	va_list                 args);/* * Debug input */u32acpi_os_get_line (	NATIVE_CHAR             *buffer);/* * Debug */voidacpi_os_dbg_assert(	void                    *failed_assertion,	void                    *file_name,	u32                     line_number,	NATIVE_CHAR             *message);#endif /* __ACPIOSD_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -