2 * acpi_osl.c - OS-dependent functions ($Revision: 83 $)
4 * Copyright (C) 2000 Andrew Henroid
5 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
6 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
8 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 #include <linux/module.h>
29 #include <linux/kernel.h>
30 #include <linux/slab.h>
32 #include <linux/pci.h>
33 #include <linux/smp_lock.h>
34 #include <linux/interrupt.h>
35 #include <linux/kmod.h>
36 #include <linux/delay.h>
37 #include <linux/workqueue.h>
38 #include <linux/nmi.h>
39 #include <acpi/acpi.h>
41 #include <acpi/acpi_bus.h>
42 #include <acpi/processor.h>
43 #include <asm/uaccess.h>
45 #include <linux/efi.h>
47 #define _COMPONENT ACPI_OS_SERVICES
48 ACPI_MODULE_NAME("osl")
49 #define PREFIX "ACPI: "
51 acpi_osd_exec_callback function;
55 #ifdef CONFIG_ACPI_CUSTOM_DSDT
56 #include CONFIG_ACPI_CUSTOM_DSDT_FILE
59 #ifdef ENABLE_DEBUGGER
60 #include <linux/kdb.h>
62 /* stuff for debugger support */
64 EXPORT_SYMBOL(acpi_in_debugger);
66 extern char line_buf[80];
67 #endif /*ENABLE_DEBUGGER */
69 int acpi_specific_hotkey_enabled = TRUE;
70 EXPORT_SYMBOL(acpi_specific_hotkey_enabled);
72 static unsigned int acpi_irq_irq;
73 static acpi_osd_handler acpi_irq_handler;
74 static void *acpi_irq_context;
75 static struct workqueue_struct *kacpid_wq;
76 static struct workqueue_struct *kacpi_notify_wq;
78 acpi_status acpi_os_initialize(void)
83 acpi_status acpi_os_initialize1(void)
86 * Initialize PCI configuration space access, as we'll need to access
87 * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
90 printk(KERN_ERR PREFIX
91 "Access to PCI configuration space unavailable\n");
94 kacpid_wq = create_singlethread_workqueue("kacpid");
95 kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify");
97 BUG_ON(!kacpi_notify_wq);
101 acpi_status acpi_os_terminate(void)
103 if (acpi_irq_handler) {
104 acpi_os_remove_interrupt_handler(acpi_irq_irq,
108 destroy_workqueue(kacpid_wq);
109 destroy_workqueue(kacpi_notify_wq);
114 void acpi_os_printf(const char *fmt, ...)
118 acpi_os_vprintf(fmt, args);
122 EXPORT_SYMBOL(acpi_os_printf);
124 void acpi_os_vprintf(const char *fmt, va_list args)
126 static char buffer[512];
128 vsprintf(buffer, fmt, args);
130 #ifdef ENABLE_DEBUGGER
131 if (acpi_in_debugger) {
132 kdb_printf("%s", buffer);
134 printk("%s", buffer);
137 printk("%s", buffer);
141 acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
144 addr->pointer_type = ACPI_PHYSICAL_POINTER;
145 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
146 addr->pointer.physical = efi.acpi20;
147 else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
148 addr->pointer.physical = efi.acpi;
150 printk(KERN_ERR PREFIX
151 "System description tables not found\n");
155 if (ACPI_FAILURE(acpi_find_root_pointer(flags, addr))) {
156 printk(KERN_ERR PREFIX
157 "System description tables not found\n");
166 acpi_os_map_memory(acpi_physical_address phys, acpi_size size,
167 void __iomem ** virt)
169 if (phys > ULONG_MAX) {
170 printk(KERN_ERR PREFIX "Cannot map memory that high\n");
171 return AE_BAD_PARAMETER;
174 * ioremap checks to ensure this is in reserved space
176 *virt = ioremap((unsigned long)phys, size);
183 EXPORT_SYMBOL_GPL(acpi_os_map_memory);
185 void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
189 EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
191 #ifdef ACPI_FUTURE_USAGE
193 acpi_os_get_physical_address(void *virt, acpi_physical_address * phys)
196 return AE_BAD_PARAMETER;
198 *phys = virt_to_phys(virt);
204 #define ACPI_MAX_OVERRIDE_LEN 100
206 static char acpi_os_name[ACPI_MAX_OVERRIDE_LEN];
209 acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
210 acpi_string * new_val)
212 if (!init_val || !new_val)
213 return AE_BAD_PARAMETER;
216 if (!memcmp(init_val->name, "_OS_", 4) && strlen(acpi_os_name)) {
217 printk(KERN_INFO PREFIX "Overriding _OS definition to '%s'\n",
219 *new_val = acpi_os_name;
226 acpi_os_table_override(struct acpi_table_header * existing_table,
227 struct acpi_table_header ** new_table)
229 if (!existing_table || !new_table)
230 return AE_BAD_PARAMETER;
232 #ifdef CONFIG_ACPI_CUSTOM_DSDT
233 if (strncmp(existing_table->signature, "DSDT", 4) == 0)
234 *new_table = (struct acpi_table_header *)AmlCode;
243 static irqreturn_t acpi_irq(int irq, void *dev_id)
245 return (*acpi_irq_handler) (acpi_irq_context) ? IRQ_HANDLED : IRQ_NONE;
249 acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
255 * Ignore the GSI from the core, and use the value in our copy of the
256 * FADT. It may not be the same if an interrupt source override exists
259 gsi = acpi_fadt.sci_int;
260 if (acpi_gsi_to_irq(gsi, &irq) < 0) {
261 printk(KERN_ERR PREFIX "SCI (ACPI GSI %d) not registered\n",
266 acpi_irq_handler = handler;
267 acpi_irq_context = context;
268 if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) {
269 printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
270 return AE_NOT_ACQUIRED;
277 acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
280 free_irq(irq, acpi_irq);
281 acpi_irq_handler = NULL;
289 * Running in interpreter thread context, safe to sleep
292 void acpi_os_sleep(acpi_integer ms)
294 schedule_timeout_interruptible(msecs_to_jiffies(ms));
297 EXPORT_SYMBOL(acpi_os_sleep);
299 void acpi_os_stall(u32 us)
307 touch_nmi_watchdog();
312 EXPORT_SYMBOL(acpi_os_stall);
315 * Support ACPI 3.0 AML Timer operand
316 * Returns 64-bit free-running, monotonically increasing timer
317 * with 100ns granularity
319 u64 acpi_os_get_timer(void)
324 /* TBD: use HPET if available */
327 #ifdef CONFIG_X86_PM_TIMER
328 /* TBD: default to PM timer if HPET was not available */
331 printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n");
336 acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width)
345 *(u8 *) value = inb(port);
348 *(u16 *) value = inw(port);
351 *(u32 *) value = inl(port);
360 EXPORT_SYMBOL(acpi_os_read_port);
362 acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width)
381 EXPORT_SYMBOL(acpi_os_write_port);
384 acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
387 void __iomem *virt_addr;
389 virt_addr = ioremap(phys_addr, width);
395 *(u8 *) value = readb(virt_addr);
398 *(u16 *) value = readw(virt_addr);
401 *(u32 *) value = readl(virt_addr);
413 acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
415 void __iomem *virt_addr;
417 virt_addr = ioremap(phys_addr, width);
421 writeb(value, virt_addr);
424 writew(value, virt_addr);
427 writel(value, virt_addr);
439 acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
440 void *value, u32 width)
445 return AE_BAD_PARAMETER;
461 BUG_ON(!raw_pci_ops);
463 result = raw_pci_ops->read(pci_id->segment, pci_id->bus,
464 PCI_DEVFN(pci_id->device, pci_id->function),
467 return (result ? AE_ERROR : AE_OK);
470 EXPORT_SYMBOL(acpi_os_read_pci_configuration);
473 acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
474 acpi_integer value, u32 width)
492 BUG_ON(!raw_pci_ops);
494 result = raw_pci_ops->write(pci_id->segment, pci_id->bus,
495 PCI_DEVFN(pci_id->device, pci_id->function),
498 return (result ? AE_ERROR : AE_OK);
501 /* TODO: Change code to take advantage of driver model more */
502 static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
503 acpi_handle chandle, /* current node */
504 struct acpi_pci_id **id,
505 int *is_bridge, u8 * bus_number)
508 struct acpi_pci_id *pci_id = *id;
511 acpi_object_type type;
514 acpi_get_parent(chandle, &handle);
515 if (handle != rhandle) {
516 acpi_os_derive_pci_id_2(rhandle, handle, &pci_id, is_bridge,
519 status = acpi_get_type(handle, &type);
520 if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
524 acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
526 if (ACPI_SUCCESS(status)) {
527 pci_id->device = ACPI_HIWORD(ACPI_LODWORD(temp));
528 pci_id->function = ACPI_LOWORD(ACPI_LODWORD(temp));
531 pci_id->bus = *bus_number;
533 /* any nicer way to get bus number of bridge ? */
535 acpi_os_read_pci_configuration(pci_id, 0x0e, &tu8,
537 if (ACPI_SUCCESS(status)
538 && ((tu8 & 0x7f) == 1 || (tu8 & 0x7f) == 2)) {
540 acpi_os_read_pci_configuration(pci_id, 0x18,
542 if (!ACPI_SUCCESS(status)) {
543 /* Certainly broken... FIX ME */
549 acpi_os_read_pci_configuration(pci_id, 0x19,
551 if (ACPI_SUCCESS(status)) {
560 void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
561 acpi_handle chandle, /* current node */
562 struct acpi_pci_id **id)
565 u8 bus_number = (*id)->bus;
567 acpi_os_derive_pci_id_2(rhandle, chandle, id, &is_bridge, &bus_number);
570 static void acpi_os_execute_deferred(void *context)
572 struct acpi_os_dpc *dpc = (struct acpi_os_dpc *)context;
574 printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
578 dpc->function(dpc->context);
585 /*******************************************************************************
587 * FUNCTION: acpi_os_execute
589 * PARAMETERS: Type - Type of the callback
590 * Function - Function to be executed
591 * Context - Function parameters
595 * DESCRIPTION: Depending on type, either queues function for deferred execution or
596 * immediately executes function on a separate thread.
598 ******************************************************************************/
600 acpi_status acpi_os_execute(acpi_execute_type type,
601 acpi_osd_exec_callback function, void *context)
603 acpi_status status = AE_OK;
604 struct acpi_os_dpc *dpc;
605 struct work_struct *task;
607 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
608 "Scheduling function [%p(%p)] for deferred execution.\n",
612 return AE_BAD_PARAMETER;
615 * Allocate/initialize DPC structure. Note that this memory will be
616 * freed by the callee. The kernel handles the tq_struct list in a
617 * way that allows us to also free its memory inside the callee.
618 * Because we may want to schedule several tasks with different
619 * parameters we can't use the approach some kernel code uses of
620 * having a static tq_struct.
621 * We can save time and code by allocating the DPC and tq_structs
622 * from the same memory.
625 dpc = kmalloc(sizeof(struct acpi_os_dpc) +
626 sizeof(struct work_struct), GFP_ATOMIC);
629 dpc->function = function;
630 dpc->context = context;
631 task = (void *)(dpc + 1);
632 INIT_WORK(task, acpi_os_execute_deferred, (void *)dpc);
633 if (!queue_work((type == OSL_NOTIFY_HANDLER)?
634 kacpi_notify_wq : kacpid_wq, task)) {
641 EXPORT_SYMBOL(acpi_os_execute);
643 void acpi_os_wait_events_complete(void *context)
645 flush_workqueue(kacpid_wq);
648 EXPORT_SYMBOL(acpi_os_wait_events_complete);
651 * Allocate the memory for a spinlock and initialize it.
653 acpi_status acpi_os_create_lock(acpi_spinlock * handle)
655 spin_lock_init(*handle);
661 * Deallocate the memory for a spinlock.
663 void acpi_os_delete_lock(acpi_spinlock handle)
669 acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
671 struct semaphore *sem = NULL;
674 sem = acpi_os_allocate(sizeof(struct semaphore));
677 memset(sem, 0, sizeof(struct semaphore));
679 sema_init(sem, initial_units);
681 *handle = (acpi_handle *) sem;
683 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n",
684 *handle, initial_units));
689 EXPORT_SYMBOL(acpi_os_create_semaphore);
692 * TODO: A better way to delete semaphores? Linux doesn't have a
693 * 'delete_semaphore()' function -- may result in an invalid
694 * pointer dereference for non-synchronized consumers. Should
695 * we at least check for blocked threads and signal/cancel them?
698 acpi_status acpi_os_delete_semaphore(acpi_handle handle)
700 struct semaphore *sem = (struct semaphore *)handle;
704 return AE_BAD_PARAMETER;
706 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
714 EXPORT_SYMBOL(acpi_os_delete_semaphore);
717 * TODO: The kernel doesn't have a 'down_timeout' function -- had to
718 * improvise. The process is to sleep for one scheduler quantum
719 * until the semaphore becomes available. Downside is that this
720 * may result in starvation for timeout-based waits when there's
721 * lots of semaphore activity.
723 * TODO: Support for units > 1?
725 acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
727 acpi_status status = AE_OK;
728 struct semaphore *sem = (struct semaphore *)handle;
732 if (!sem || (units < 1))
733 return AE_BAD_PARAMETER;
738 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n",
739 handle, units, timeout));
742 * This can be called during resume with interrupts off.
743 * Like boot-time, we should be single threaded and will
744 * always get the lock if we try -- timeout or not.
745 * If this doesn't succeed, then we will oops courtesy of
746 * might_sleep() in down().
748 if (!down_trylock(sem))
755 * A zero timeout value indicates that we shouldn't wait - just
756 * acquire the semaphore if available otherwise return AE_TIME
757 * (a.k.a. 'would block').
760 if (down_trylock(sem))
768 case ACPI_WAIT_FOREVER:
777 // TODO: A better timeout algorithm?
780 static const int quantum_ms = 1000 / HZ;
782 ret = down_trylock(sem);
783 for (i = timeout; (i > 0 && ret != 0); i -= quantum_ms) {
784 schedule_timeout_interruptible(1);
785 ret = down_trylock(sem);
794 if (ACPI_FAILURE(status)) {
795 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
796 "Failed to acquire semaphore[%p|%d|%d], %s",
797 handle, units, timeout,
798 acpi_format_exception(status)));
800 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
801 "Acquired semaphore[%p|%d|%d]", handle,
808 EXPORT_SYMBOL(acpi_os_wait_semaphore);
811 * TODO: Support for units > 1?
813 acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
815 struct semaphore *sem = (struct semaphore *)handle;
818 if (!sem || (units < 1))
819 return AE_BAD_PARAMETER;
824 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle,
832 EXPORT_SYMBOL(acpi_os_signal_semaphore);
834 #ifdef ACPI_FUTURE_USAGE
835 u32 acpi_os_get_line(char *buffer)
838 #ifdef ENABLE_DEBUGGER
839 if (acpi_in_debugger) {
842 kdb_read(buffer, sizeof(line_buf));
844 /* remove the CR kdb includes */
845 chars = strlen(buffer) - 1;
846 buffer[chars] = '\0';
852 #endif /* ACPI_FUTURE_USAGE */
854 /* Assumes no unreadable holes inbetween */
855 u8 acpi_os_readable(void *ptr, acpi_size len)
857 #if defined(__i386__) || defined(__x86_64__)
859 return !__get_user(tmp, (char __user *)ptr)
860 && !__get_user(tmp, (char __user *)ptr + len - 1);
865 #ifdef ACPI_FUTURE_USAGE
866 u8 acpi_os_writable(void *ptr, acpi_size len)
868 /* could do dummy write (racy) or a kernel page table lookup.
869 The later may be difficult at early boot when kmap doesn't work yet. */
874 acpi_status acpi_os_signal(u32 function, void *info)
877 case ACPI_SIGNAL_FATAL:
878 printk(KERN_ERR PREFIX "Fatal opcode executed\n");
880 case ACPI_SIGNAL_BREAKPOINT:
883 * ACPI spec. says to treat it as a NOP unless
884 * you are debugging. So if/when we integrate
885 * AML debugger into the kernel debugger its
886 * hook will go here. But until then it is
887 * not useful to print anything on breakpoints.
897 EXPORT_SYMBOL(acpi_os_signal);
899 static int __init acpi_os_name_setup(char *str)
901 char *p = acpi_os_name;
902 int count = ACPI_MAX_OVERRIDE_LEN - 1;
907 for (; count-- && str && *str; str++) {
908 if (isalnum(*str) || *str == ' ' || *str == ':')
910 else if (*str == '\'' || *str == '"')
921 __setup("acpi_os_name=", acpi_os_name_setup);
925 * empty string disables _OSI
926 * TBD additional string adds to _OSI
928 static int __init acpi_osi_setup(char *str)
930 if (str == NULL || *str == '\0') {
931 printk(KERN_INFO PREFIX "_OSI method disabled\n");
932 acpi_gbl_create_osi_method = FALSE;
935 printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n",
942 __setup("acpi_osi=", acpi_osi_setup);
944 /* enable serialization to combat AE_ALREADY_EXISTS errors */
945 static int __init acpi_serialize_setup(char *str)
947 printk(KERN_INFO PREFIX "serialize enabled\n");
949 acpi_gbl_all_methods_serialized = TRUE;
954 __setup("acpi_serialize", acpi_serialize_setup);
957 * Wake and Run-Time GPES are expected to be separate.
958 * We disable wake-GPEs at run-time to prevent spurious
961 * However, if a system exists that shares Wake and
962 * Run-time events on the same GPE this flag is available
963 * to tell Linux to keep the wake-time GPEs enabled at run-time.
965 static int __init acpi_wake_gpes_always_on_setup(char *str)
967 printk(KERN_INFO PREFIX "wake GPEs not disabled\n");
969 acpi_gbl_leave_wake_gpes_disabled = FALSE;
974 __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
976 static int __init acpi_hotkey_setup(char *str)
978 acpi_specific_hotkey_enabled = FALSE;
982 __setup("acpi_generic_hotkey", acpi_hotkey_setup);
985 * max_cstate is defined in the base kernel so modules can
986 * change it w/o depending on the state of the processor module.
988 unsigned int max_cstate = ACPI_PROCESSOR_MAX_POWER;
990 EXPORT_SYMBOL(max_cstate);
993 * Acquire a spinlock.
995 * handle is a pointer to the spinlock_t.
998 acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
1000 acpi_cpu_flags flags;
1001 spin_lock_irqsave(lockp, flags);
1006 * Release a spinlock. See above.
1009 void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
1011 spin_unlock_irqrestore(lockp, flags);
1014 #ifndef ACPI_USE_LOCAL_CACHE
1016 /*******************************************************************************
1018 * FUNCTION: acpi_os_create_cache
1020 * PARAMETERS: name - Ascii name for the cache
1021 * size - Size of each cached object
1022 * depth - Maximum depth of the cache (in objects) <ignored>
1023 * cache - Where the new cache object is returned
1027 * DESCRIPTION: Create a cache object
1029 ******************************************************************************/
1032 acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
1034 *cache = kmem_cache_create(name, size, 0, 0, NULL, NULL);
1041 /*******************************************************************************
1043 * FUNCTION: acpi_os_purge_cache
1045 * PARAMETERS: Cache - Handle to cache object
1049 * DESCRIPTION: Free all objects within the requested cache.
1051 ******************************************************************************/
1053 acpi_status acpi_os_purge_cache(acpi_cache_t * cache)
1055 (void)kmem_cache_shrink(cache);
1059 /*******************************************************************************
1061 * FUNCTION: acpi_os_delete_cache
1063 * PARAMETERS: Cache - Handle to cache object
1067 * DESCRIPTION: Free all objects within the requested cache and delete the
1070 ******************************************************************************/
1072 acpi_status acpi_os_delete_cache(acpi_cache_t * cache)
1074 kmem_cache_destroy(cache);
1078 /*******************************************************************************
1080 * FUNCTION: acpi_os_release_object
1082 * PARAMETERS: Cache - Handle to cache object
1083 * Object - The object to be released
1087 * DESCRIPTION: Release an object to the specified cache. If cache is full,
1088 * the object is deleted.
1090 ******************************************************************************/
1092 acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
1094 kmem_cache_free(cache, object);
1098 /******************************************************************************
1100 * FUNCTION: acpi_os_validate_interface
1102 * PARAMETERS: interface - Requested interface to be validated
1104 * RETURN: AE_OK if interface is supported, AE_SUPPORT otherwise
1106 * DESCRIPTION: Match an interface string to the interfaces supported by the
1107 * host. Strings originate from an AML call to the _OSI method.
1109 *****************************************************************************/
1112 acpi_os_validate_interface (char *interface)
1119 /******************************************************************************
1121 * FUNCTION: acpi_os_validate_address
1123 * PARAMETERS: space_id - ACPI space ID
1124 * address - Physical address
1125 * length - Address length
1127 * RETURN: AE_OK if address/length is valid for the space_id. Otherwise,
1128 * should return AE_AML_ILLEGAL_ADDRESS.
1130 * DESCRIPTION: Validate a system address via the host OS. Used to validate
1131 * the addresses accessed by AML operation regions.
1133 *****************************************************************************/
1136 acpi_os_validate_address (
1138 acpi_physical_address address,