1 
2 /******************************************************************************
3  *
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.
7  *
8  *****************************************************************************/
9 
10 /*
11  * Copyright (C) 2000 - 2007, R. Byron Moore
12  * All rights reserved.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions
16  * are met:
17  * 1. Redistributions of source code must retain the above copyright
18  *    notice, this list of conditions, and the following disclaimer,
19  *    without modification.
20  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
21  *    substantially similar to the "NO WARRANTY" disclaimer below
22  *    ("Disclaimer") and any redistribution must be conditioned upon
23  *    including a substantially similar Disclaimer requirement for further
24  *    binary redistribution.
25  * 3. Neither the names of the above-listed copyright holders nor the names
26  *    of any contributors may be used to endorse or promote products derived
27  *    from this software without specific prior written permission.
28  *
29  * Alternatively, this software may be distributed under the terms of the
30  * GNU General Public License ("GPL") version 2 as published by the Free
31  * Software Foundation.
32  *
33  * NO WARRANTY
34  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
37  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
38  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
39  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
40  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
42  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
43  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44  * POSSIBILITY OF SUCH DAMAGES.
45  */
46 
47 #ifndef __ACPIOSXF_H__
48 #define __ACPIOSXF_H__
49 
50 #include "platform/acenv.h"
51 #include "actypes.h"
52 
53 /*
54  * ACPI Table interfaces
55  */
56 acpi_physical_address acpi_os_get_root_pointer(void);
57 
58 /*
59  * Memory mapping
60  */
61 void __iomem *acpi_os_map_memory(acpi_physical_address where,
62 				 acpi_native_uint length);
63 
64 void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
65 
66 /*
67  * Platform and hardware-independent I/O interfaces
68  */
69 acpi_status acpi_os_read_port(acpi_io_address address, u32 * value, u32 width);
70 
71 acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width);
72 
73 /*
74  * Platform and hardware-independent physical memory interfaces
75  */
76 acpi_status
77 acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width);
78 
79 acpi_status
80 acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width);
81 
82 /*
83  * Debug print routines
84  */
85 void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...);
86 
87 void acpi_os_vprintf(const char *format, va_list args);
88 
89 #endif				/* __ACPIOSXF_H__ */
90