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 <linux/acpi.h>
40 #include <acpi/acpi.h>
42 #include <acpi/acpi_bus.h>
43 #include <acpi/processor.h>
44 #include <asm/uaccess.h>
46 #include <linux/efi.h>
48 #define _COMPONENT ACPI_OS_SERVICES
49 ACPI_MODULE_NAME("osl")
50 #define PREFIX "ACPI: "
52 acpi_osd_exec_callback function;
54 struct work_struct work;
57 #ifdef CONFIG_ACPI_CUSTOM_DSDT
58 #include CONFIG_ACPI_CUSTOM_DSDT_FILE
61 #ifdef ENABLE_DEBUGGER
62 #include <linux/kdb.h>
64 /* stuff for debugger support */
66 EXPORT_SYMBOL(acpi_in_debugger);
68 extern char line_buf[80];
69 #endif /*ENABLE_DEBUGGER */
71 int acpi_specific_hotkey_enabled = TRUE;
72 EXPORT_SYMBOL(acpi_specific_hotkey_enabled);
74 static unsigned int acpi_irq_irq;
75 static acpi_osd_handler acpi_irq_handler;
76 static void *acpi_irq_context;
77 static struct workqueue_struct *kacpid_wq;
79 acpi_status acpi_os_initialize(void)
84 acpi_status acpi_os_initialize1(void)
87 * Initialize PCI configuration space access, as we'll need to access
88 * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
91 printk(KERN_ERR PREFIX
92 "Access to PCI configuration space unavailable\n");
95 kacpid_wq = create_singlethread_workqueue("kacpid");
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);
113 void acpi_os_printf(const char *fmt, ...)
117 acpi_os_vprintf(fmt, args);
121 EXPORT_SYMBOL(acpi_os_printf);
123 void acpi_os_vprintf(const char *fmt, va_list args)
125 static char buffer[512];
127 vsprintf(buffer, fmt, args);
129 #ifdef ENABLE_DEBUGGER
130 if (acpi_in_debugger) {
131 kdb_printf("%s", buffer);
133 printk("%s", buffer);
136 printk("%s", buffer);
140 acpi_physical_address __init acpi_os_get_root_pointer(void)
143 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
145 else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
148 printk(KERN_ERR PREFIX
149 "System description tables not found\n");
153 return acpi_find_rsdp();
156 void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
158 if (phys > ULONG_MAX) {
159 printk(KERN_ERR PREFIX "Cannot map memory that high\n");
162 if (acpi_gbl_permanent_mmap)
164 * ioremap checks to ensure this is in reserved space
166 return ioremap((unsigned long)phys, size);
168 return __acpi_map_table((unsigned long)phys, size);
170 EXPORT_SYMBOL_GPL(acpi_os_map_memory);
172 void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
174 if (acpi_gbl_permanent_mmap) {
178 EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
180 #ifdef ACPI_FUTURE_USAGE
182 acpi_os_get_physical_address(void *virt, acpi_physical_address * phys)
185 return AE_BAD_PARAMETER;
187 *phys = virt_to_phys(virt);
193 #define ACPI_MAX_OVERRIDE_LEN 100
195 static char acpi_os_name[ACPI_MAX_OVERRIDE_LEN];
198 acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
199 acpi_string * new_val)
201 if (!init_val || !new_val)
202 return AE_BAD_PARAMETER;
205 if (!memcmp(init_val->name, "_OS_", 4) && strlen(acpi_os_name)) {
206 printk(KERN_INFO PREFIX "Overriding _OS definition to '%s'\n",
208 *new_val = acpi_os_name;
215 acpi_os_table_override(struct acpi_table_header * existing_table,
216 struct acpi_table_header ** new_table)
218 if (!existing_table || !new_table)
219 return AE_BAD_PARAMETER;
221 #ifdef CONFIG_ACPI_CUSTOM_DSDT
222 if (strncmp(existing_table->signature, "DSDT", 4) == 0)
223 *new_table = (struct acpi_table_header *)AmlCode;
232 static irqreturn_t acpi_irq(int irq, void *dev_id)
234 return (*acpi_irq_handler) (acpi_irq_context) ? IRQ_HANDLED : IRQ_NONE;
238 acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
244 * Ignore the GSI from the core, and use the value in our copy of the
245 * FADT. It may not be the same if an interrupt source override exists
248 gsi = acpi_gbl_FADT.sci_interrupt;
249 if (acpi_gsi_to_irq(gsi, &irq) < 0) {
250 printk(KERN_ERR PREFIX "SCI (ACPI GSI %d) not registered\n",
255 acpi_irq_handler = handler;
256 acpi_irq_context = context;
257 if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) {
258 printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
259 return AE_NOT_ACQUIRED;
266 acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
269 free_irq(irq, acpi_irq);
270 acpi_irq_handler = NULL;
278 * Running in interpreter thread context, safe to sleep
281 void acpi_os_sleep(acpi_integer ms)
283 schedule_timeout_interruptible(msecs_to_jiffies(ms));
286 EXPORT_SYMBOL(acpi_os_sleep);
288 void acpi_os_stall(u32 us)
296 touch_nmi_watchdog();
301 EXPORT_SYMBOL(acpi_os_stall);
304 * Support ACPI 3.0 AML Timer operand
305 * Returns 64-bit free-running, monotonically increasing timer
306 * with 100ns granularity
308 u64 acpi_os_get_timer(void)
313 /* TBD: use HPET if available */
316 #ifdef CONFIG_X86_PM_TIMER
317 /* TBD: default to PM timer if HPET was not available */
320 printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n");
325 acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width)
334 *(u8 *) value = inb(port);
337 *(u16 *) value = inw(port);
340 *(u32 *) value = inl(port);
349 EXPORT_SYMBOL(acpi_os_read_port);
351 acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width)
370 EXPORT_SYMBOL(acpi_os_write_port);
373 acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
376 void __iomem *virt_addr;
378 virt_addr = ioremap(phys_addr, width);
384 *(u8 *) value = readb(virt_addr);
387 *(u16 *) value = readw(virt_addr);
390 *(u32 *) value = readl(virt_addr);
402 acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
404 void __iomem *virt_addr;
406 virt_addr = ioremap(phys_addr, width);
410 writeb(value, virt_addr);
413 writew(value, virt_addr);
416 writel(value, virt_addr);
428 acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
429 void *value, u32 width)
434 return AE_BAD_PARAMETER;
450 BUG_ON(!raw_pci_ops);
452 result = raw_pci_ops->read(pci_id->segment, pci_id->bus,
453 PCI_DEVFN(pci_id->device, pci_id->function),
456 return (result ? AE_ERROR : AE_OK);
459 EXPORT_SYMBOL(acpi_os_read_pci_configuration);
462 acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
463 acpi_integer value, u32 width)
481 BUG_ON(!raw_pci_ops);
483 result = raw_pci_ops->write(pci_id->segment, pci_id->bus,
484 PCI_DEVFN(pci_id->device, pci_id->function),
487 return (result ? AE_ERROR : AE_OK);
490 /* TODO: Change code to take advantage of driver model more */
491 static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
492 acpi_handle chandle, /* current node */
493 struct acpi_pci_id **id,
494 int *is_bridge, u8 * bus_number)
497 struct acpi_pci_id *pci_id = *id;
500 acpi_object_type type;
503 acpi_get_parent(chandle, &handle);
504 if (handle != rhandle) {
505 acpi_os_derive_pci_id_2(rhandle, handle, &pci_id, is_bridge,
508 status = acpi_get_type(handle, &type);
509 if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
513 acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
515 if (ACPI_SUCCESS(status)) {
516 pci_id->device = ACPI_HIWORD(ACPI_LODWORD(temp));
517 pci_id->function = ACPI_LOWORD(ACPI_LODWORD(temp));
520 pci_id->bus = *bus_number;
522 /* any nicer way to get bus number of bridge ? */
524 acpi_os_read_pci_configuration(pci_id, 0x0e, &tu8,
526 if (ACPI_SUCCESS(status)
527 && ((tu8 & 0x7f) == 1 || (tu8 & 0x7f) == 2)) {
529 acpi_os_read_pci_configuration(pci_id, 0x18,
531 if (!ACPI_SUCCESS(status)) {
532 /* Certainly broken... FIX ME */
538 acpi_os_read_pci_configuration(pci_id, 0x19,
540 if (ACPI_SUCCESS(status)) {
549 void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
550 acpi_handle chandle, /* current node */
551 struct acpi_pci_id **id)
554 u8 bus_number = (*id)->bus;
556 acpi_os_derive_pci_id_2(rhandle, chandle, id, &is_bridge, &bus_number);
559 static void acpi_os_execute_deferred(struct work_struct *work)
561 struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);
564 printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
568 dpc->function(dpc->context);
575 /*******************************************************************************
577 * FUNCTION: acpi_os_execute
579 * PARAMETERS: Type - Type of the callback
580 * Function - Function to be executed
581 * Context - Function parameters
585 * DESCRIPTION: Depending on type, either queues function for deferred execution or
586 * immediately executes function on a separate thread.
588 ******************************************************************************/
590 acpi_status acpi_os_execute(acpi_execute_type type,
591 acpi_osd_exec_callback function, void *context)
593 acpi_status status = AE_OK;
594 struct acpi_os_dpc *dpc;
596 ACPI_FUNCTION_TRACE("os_queue_for_execution");
598 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
599 "Scheduling function [%p(%p)] for deferred execution.\n",
603 return_ACPI_STATUS(AE_BAD_PARAMETER);
606 * Allocate/initialize DPC structure. Note that this memory will be
607 * freed by the callee. The kernel handles the work_struct list in a
608 * way that allows us to also free its memory inside the callee.
609 * Because we may want to schedule several tasks with different
610 * parameters we can't use the approach some kernel code uses of
611 * having a static work_struct.
614 dpc = kmalloc(sizeof(struct acpi_os_dpc), GFP_ATOMIC);
616 return_ACPI_STATUS(AE_NO_MEMORY);
618 dpc->function = function;
619 dpc->context = context;
621 INIT_WORK(&dpc->work, acpi_os_execute_deferred);
622 if (!queue_work(kacpid_wq, &dpc->work)) {
623 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
624 "Call to queue_work() failed.\n"));
629 return_ACPI_STATUS(status);
632 EXPORT_SYMBOL(acpi_os_execute);
634 void acpi_os_wait_events_complete(void *context)
636 flush_workqueue(kacpid_wq);
639 EXPORT_SYMBOL(acpi_os_wait_events_complete);
642 * Allocate the memory for a spinlock and initialize it.
644 acpi_status acpi_os_create_lock(acpi_spinlock * handle)
646 spin_lock_init(*handle);
652 * Deallocate the memory for a spinlock.
654 void acpi_os_delete_lock(acpi_spinlock handle)
660 acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
662 struct semaphore *sem = NULL;
665 sem = acpi_os_allocate(sizeof(struct semaphore));
668 memset(sem, 0, sizeof(struct semaphore));
670 sema_init(sem, initial_units);
672 *handle = (acpi_handle *) sem;
674 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n",
675 *handle, initial_units));
680 EXPORT_SYMBOL(acpi_os_create_semaphore);
683 * TODO: A better way to delete semaphores? Linux doesn't have a
684 * 'delete_semaphore()' function -- may result in an invalid
685 * pointer dereference for non-synchronized consumers. Should
686 * we at least check for blocked threads and signal/cancel them?
689 acpi_status acpi_os_delete_semaphore(acpi_handle handle)
691 struct semaphore *sem = (struct semaphore *)handle;
695 return AE_BAD_PARAMETER;
697 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
705 EXPORT_SYMBOL(acpi_os_delete_semaphore);
708 * TODO: The kernel doesn't have a 'down_timeout' function -- had to
709 * improvise. The process is to sleep for one scheduler quantum
710 * until the semaphore becomes available. Downside is that this
711 * may result in starvation for timeout-based waits when there's
712 * lots of semaphore activity.
714 * TODO: Support for units > 1?
716 acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
718 acpi_status status = AE_OK;
719 struct semaphore *sem = (struct semaphore *)handle;
723 if (!sem || (units < 1))
724 return AE_BAD_PARAMETER;
729 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n",
730 handle, units, timeout));
733 * This can be called during resume with interrupts off.
734 * Like boot-time, we should be single threaded and will
735 * always get the lock if we try -- timeout or not.
736 * If this doesn't succeed, then we will oops courtesy of
737 * might_sleep() in down().
739 if (!down_trylock(sem))
746 * A zero timeout value indicates that we shouldn't wait - just
747 * acquire the semaphore if available otherwise return AE_TIME
748 * (a.k.a. 'would block').
751 if (down_trylock(sem))
759 case ACPI_WAIT_FOREVER:
768 // TODO: A better timeout algorithm?
771 static const int quantum_ms = 1000 / HZ;
773 ret = down_trylock(sem);
774 for (i = timeout; (i > 0 && ret != 0); i -= quantum_ms) {
775 schedule_timeout_interruptible(1);
776 ret = down_trylock(sem);
785 if (ACPI_FAILURE(status)) {
786 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
787 "Failed to acquire semaphore[%p|%d|%d], %s",
788 handle, units, timeout,
789 acpi_format_exception(status)));
791 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
792 "Acquired semaphore[%p|%d|%d]", handle,
799 EXPORT_SYMBOL(acpi_os_wait_semaphore);
802 * TODO: Support for units > 1?
804 acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
806 struct semaphore *sem = (struct semaphore *)handle;
809 if (!sem || (units < 1))
810 return AE_BAD_PARAMETER;
815 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle,
823 EXPORT_SYMBOL(acpi_os_signal_semaphore);
825 #ifdef ACPI_FUTURE_USAGE
826 u32 acpi_os_get_line(char *buffer)
829 #ifdef ENABLE_DEBUGGER
830 if (acpi_in_debugger) {
833 kdb_read(buffer, sizeof(line_buf));
835 /* remove the CR kdb includes */
836 chars = strlen(buffer) - 1;
837 buffer[chars] = '\0';
843 #endif /* ACPI_FUTURE_USAGE */
845 /* Assumes no unreadable holes inbetween */
846 u8 acpi_os_readable(void *ptr, acpi_size len)
848 #if defined(__i386__) || defined(__x86_64__)
850 return !__get_user(tmp, (char __user *)ptr)
851 && !__get_user(tmp, (char __user *)ptr + len - 1);
856 #ifdef ACPI_FUTURE_USAGE
857 u8 acpi_os_writable(void *ptr, acpi_size len)
859 /* could do dummy write (racy) or a kernel page table lookup.
860 The later may be difficult at early boot when kmap doesn't work yet. */
865 acpi_status acpi_os_signal(u32 function, void *info)
868 case ACPI_SIGNAL_FATAL:
869 printk(KERN_ERR PREFIX "Fatal opcode executed\n");
871 case ACPI_SIGNAL_BREAKPOINT:
874 * ACPI spec. says to treat it as a NOP unless
875 * you are debugging. So if/when we integrate
876 * AML debugger into the kernel debugger its
877 * hook will go here. But until then it is
878 * not useful to print anything on breakpoints.
888 EXPORT_SYMBOL(acpi_os_signal);
890 static int __init acpi_os_name_setup(char *str)
892 char *p = acpi_os_name;
893 int count = ACPI_MAX_OVERRIDE_LEN - 1;
898 for (; count-- && str && *str; str++) {
899 if (isalnum(*str) || *str == ' ' || *str == ':')
901 else if (*str == '\'' || *str == '"')
912 __setup("acpi_os_name=", acpi_os_name_setup);
916 * empty string disables _OSI
917 * TBD additional string adds to _OSI
919 static int __init acpi_osi_setup(char *str)
921 if (str == NULL || *str == '\0') {
922 printk(KERN_INFO PREFIX "_OSI method disabled\n");
923 acpi_gbl_create_osi_method = FALSE;
926 printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n",
933 __setup("acpi_osi=", acpi_osi_setup);
935 /* enable serialization to combat AE_ALREADY_EXISTS errors */
936 static int __init acpi_serialize_setup(char *str)
938 printk(KERN_INFO PREFIX "serialize enabled\n");
940 acpi_gbl_all_methods_serialized = TRUE;
945 __setup("acpi_serialize", acpi_serialize_setup);
948 * Wake and Run-Time GPES are expected to be separate.
949 * We disable wake-GPEs at run-time to prevent spurious
952 * However, if a system exists that shares Wake and
953 * Run-time events on the same GPE this flag is available
954 * to tell Linux to keep the wake-time GPEs enabled at run-time.
956 static int __init acpi_wake_gpes_always_on_setup(char *str)
958 printk(KERN_INFO PREFIX "wake GPEs not disabled\n");
960 acpi_gbl_leave_wake_gpes_disabled = FALSE;
965 __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
967 static int __init acpi_hotkey_setup(char *str)
969 acpi_specific_hotkey_enabled = FALSE;
973 __setup("acpi_generic_hotkey", acpi_hotkey_setup);
976 * max_cstate is defined in the base kernel so modules can
977 * change it w/o depending on the state of the processor module.
979 unsigned int max_cstate = ACPI_PROCESSOR_MAX_POWER;
981 EXPORT_SYMBOL(max_cstate);
984 * Acquire a spinlock.
986 * handle is a pointer to the spinlock_t.
989 acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
991 acpi_cpu_flags flags;
992 spin_lock_irqsave(lockp, flags);
997 * Release a spinlock. See above.
1000 void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
1002 spin_unlock_irqrestore(lockp, flags);
1005 #ifndef ACPI_USE_LOCAL_CACHE
1007 /*******************************************************************************
1009 * FUNCTION: acpi_os_create_cache
1011 * PARAMETERS: name - Ascii name for the cache
1012 * size - Size of each cached object
1013 * depth - Maximum depth of the cache (in objects) <ignored>
1014 * cache - Where the new cache object is returned
1018 * DESCRIPTION: Create a cache object
1020 ******************************************************************************/
1023 acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
1025 *cache = kmem_cache_create(name, size, 0, 0, NULL, NULL);
1032 /*******************************************************************************
1034 * FUNCTION: acpi_os_purge_cache
1036 * PARAMETERS: Cache - Handle to cache object
1040 * DESCRIPTION: Free all objects within the requested cache.
1042 ******************************************************************************/
1044 acpi_status acpi_os_purge_cache(acpi_cache_t * cache)
1046 kmem_cache_shrink(cache);
1050 /*******************************************************************************
1052 * FUNCTION: acpi_os_delete_cache
1054 * PARAMETERS: Cache - Handle to cache object
1058 * DESCRIPTION: Free all objects within the requested cache and delete the
1061 ******************************************************************************/
1063 acpi_status acpi_os_delete_cache(acpi_cache_t * cache)
1065 kmem_cache_destroy(cache);
1069 /*******************************************************************************
1071 * FUNCTION: acpi_os_release_object
1073 * PARAMETERS: Cache - Handle to cache object
1074 * Object - The object to be released
1078 * DESCRIPTION: Release an object to the specified cache. If cache is full,
1079 * the object is deleted.
1081 ******************************************************************************/
1083 acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
1085 kmem_cache_free(cache, object);
1089 /******************************************************************************
1091 * FUNCTION: acpi_os_validate_interface
1093 * PARAMETERS: interface - Requested interface to be validated
1095 * RETURN: AE_OK if interface is supported, AE_SUPPORT otherwise
1097 * DESCRIPTION: Match an interface string to the interfaces supported by the
1098 * host. Strings originate from an AML call to the _OSI method.
1100 *****************************************************************************/
1103 acpi_os_validate_interface (char *interface)
1110 /******************************************************************************
1112 * FUNCTION: acpi_os_validate_address
1114 * PARAMETERS: space_id - ACPI space ID
1115 * address - Physical address
1116 * length - Address length
1118 * RETURN: AE_OK if address/length is valid for the space_id. Otherwise,
1119 * should return AE_AML_ILLEGAL_ADDRESS.
1121 * DESCRIPTION: Validate a system address via the host OS. Used to validate
1122 * the addresses accessed by AML operation regions.
1124 *****************************************************************************/
1127 acpi_os_validate_address (
1129 acpi_physical_address address,