Deleted Added
full compact
acpi.c (271963) acpi.c (272444)
1/*-
2 * Copyright (c) 2000 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * Copyright (c) 2000, 2001 Michael Smith
5 * Copyright (c) 2000 BSDi
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * Copyright (c) 2000, 2001 Michael Smith
5 * Copyright (c) 2000 BSDi
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 271963 2014-09-22 14:27:26Z jhb $");
31__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 272444 2014-10-02 19:11:18Z jkim $");
32
33#include "opt_acpi.h"
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/proc.h>
37#include <sys/fcntl.h>
38#include <sys/malloc.h>
39#include <sys/module.h>

--- 211 unchanged lines hidden (view full) ---

251 */
252static char acpi_install_interface[256];
253TUNABLE_STR("hw.acpi.install_interface", acpi_install_interface,
254 sizeof(acpi_install_interface));
255static char acpi_remove_interface[256];
256TUNABLE_STR("hw.acpi.remove_interface", acpi_remove_interface,
257 sizeof(acpi_remove_interface));
258
32
33#include "opt_acpi.h"
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/proc.h>
37#include <sys/fcntl.h>
38#include <sys/malloc.h>
39#include <sys/module.h>

--- 211 unchanged lines hidden (view full) ---

251 */
252static char acpi_install_interface[256];
253TUNABLE_STR("hw.acpi.install_interface", acpi_install_interface,
254 sizeof(acpi_install_interface));
255static char acpi_remove_interface[256];
256TUNABLE_STR("hw.acpi.remove_interface", acpi_remove_interface,
257 sizeof(acpi_remove_interface));
258
259/*
260 * Allow override of whether methods execute in parallel or not.
261 * Enable this for serial behavior, which fixes "AE_ALREADY_EXISTS"
262 * errors for AML that really can't handle parallel method execution.
263 * It is off by default since this breaks recursive methods and
264 * some IBMs use such code.
265 */
266static int acpi_serialize_methods;
267TUNABLE_INT("hw.acpi.serialize_methods", &acpi_serialize_methods);
268
269/* Allow users to dump Debug objects without ACPI debugger. */
270static int acpi_debug_objects;
271TUNABLE_INT("debug.acpi.enable_debug_objects", &acpi_debug_objects);
272SYSCTL_PROC(_debug_acpi, OID_AUTO, enable_debug_objects,
273 CTLFLAG_RW | CTLTYPE_INT, NULL, 0, acpi_debug_objects_sysctl, "I",
274 "Enable Debug objects");
275
276/* Allow the interpreter to ignore common mistakes in BIOS. */
277static int acpi_interpreter_slack = 1;
278TUNABLE_INT("debug.acpi.interpreter_slack", &acpi_interpreter_slack);
279SYSCTL_INT(_debug_acpi, OID_AUTO, interpreter_slack, CTLFLAG_RDTUN,
280 &acpi_interpreter_slack, 1, "Turn on interpreter slack mode.");
281
259/* Allow users to dump Debug objects without ACPI debugger. */
260static int acpi_debug_objects;
261TUNABLE_INT("debug.acpi.enable_debug_objects", &acpi_debug_objects);
262SYSCTL_PROC(_debug_acpi, OID_AUTO, enable_debug_objects,
263 CTLFLAG_RW | CTLTYPE_INT, NULL, 0, acpi_debug_objects_sysctl, "I",
264 "Enable Debug objects");
265
266/* Allow the interpreter to ignore common mistakes in BIOS. */
267static int acpi_interpreter_slack = 1;
268TUNABLE_INT("debug.acpi.interpreter_slack", &acpi_interpreter_slack);
269SYSCTL_INT(_debug_acpi, OID_AUTO, interpreter_slack, CTLFLAG_RDTUN,
270 &acpi_interpreter_slack, 1, "Turn on interpreter slack mode.");
271
272/* Ignore register widths set by FADT and use default widths instead. */
273static int acpi_ignore_reg_width = 1;
274TUNABLE_INT("debug.acpi.default_register_width", &acpi_ignore_reg_width);
275SYSCTL_INT(_debug_acpi, OID_AUTO, default_register_width, CTLFLAG_RDTUN,
276 &acpi_ignore_reg_width, 1, "Ignore register widths set by FADT");
277
282#ifdef __amd64__
283/* Reset system clock while resuming. XXX Remove once tested. */
284static int acpi_reset_clock = 1;
285TUNABLE_INT("debug.acpi.reset_clock", &acpi_reset_clock);
286SYSCTL_INT(_debug_acpi, OID_AUTO, reset_clock, CTLFLAG_RW,
287 &acpi_reset_clock, 1, "Reset system clock while resuming.");
288#endif
289

--- 179 unchanged lines hidden (view full) ---

469
470 /* Initialise the ACPI mutex */
471 mtx_init(&acpi_mutex, "ACPI global lock", NULL, MTX_DEF);
472
473 /*
474 * Set the globals from our tunables. This is needed because ACPI-CA
475 * uses UINT8 for some values and we have no tunable_byte.
476 */
278#ifdef __amd64__
279/* Reset system clock while resuming. XXX Remove once tested. */
280static int acpi_reset_clock = 1;
281TUNABLE_INT("debug.acpi.reset_clock", &acpi_reset_clock);
282SYSCTL_INT(_debug_acpi, OID_AUTO, reset_clock, CTLFLAG_RW,
283 &acpi_reset_clock, 1, "Reset system clock while resuming.");
284#endif
285

--- 179 unchanged lines hidden (view full) ---

465
466 /* Initialise the ACPI mutex */
467 mtx_init(&acpi_mutex, "ACPI global lock", NULL, MTX_DEF);
468
469 /*
470 * Set the globals from our tunables. This is needed because ACPI-CA
471 * uses UINT8 for some values and we have no tunable_byte.
472 */
477 AcpiGbl_AllMethodsSerialized = acpi_serialize_methods ? TRUE : FALSE;
478 AcpiGbl_EnableInterpreterSlack = acpi_interpreter_slack ? TRUE : FALSE;
479 AcpiGbl_EnableAmlDebugObject = acpi_debug_objects ? TRUE : FALSE;
473 AcpiGbl_EnableInterpreterSlack = acpi_interpreter_slack ? TRUE : FALSE;
474 AcpiGbl_EnableAmlDebugObject = acpi_debug_objects ? TRUE : FALSE;
475 AcpiGbl_UseDefaultRegisterWidths = acpi_ignore_reg_width ? TRUE : FALSE;
480
481#ifndef ACPI_DEBUG
482 /*
483 * Disable all debugging layers and levels.
484 */
485 AcpiDbgLayer = 0;
486 AcpiDbgLevel = 0;
487#endif

--- 3481 unchanged lines hidden ---
476
477#ifndef ACPI_DEBUG
478 /*
479 * Disable all debugging layers and levels.
480 */
481 AcpiDbgLayer = 0;
482 AcpiDbgLevel = 0;
483#endif

--- 3481 unchanged lines hidden ---