2 * ec.c - ACPI Embedded Controller Driver (v2.0)
4 * Copyright (C) 2006, 2007 Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
5 * Copyright (C) 2006 Denis Sadykov <denis.m.sadykov@intel.com>
6 * Copyright (C) 2004 Luming Yu <luming.yu@intel.com>
7 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
8 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
10 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or (at
15 * your option) any later version.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29 #include <linux/kernel.h>
30 #include <linux/module.h>
31 #include <linux/init.h>
32 #include <linux/types.h>
33 #include <linux/delay.h>
34 #include <linux/proc_fs.h>
35 #include <linux/seq_file.h>
36 #include <linux/interrupt.h>
37 #include <linux/list.h>
39 #include <acpi/acpi_bus.h>
40 #include <acpi/acpi_drivers.h>
41 #include <acpi/actypes.h>
43 #define ACPI_EC_CLASS "embedded_controller"
44 #define ACPI_EC_DEVICE_NAME "Embedded Controller"
45 #define ACPI_EC_FILE_INFO "info"
48 #define PREFIX "ACPI: EC: "
50 /* EC status register */
51 #define ACPI_EC_FLAG_OBF 0x01 /* Output buffer full */
52 #define ACPI_EC_FLAG_IBF 0x02 /* Input buffer full */
53 #define ACPI_EC_FLAG_BURST 0x10 /* burst mode */
54 #define ACPI_EC_FLAG_SCI 0x20 /* EC-SCI occurred */
58 ACPI_EC_COMMAND_READ = 0x80,
59 ACPI_EC_COMMAND_WRITE = 0x81,
60 ACPI_EC_BURST_ENABLE = 0x82,
61 ACPI_EC_BURST_DISABLE = 0x83,
62 ACPI_EC_COMMAND_QUERY = 0x84,
67 ACPI_EC_EVENT_OBF_1 = 1, /* Output buffer full */
68 ACPI_EC_EVENT_IBF_0, /* Input buffer empty */
71 #define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */
72 #define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */
75 EC_FLAGS_WAIT_GPE = 0, /* Don't check status until GPE arrives */
76 EC_FLAGS_QUERY_PENDING, /* Query is pending */
77 EC_FLAGS_GPE_MODE, /* Expect GPE to be sent for status change */
80 static int acpi_ec_remove(struct acpi_device *device, int type);
81 static int acpi_ec_start(struct acpi_device *device);
82 static int acpi_ec_stop(struct acpi_device *device, int type);
83 static int acpi_ec_add(struct acpi_device *device);
85 static const struct acpi_device_id ec_device_ids[] = {
90 static struct acpi_driver acpi_ec_driver = {
92 .class = ACPI_EC_CLASS,
96 .remove = acpi_ec_remove,
97 .start = acpi_ec_start,
102 /* If we find an EC via the ECDT, we need to keep a ptr to its context */
103 /* External interfaces use first EC only, so remember */
104 typedef int (*acpi_ec_query_func) (void *data);
106 struct acpi_ec_query_handler {
107 struct list_head node;
108 acpi_ec_query_func func;
114 static struct acpi_ec {
117 unsigned long command_addr;
118 unsigned long data_addr;
119 unsigned long global_lock;
122 wait_queue_head_t wait;
123 struct list_head list;
124 u8 handlers_installed;
125 } *boot_ec, *first_ec;
127 /* --------------------------------------------------------------------------
128 Transaction Management
129 -------------------------------------------------------------------------- */
131 static inline u8 acpi_ec_read_status(struct acpi_ec *ec)
133 return inb(ec->command_addr);
136 static inline u8 acpi_ec_read_data(struct acpi_ec *ec)
138 return inb(ec->data_addr);
141 static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command)
143 outb(command, ec->command_addr);
146 static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data)
148 outb(data, ec->data_addr);
151 static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event)
153 if (test_bit(EC_FLAGS_WAIT_GPE, &ec->flags))
155 if (event == ACPI_EC_EVENT_OBF_1) {
156 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)
158 } else if (event == ACPI_EC_EVENT_IBF_0) {
159 if (!(acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
166 static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
168 if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) &&
169 likely(!force_poll)) {
170 if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec, event),
171 msecs_to_jiffies(ACPI_EC_DELAY)))
173 clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
174 if (acpi_ec_check_status(ec, event)) {
175 clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
179 unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
180 clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
181 while (time_before(jiffies, delay)) {
182 if (acpi_ec_check_status(ec, event))
186 printk(KERN_ERR PREFIX "acpi_ec_wait timeout,"
187 " status = %d, expect_event = %d\n",
188 acpi_ec_read_status(ec), event);
192 static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
193 const u8 * wdata, unsigned wdata_len,
194 u8 * rdata, unsigned rdata_len,
198 set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
199 acpi_ec_write_cmd(ec, command);
201 for (; wdata_len > 0; --wdata_len) {
202 result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
204 printk(KERN_ERR PREFIX
205 "write_cmd timeout, command = %d\n", command);
208 set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
209 acpi_ec_write_data(ec, *(wdata++));
213 result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
215 printk(KERN_ERR PREFIX
216 "finish-write timeout, command = %d\n", command);
219 } else if (command == ACPI_EC_COMMAND_QUERY)
220 clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
222 for (; rdata_len > 0; --rdata_len) {
223 result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
225 printk(KERN_ERR PREFIX "read timeout, command = %d\n",
229 /* Don't expect GPE after last read */
231 set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
232 *(rdata++) = acpi_ec_read_data(ec);
238 static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
239 const u8 * wdata, unsigned wdata_len,
240 u8 * rdata, unsigned rdata_len,
246 if (!ec || (wdata_len && !wdata) || (rdata_len && !rdata))
250 memset(rdata, 0, rdata_len);
252 mutex_lock(&ec->lock);
253 if (ec->global_lock) {
254 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
255 if (ACPI_FAILURE(status)) {
256 mutex_unlock(&ec->lock);
261 status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, 0);
263 printk(KERN_ERR PREFIX
264 "input buffer is not empty, aborting transaction\n");
268 status = acpi_ec_transaction_unlocked(ec, command,
276 acpi_release_global_lock(glk);
277 mutex_unlock(&ec->lock);
283 * Note: samsung nv5000 doesn't work with ec burst mode.
284 * http://bugzilla.kernel.org/show_bug.cgi?id=4980
286 int acpi_ec_burst_enable(struct acpi_ec *ec)
289 return acpi_ec_transaction(ec, ACPI_EC_BURST_ENABLE, NULL, 0, &d, 1, 0);
292 int acpi_ec_burst_disable(struct acpi_ec *ec)
294 return acpi_ec_transaction(ec, ACPI_EC_BURST_DISABLE, NULL, 0, NULL, 0, 0);
297 static int acpi_ec_read(struct acpi_ec *ec, u8 address, u8 * data)
302 result = acpi_ec_transaction(ec, ACPI_EC_COMMAND_READ,
303 &address, 1, &d, 1, 0);
308 static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data)
310 u8 wdata[2] = { address, data };
311 return acpi_ec_transaction(ec, ACPI_EC_COMMAND_WRITE,
312 wdata, 2, NULL, 0, 0);
316 * Externally callable EC access functions. For now, assume 1 EC only
318 int ec_burst_enable(void)
322 return acpi_ec_burst_enable(first_ec);
325 EXPORT_SYMBOL(ec_burst_enable);
327 int ec_burst_disable(void)
331 return acpi_ec_burst_disable(first_ec);
334 EXPORT_SYMBOL(ec_burst_disable);
336 int ec_read(u8 addr, u8 * val)
344 err = acpi_ec_read(first_ec, addr, &temp_data);
353 EXPORT_SYMBOL(ec_read);
355 int ec_write(u8 addr, u8 val)
362 err = acpi_ec_write(first_ec, addr, val);
367 EXPORT_SYMBOL(ec_write);
369 int ec_transaction(u8 command,
370 const u8 * wdata, unsigned wdata_len,
371 u8 * rdata, unsigned rdata_len,
377 return acpi_ec_transaction(first_ec, command, wdata,
378 wdata_len, rdata, rdata_len,
382 EXPORT_SYMBOL(ec_transaction);
384 static int acpi_ec_query(struct acpi_ec *ec, u8 * data)
393 * Query the EC to find out which _Qxx method we need to evaluate.
394 * Note that successful completion of the query causes the ACPI_EC_SCI
395 * bit to be cleared (and thus clearing the interrupt source).
398 result = acpi_ec_transaction(ec, ACPI_EC_COMMAND_QUERY, NULL, 0, &d, 1, 0);
409 /* --------------------------------------------------------------------------
411 -------------------------------------------------------------------------- */
412 int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
413 acpi_handle handle, acpi_ec_query_func func,
416 struct acpi_ec_query_handler *handler =
417 kzalloc(sizeof(struct acpi_ec_query_handler), GFP_KERNEL);
421 handler->query_bit = query_bit;
422 handler->handle = handle;
423 handler->func = func;
424 handler->data = data;
425 mutex_lock(&ec->lock);
426 list_add(&handler->node, &ec->list);
427 mutex_unlock(&ec->lock);
431 EXPORT_SYMBOL_GPL(acpi_ec_add_query_handler);
433 void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit)
435 struct acpi_ec_query_handler *handler;
436 mutex_lock(&ec->lock);
437 list_for_each_entry(handler, &ec->list, node) {
438 if (query_bit == handler->query_bit) {
439 list_del(&handler->node);
443 mutex_unlock(&ec->lock);
446 EXPORT_SYMBOL_GPL(acpi_ec_remove_query_handler);
448 static void acpi_ec_gpe_query(void *ec_cxt)
450 struct acpi_ec *ec = ec_cxt;
452 struct acpi_ec_query_handler *handler, copy;
454 if (!ec || acpi_ec_query(ec, &value))
456 mutex_lock(&ec->lock);
457 list_for_each_entry(handler, &ec->list, node) {
458 if (value == handler->query_bit) {
459 /* have custom handler for this bit */
460 memcpy(©, handler, sizeof(copy));
461 mutex_unlock(&ec->lock);
463 copy.func(copy.data);
464 } else if (copy.handle) {
465 acpi_evaluate_object(copy.handle, NULL, NULL, NULL);
470 mutex_unlock(&ec->lock);
473 static u32 acpi_ec_gpe_handler(void *data)
475 acpi_status status = AE_OK;
476 struct acpi_ec *ec = data;
478 clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
479 if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))
482 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_SCI) {
483 if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
484 status = acpi_os_execute(OSL_EC_BURST_HANDLER,
485 acpi_ec_gpe_query, ec);
486 } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags)))
487 set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
489 return ACPI_SUCCESS(status) ?
490 ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED;
493 /* --------------------------------------------------------------------------
494 Address Space Management
495 -------------------------------------------------------------------------- */
498 acpi_ec_space_setup(acpi_handle region_handle,
499 u32 function, void *handler_context, void **return_context)
502 * The EC object is in the handler context and is needed
503 * when calling the acpi_ec_space_handler.
505 *return_context = (function != ACPI_REGION_DEACTIVATE) ?
506 handler_context : NULL;
512 acpi_ec_space_handler(u32 function, acpi_physical_address address,
513 u32 bits, acpi_integer *value,
514 void *handler_context, void *region_context)
516 struct acpi_ec *ec = handler_context;
517 int result = 0, i = 0;
520 if ((address > 0xFF) || !value || !handler_context)
521 return AE_BAD_PARAMETER;
523 if (function != ACPI_READ && function != ACPI_WRITE)
524 return AE_BAD_PARAMETER;
526 if (bits != 8 && acpi_strict)
527 return AE_BAD_PARAMETER;
529 while (bits - i > 0) {
530 if (function == ACPI_READ) {
531 result = acpi_ec_read(ec, address, &temp);
532 (*value) |= ((acpi_integer)temp) << i;
534 temp = 0xff & ((*value) >> i);
535 result = acpi_ec_write(ec, address, temp);
543 return AE_BAD_PARAMETER;
556 /* --------------------------------------------------------------------------
558 -------------------------------------------------------------------------- */
560 static struct proc_dir_entry *acpi_ec_dir;
562 static int acpi_ec_read_info(struct seq_file *seq, void *offset)
564 struct acpi_ec *ec = seq->private;
569 seq_printf(seq, "gpe:\t\t\t0x%02x\n", (u32) ec->gpe);
570 seq_printf(seq, "ports:\t\t\t0x%02x, 0x%02x\n",
571 (unsigned)ec->command_addr, (unsigned)ec->data_addr);
572 seq_printf(seq, "use global lock:\t%s\n",
573 ec->global_lock ? "yes" : "no");
578 static int acpi_ec_info_open_fs(struct inode *inode, struct file *file)
580 return single_open(file, acpi_ec_read_info, PDE(inode)->data);
583 static struct file_operations acpi_ec_info_ops = {
584 .open = acpi_ec_info_open_fs,
587 .release = single_release,
588 .owner = THIS_MODULE,
591 static int acpi_ec_add_fs(struct acpi_device *device)
593 struct proc_dir_entry *entry = NULL;
595 if (!acpi_device_dir(device)) {
596 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
598 if (!acpi_device_dir(device))
602 entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO,
603 acpi_device_dir(device));
607 entry->proc_fops = &acpi_ec_info_ops;
608 entry->data = acpi_driver_data(device);
609 entry->owner = THIS_MODULE;
615 static int acpi_ec_remove_fs(struct acpi_device *device)
618 if (acpi_device_dir(device)) {
619 remove_proc_entry(ACPI_EC_FILE_INFO, acpi_device_dir(device));
620 remove_proc_entry(acpi_device_bid(device), acpi_ec_dir);
621 acpi_device_dir(device) = NULL;
627 /* --------------------------------------------------------------------------
629 -------------------------------------------------------------------------- */
631 ec_parse_io_ports(struct acpi_resource *resource, void *context);
633 static struct acpi_ec *make_acpi_ec(void)
635 struct acpi_ec *ec = kzalloc(sizeof(struct acpi_ec), GFP_KERNEL);
638 ec->flags = 1 << EC_FLAGS_QUERY_PENDING;
639 mutex_init(&ec->lock);
640 init_waitqueue_head(&ec->wait);
641 INIT_LIST_HEAD(&ec->list);
646 acpi_ec_register_query_methods(acpi_handle handle, u32 level,
647 void *context, void **return_value)
649 struct acpi_namespace_node *node = handle;
650 struct acpi_ec *ec = context;
652 if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
653 acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
659 ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
663 struct acpi_ec *ec = context;
664 status = acpi_walk_resources(handle, METHOD_NAME__CRS,
665 ec_parse_io_ports, ec);
666 if (ACPI_FAILURE(status))
669 /* Get GPE bit assignment (EC events). */
670 /* TODO: Add support for _GPE returning a package */
671 status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe);
672 if (ACPI_FAILURE(status))
674 /* Find and register all query methods */
675 acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
676 acpi_ec_register_query_methods, ec, NULL);
677 /* Use the global lock for all EC transactions? */
678 acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
680 return AE_CTRL_TERMINATE;
683 static void ec_remove_handlers(struct acpi_ec *ec)
685 if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
686 ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
687 printk(KERN_ERR PREFIX "failed to remove space handler\n");
688 if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
689 &acpi_ec_gpe_handler)))
690 printk(KERN_ERR PREFIX "failed to remove gpe handler\n");
691 ec->handlers_installed = 0;
694 static int acpi_ec_add(struct acpi_device *device)
696 struct acpi_ec *ec = NULL;
700 strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
701 strcpy(acpi_device_class(device), ACPI_EC_CLASS);
703 /* Check for boot EC */
705 if (boot_ec->handle == device->handle) {
706 /* Pre-loaded EC from DSDT, just move pointer */
710 } else if (boot_ec->handle == ACPI_ROOT_OBJECT) {
711 /* ECDT-based EC, time to shut it down */
712 ec_remove_handlers(boot_ec);
714 first_ec = boot_ec = NULL;
722 if (ec_parse_device(device->handle, 0, ec, NULL) !=
727 ec->handle = device->handle;
731 acpi_driver_data(device) = ec;
732 acpi_ec_add_fs(device);
733 printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
734 ec->gpe, ec->command_addr, ec->data_addr);
738 static int acpi_ec_remove(struct acpi_device *device, int type)
741 struct acpi_ec_query_handler *handler, *tmp;
746 ec = acpi_driver_data(device);
747 mutex_lock(&ec->lock);
748 list_for_each_entry_safe(handler, tmp, &ec->list, node) {
749 list_del(&handler->node);
752 mutex_unlock(&ec->lock);
753 acpi_ec_remove_fs(device);
754 acpi_driver_data(device) = NULL;
762 ec_parse_io_ports(struct acpi_resource *resource, void *context)
764 struct acpi_ec *ec = context;
766 if (resource->type != ACPI_RESOURCE_TYPE_IO)
770 * The first address region returned is the data port, and
771 * the second address region returned is the status/command
774 if (ec->data_addr == 0)
775 ec->data_addr = resource->data.io.minimum;
776 else if (ec->command_addr == 0)
777 ec->command_addr = resource->data.io.minimum;
779 return AE_CTRL_TERMINATE;
784 static int ec_install_handlers(struct acpi_ec *ec)
787 if (ec->handlers_installed)
789 status = acpi_install_gpe_handler(NULL, ec->gpe,
790 ACPI_GPE_EDGE_TRIGGERED,
791 &acpi_ec_gpe_handler, ec);
792 if (ACPI_FAILURE(status))
795 acpi_set_gpe_type(NULL, ec->gpe, ACPI_GPE_TYPE_RUNTIME);
796 acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
798 status = acpi_install_address_space_handler(ec->handle,
800 &acpi_ec_space_handler,
801 &acpi_ec_space_setup, ec);
802 if (ACPI_FAILURE(status)) {
803 acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler);
807 ec->handlers_installed = 1;
811 static int acpi_ec_start(struct acpi_device *device)
819 ec = acpi_driver_data(device);
824 ret = ec_install_handlers(ec);
826 /* EC is fully operational, allow queries */
827 clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
831 static int acpi_ec_stop(struct acpi_device *device, int type)
836 ec = acpi_driver_data(device);
839 ec_remove_handlers(ec);
844 int __init acpi_ec_ecdt_probe(void)
848 struct acpi_table_ecdt *ecdt_ptr;
850 boot_ec = make_acpi_ec();
854 * Generate a boot ec context
856 status = acpi_get_table(ACPI_SIG_ECDT, 1,
857 (struct acpi_table_header **)&ecdt_ptr);
858 if (ACPI_SUCCESS(status)) {
859 printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n");
860 boot_ec->command_addr = ecdt_ptr->control.address;
861 boot_ec->data_addr = ecdt_ptr->data.address;
862 boot_ec->gpe = ecdt_ptr->gpe;
863 boot_ec->handle = ACPI_ROOT_OBJECT;
865 printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
866 status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
868 /* Check that acpi_get_devices actually find something */
869 if (ACPI_FAILURE(status) || !boot_ec->handle)
873 ret = ec_install_handlers(boot_ec);
884 static int __init acpi_ec_init(void)
891 acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir);
895 /* Now register the driver for the EC */
896 result = acpi_bus_register_driver(&acpi_ec_driver);
898 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);
905 subsys_initcall(acpi_ec_init);
907 /* EC driver currently not unloadable */
909 static void __exit acpi_ec_exit(void)
912 acpi_bus_unregister_driver(&acpi_ec_driver);
914 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);