Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
This includes initial support for the recently published ACPI 5.0 spec. In particular, support for the "hardware-reduced" bit that eliminates the dependency on legacy hardware. APEI has patches resulting from testing on real hardware. Plus other random fixes. * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits) acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec intel_idle: Split up and provide per CPU initialization func ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2 ACPI processor: Remove unneeded cpuidle_unregister_driver call intel idle: Make idle driver more robust intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle ACPI: kernel-parameters.txt : Add intel_idle.max_cstate intel_idle: remove redundant local_irq_disable() call ACPI processor: Fix error path, also remove sysdev link ACPI: processor: fix acpi_get_cpuid for UP processor intel_idle: fix API misuse ACPI APEI: Convert atomicio routines ACPI: Export interfaces for ioremapping/iounmapping ACPI registers ACPI: Fix possible alignment issues with GAS 'address' references ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64) ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64) ACPI: Store SRAT table revision ACPI, APEI, Resolve false conflict between ACPI NVS and APEI ACPI, Record ACPI NVS regions ACPI, APEI, EINJ, Refine the fix of resource conflict ...
This commit is contained in:
Коммит
507a03c1cb
|
@ -47,20 +47,53 @@ directory apei/einj. The following files are provided.
|
|||
|
||||
- param1
|
||||
This file is used to set the first error parameter value. Effect of
|
||||
parameter depends on error_type specified. For memory error, this is
|
||||
physical memory address. Only available if param_extension module
|
||||
parameter is specified.
|
||||
parameter depends on error_type specified.
|
||||
|
||||
- param2
|
||||
This file is used to set the second error parameter value. Effect of
|
||||
parameter depends on error_type specified. For memory error, this is
|
||||
physical memory address mask. Only available if param_extension
|
||||
module parameter is specified.
|
||||
parameter depends on error_type specified.
|
||||
|
||||
BIOS versions based in the ACPI 4.0 specification have limited options
|
||||
to control where the errors are injected. Your BIOS may support an
|
||||
extension (enabled with the param_extension=1 module parameter, or
|
||||
boot command line einj.param_extension=1). This allows the address
|
||||
and mask for memory injections to be specified by the param1 and
|
||||
param2 files in apei/einj.
|
||||
|
||||
BIOS versions using the ACPI 5.0 specification have more control over
|
||||
the target of the injection. For processor related errors (type 0x1,
|
||||
0x2 and 0x4) the APICID of the target should be provided using the
|
||||
param1 file in apei/einj. For memory errors (type 0x8, 0x10 and 0x20)
|
||||
the address is set using param1 with a mask in param2 (0x0 is equivalent
|
||||
to all ones). For PCI express errors (type 0x40, 0x80 and 0x100) the
|
||||
segment, bus, device and function are specified using param1:
|
||||
|
||||
31 24 23 16 15 11 10 8 7 0
|
||||
+-------------------------------------------------+
|
||||
| segment | bus | device | function | reserved |
|
||||
+-------------------------------------------------+
|
||||
|
||||
An ACPI 5.0 BIOS may also allow vendor specific errors to be injected.
|
||||
In this case a file named vendor will contain identifying information
|
||||
from the BIOS that hopefully will allow an application wishing to use
|
||||
the vendor specific extension to tell that they are running on a BIOS
|
||||
that supports it. All vendor extensions have the 0x80000000 bit set in
|
||||
error_type. A file vendor_flags controls the interpretation of param1
|
||||
and param2 (1 = PROCESSOR, 2 = MEMORY, 4 = PCI). See your BIOS vendor
|
||||
documentation for details (and expect changes to this API if vendors
|
||||
creativity in using this feature expands beyond our expectations).
|
||||
|
||||
Example:
|
||||
# cd /sys/kernel/debug/apei/einj
|
||||
# cat available_error_type # See which errors can be injected
|
||||
0x00000002 Processor Uncorrectable non-fatal
|
||||
0x00000008 Memory Correctable
|
||||
0x00000010 Memory Uncorrectable non-fatal
|
||||
# echo 0x12345000 > param1 # Set memory address for injection
|
||||
# echo 0xfffffffffffff000 > param2 # Mask - anywhere in this page
|
||||
# echo 0x8 > error_type # Choose correctable memory error
|
||||
# echo 1 > error_inject # Inject now
|
||||
|
||||
Injecting parameter support is a BIOS version specific extension, that
|
||||
is, it only works on some BIOS version. If you want to use it, please
|
||||
make sure your BIOS version has the proper support and specify
|
||||
"param_extension=y" in module parameter.
|
||||
|
||||
For more information about EINJ, please refer to ACPI specification
|
||||
version 4.0, section 17.5.
|
||||
version 4.0, section 17.5 and ACPI 5.0, section 18.6.
|
||||
|
|
|
@ -1059,6 +1059,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
|||
By default, super page will be supported if Intel IOMMU
|
||||
has the capability. With this option, super page will
|
||||
not be supported.
|
||||
|
||||
intel_idle.max_cstate= [KNL,HW,ACPI,X86]
|
||||
0 disables intel_idle and fall back on acpi_idle.
|
||||
1 to 6 specify maximum depth of C-state.
|
||||
|
||||
intremap= [X86-64, Intel-IOMMU]
|
||||
on enable Interrupt Remapping (default)
|
||||
off disable Interrupt Remapping
|
||||
|
|
|
@ -429,22 +429,24 @@ static u32 __devinitdata pxm_flag[PXM_FLAG_LEN];
|
|||
static struct acpi_table_slit __initdata *slit_table;
|
||||
cpumask_t early_cpu_possible_map = CPU_MASK_NONE;
|
||||
|
||||
static int get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
|
||||
static int __init
|
||||
get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
|
||||
{
|
||||
int pxm;
|
||||
|
||||
pxm = pa->proximity_domain_lo;
|
||||
if (ia64_platform_is("sn2"))
|
||||
if (ia64_platform_is("sn2") || acpi_srat_revision >= 2)
|
||||
pxm += pa->proximity_domain_hi[0] << 8;
|
||||
return pxm;
|
||||
}
|
||||
|
||||
static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
|
||||
static int __init
|
||||
get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
|
||||
{
|
||||
int pxm;
|
||||
|
||||
pxm = ma->proximity_domain;
|
||||
if (!ia64_platform_is("sn2"))
|
||||
if (!ia64_platform_is("sn2") && acpi_srat_revision <= 1)
|
||||
pxm &= 0xff;
|
||||
|
||||
return pxm;
|
||||
|
|
|
@ -703,7 +703,7 @@ void __init e820_mark_nosave_regions(unsigned long limit_pfn)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
#ifdef CONFIG_ACPI
|
||||
/**
|
||||
* Mark ACPI NVS memory region, so that we can save/restore it during
|
||||
* hibernation and the subsequent resume.
|
||||
|
@ -716,7 +716,7 @@ static int __init e820_mark_nvs_memory(void)
|
|||
struct e820entry *ei = &e820.map[i];
|
||||
|
||||
if (ei->type == E820_NVS)
|
||||
suspend_nvs_register(ei->addr, ei->size);
|
||||
acpi_nvs_register(ei->addr, ei->size);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -109,6 +109,8 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
|
|||
if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
|
||||
return;
|
||||
pxm = pa->proximity_domain_lo;
|
||||
if (acpi_srat_revision >= 2)
|
||||
pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8;
|
||||
node = setup_node(pxm);
|
||||
if (node < 0) {
|
||||
printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
|
||||
|
@ -160,6 +162,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
|
|||
start = ma->base_address;
|
||||
end = start + ma->length;
|
||||
pxm = ma->proximity_domain;
|
||||
if (acpi_srat_revision <= 1)
|
||||
pxm &= 0xff;
|
||||
node = setup_node(pxm);
|
||||
if (node < 0) {
|
||||
printk(KERN_ERR "SRAT: Too many proximity domains.\n");
|
||||
|
|
|
@ -20,11 +20,12 @@ obj-y += acpi.o \
|
|||
# All the builtin files are in the "acpi." module_param namespace.
|
||||
acpi-y += osl.o utils.o reboot.o
|
||||
acpi-y += atomicio.o
|
||||
acpi-y += nvs.o
|
||||
|
||||
# sleep related files
|
||||
acpi-y += wakeup.o
|
||||
acpi-y += sleep.o
|
||||
acpi-$(CONFIG_ACPI_SLEEP) += proc.o nvs.o
|
||||
acpi-$(CONFIG_ACPI_SLEEP) += proc.o
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -8,41 +8,151 @@ ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
|
|||
# use acpi.o to put all files here into acpi.o modparam namespace
|
||||
obj-y += acpi.o
|
||||
|
||||
acpi-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \
|
||||
dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \
|
||||
dsinit.o dsargs.o dscontrol.o dswload2.o
|
||||
acpi-y := \
|
||||
dsargs.o \
|
||||
dscontrol.o \
|
||||
dsfield.o \
|
||||
dsinit.o \
|
||||
dsmethod.o \
|
||||
dsmthdat.o \
|
||||
dsobject.o \
|
||||
dsopcode.o \
|
||||
dsutils.o \
|
||||
dswexec.o \
|
||||
dswload.o \
|
||||
dswload2.o \
|
||||
dswscope.o \
|
||||
dswstate.o
|
||||
|
||||
acpi-y += evevent.o evregion.o evsci.o evxfevnt.o \
|
||||
evmisc.o evrgnini.o evxface.o evxfregn.o \
|
||||
evgpe.o evgpeblk.o evgpeinit.o evgpeutil.o evxfgpe.o evglock.o
|
||||
acpi-y += \
|
||||
evevent.o \
|
||||
evgpe.o \
|
||||
evgpeblk.o \
|
||||
evgpeinit.o \
|
||||
evgpeutil.o \
|
||||
evglock.o \
|
||||
evmisc.o \
|
||||
evregion.o \
|
||||
evrgnini.o \
|
||||
evsci.o \
|
||||
evxface.o \
|
||||
evxfevnt.o \
|
||||
evxfgpe.o \
|
||||
evxfregn.o
|
||||
|
||||
acpi-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\
|
||||
exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\
|
||||
excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \
|
||||
exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o exdebug.o
|
||||
acpi-y += \
|
||||
exconfig.o \
|
||||
exconvrt.o \
|
||||
excreate.o \
|
||||
exdebug.o \
|
||||
exdump.o \
|
||||
exfield.o \
|
||||
exfldio.o \
|
||||
exmutex.o \
|
||||
exnames.o \
|
||||
exoparg1.o \
|
||||
exoparg2.o \
|
||||
exoparg3.o \
|
||||
exoparg6.o \
|
||||
exprep.o \
|
||||
exmisc.o \
|
||||
exregion.o \
|
||||
exresnte.o \
|
||||
exresolv.o \
|
||||
exresop.o \
|
||||
exstore.o \
|
||||
exstoren.o \
|
||||
exstorob.o \
|
||||
exsystem.o \
|
||||
exutils.o
|
||||
|
||||
acpi-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o hwvalid.o hwpci.o
|
||||
acpi-y += \
|
||||
hwacpi.o \
|
||||
hwgpe.o \
|
||||
hwpci.o \
|
||||
hwregs.o \
|
||||
hwsleep.o \
|
||||
hwvalid.o \
|
||||
hwxface.o
|
||||
|
||||
acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
|
||||
|
||||
acpi-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \
|
||||
nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \
|
||||
nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \
|
||||
nsparse.o nspredef.o nsrepair.o nsrepair2.o
|
||||
acpi-y += \
|
||||
nsaccess.o \
|
||||
nsalloc.o \
|
||||
nsdump.o \
|
||||
nseval.o \
|
||||
nsinit.o \
|
||||
nsload.o \
|
||||
nsnames.o \
|
||||
nsobject.o \
|
||||
nsparse.o \
|
||||
nspredef.o \
|
||||
nsrepair.o \
|
||||
nsrepair2.o \
|
||||
nssearch.o \
|
||||
nsutils.o \
|
||||
nswalk.o \
|
||||
nsxfeval.o \
|
||||
nsxfname.o \
|
||||
nsxfobj.o
|
||||
|
||||
acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o
|
||||
|
||||
acpi-y += psargs.o psparse.o psloop.o pstree.o pswalk.o \
|
||||
psopcode.o psscope.o psutils.o psxface.o
|
||||
acpi-y += \
|
||||
psargs.o \
|
||||
psloop.o \
|
||||
psopcode.o \
|
||||
psparse.o \
|
||||
psscope.o \
|
||||
pstree.o \
|
||||
psutils.o \
|
||||
pswalk.o \
|
||||
psxface.o
|
||||
|
||||
acpi-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \
|
||||
rscalc.o rsirq.o rsmemory.o rsutils.o
|
||||
acpi-y += \
|
||||
rsaddr.o \
|
||||
rscalc.o \
|
||||
rscreate.o \
|
||||
rsinfo.o \
|
||||
rsio.o \
|
||||
rsirq.o \
|
||||
rslist.o \
|
||||
rsmemory.o \
|
||||
rsmisc.o \
|
||||
rsserial.o \
|
||||
rsutils.o \
|
||||
rsxface.o
|
||||
|
||||
acpi-$(ACPI_FUTURE_USAGE) += rsdump.o
|
||||
|
||||
acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o
|
||||
acpi-y += \
|
||||
tbfadt.o \
|
||||
tbfind.o \
|
||||
tbinstal.o \
|
||||
tbutils.o \
|
||||
tbxface.o \
|
||||
tbxfroot.o
|
||||
|
||||
acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
|
||||
utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
|
||||
utstate.o utmutex.o utobject.o utresrc.o utlock.o utids.o \
|
||||
utosi.o utxferror.o utdecode.o
|
||||
acpi-y += \
|
||||
utaddress.o \
|
||||
utalloc.o \
|
||||
utcopy.o \
|
||||
utdebug.o \
|
||||
utdecode.o \
|
||||
utdelete.o \
|
||||
uteval.o \
|
||||
utglobal.o \
|
||||
utids.o \
|
||||
utinit.o \
|
||||
utlock.o \
|
||||
utmath.o \
|
||||
utmisc.o \
|
||||
utmutex.o \
|
||||
utobject.o \
|
||||
utosi.o \
|
||||
utresrc.o \
|
||||
utstate.o \
|
||||
utxface.o \
|
||||
utxferror.o \
|
||||
utxfmutex.o
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -123,6 +123,10 @@
|
|||
|
||||
#define ACPI_MAX_SLEEP 2000 /* Two seconds */
|
||||
|
||||
/* Address Range lists are per-space_id (Memory and I/O only) */
|
||||
|
||||
#define ACPI_ADDRESS_RANGE_MAX 2
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* ACPI Specification constants (Do not change unless the specification changes)
|
||||
|
@ -202,9 +206,10 @@
|
|||
#define ACPI_RSDP_CHECKSUM_LENGTH 20
|
||||
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
|
||||
|
||||
/* SMBus and IPMI bidirectional buffer size */
|
||||
/* SMBus, GSBus and IPMI bidirectional buffer size */
|
||||
|
||||
#define ACPI_SMBUS_BUFFER_SIZE 34
|
||||
#define ACPI_GSBUS_BUFFER_SIZE 34
|
||||
#define ACPI_IPMI_BUFFER_SIZE 66
|
||||
|
||||
/* _sx_d and _sx_w control methods */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -162,6 +162,7 @@ acpi_status acpi_ev_initialize_op_regions(void);
|
|||
|
||||
acpi_status
|
||||
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
||||
union acpi_operand_object *field_obj,
|
||||
u32 function,
|
||||
u32 region_offset, u32 bit_width, u64 *value);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -140,8 +140,19 @@ u32 acpi_gbl_trace_flags;
|
|||
acpi_name acpi_gbl_trace_method_name;
|
||||
u8 acpi_gbl_system_awake_and_running;
|
||||
|
||||
/*
|
||||
* ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
|
||||
* that the ACPI hardware is no longer required. A flag in the FADT indicates
|
||||
* a reduced HW machine, and that flag is duplicated here for convenience.
|
||||
*/
|
||||
u8 acpi_gbl_reduced_hardware;
|
||||
|
||||
#endif
|
||||
|
||||
/* Do not disassemble buffers to resource descriptors */
|
||||
|
||||
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Debug support
|
||||
|
@ -207,7 +218,7 @@ ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;
|
|||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Mutual exlusion within ACPICA subsystem
|
||||
* Mutual exclusion within ACPICA subsystem
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -295,6 +306,8 @@ ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
|
|||
ACPI_EXTERN u8 acpi_gbl_events_initialized;
|
||||
ACPI_EXTERN u8 acpi_gbl_osi_data;
|
||||
ACPI_EXTERN struct acpi_interface_info *acpi_gbl_supported_interfaces;
|
||||
ACPI_EXTERN struct acpi_address_range
|
||||
*acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX];
|
||||
|
||||
#ifndef DEFINE_ACPI_GLOBALS
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -468,6 +468,8 @@ void acpi_ex_eisa_id_to_string(char *dest, u64 compressed_id);
|
|||
|
||||
void acpi_ex_integer_to_string(char *dest, u64 value);
|
||||
|
||||
u8 acpi_is_valid_space_id(u8 space_id);
|
||||
|
||||
/*
|
||||
* exregion - default op_region handlers
|
||||
*/
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -53,7 +53,7 @@ typedef u32 acpi_mutex_handle;
|
|||
|
||||
/* Total number of aml opcodes defined */
|
||||
|
||||
#define AML_NUM_OPCODES 0x7F
|
||||
#define AML_NUM_OPCODES 0x81
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
|
@ -249,12 +249,16 @@ struct acpi_create_field_info {
|
|||
struct acpi_namespace_node *field_node;
|
||||
struct acpi_namespace_node *register_node;
|
||||
struct acpi_namespace_node *data_register_node;
|
||||
struct acpi_namespace_node *connection_node;
|
||||
u8 *resource_buffer;
|
||||
u32 bank_value;
|
||||
u32 field_bit_position;
|
||||
u32 field_bit_length;
|
||||
u16 resource_length;
|
||||
u8 field_flags;
|
||||
u8 attribute;
|
||||
u8 field_type;
|
||||
u8 access_length;
|
||||
};
|
||||
|
||||
typedef
|
||||
|
@ -315,7 +319,8 @@ struct acpi_name_info {
|
|||
|
||||
/*
|
||||
* Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
|
||||
* ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT
|
||||
* ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT,
|
||||
* ACPI_PTYPE2_FIX_VAR
|
||||
*/
|
||||
struct acpi_package_info {
|
||||
u8 type;
|
||||
|
@ -625,6 +630,15 @@ union acpi_generic_state {
|
|||
|
||||
typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state);
|
||||
|
||||
/* Address Range info block */
|
||||
|
||||
struct acpi_address_range {
|
||||
struct acpi_address_range *next;
|
||||
struct acpi_namespace_node *region_node;
|
||||
acpi_physical_address start_address;
|
||||
acpi_physical_address end_address;
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Parser typedefs and structs
|
||||
|
@ -951,7 +965,7 @@ struct acpi_port_info {
|
|||
#define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38
|
||||
#define ACPI_RESOURCE_NAME_IO 0x40
|
||||
#define ACPI_RESOURCE_NAME_FIXED_IO 0x48
|
||||
#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50
|
||||
#define ACPI_RESOURCE_NAME_FIXED_DMA 0x50
|
||||
#define ACPI_RESOURCE_NAME_RESERVED_S2 0x58
|
||||
#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60
|
||||
#define ACPI_RESOURCE_NAME_RESERVED_S4 0x68
|
||||
|
@ -973,7 +987,9 @@ struct acpi_port_info {
|
|||
#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89
|
||||
#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A
|
||||
#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B
|
||||
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B
|
||||
#define ACPI_RESOURCE_NAME_GPIO 0x8C
|
||||
#define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E
|
||||
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8E
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -254,6 +254,7 @@ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
|
|||
u32 base_byte_offset; /* Byte offset within containing object */\
|
||||
u32 value; /* Value to store into the Bank or Index register */\
|
||||
u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
|
||||
u8 access_length; /* For serial regions/fields */
|
||||
|
||||
|
||||
struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
|
||||
|
@ -261,7 +262,9 @@ struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and
|
|||
};
|
||||
|
||||
struct acpi_object_region_field {
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO u16 resource_length;
|
||||
union acpi_operand_object *region_obj; /* Containing op_region object */
|
||||
u8 *resource_buffer; /* resource_template for serial regions/fields */
|
||||
};
|
||||
|
||||
struct acpi_object_bank_field {
|
||||
|
@ -358,6 +361,7 @@ typedef enum {
|
|||
*/
|
||||
struct acpi_object_extra {
|
||||
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
|
||||
struct acpi_namespace_node *scope_node;
|
||||
void *region_context; /* Region-specific data */
|
||||
u8 *aml_start;
|
||||
u32 aml_length;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -93,6 +93,7 @@
|
|||
#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
|
||||
#define ARGP_CONNECTFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_CONTINUE_OP ARG_NONE
|
||||
#define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME)
|
||||
#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
|
@ -164,6 +165,7 @@
|
|||
#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG)
|
||||
#define ARGP_REVISION_OP ARG_NONE
|
||||
#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST)
|
||||
#define ARGP_SERIALFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
|
@ -223,6 +225,7 @@
|
|||
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
|
||||
#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
|
||||
#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
|
||||
#define ARGI_CONNECTFIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET)
|
||||
#define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
|
||||
|
@ -294,6 +297,7 @@
|
|||
#define ARGI_RETURN_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_REVISION_OP ARG_NONE
|
||||
#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_SERIALFIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -94,6 +94,14 @@
|
|||
* ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length
|
||||
* (Used for _ART, _FPS)
|
||||
*
|
||||
* ACPI_PTYPE2_FIX_VAR: Each subpackage consists of some fixed-length elements
|
||||
* followed by an optional element
|
||||
* object type
|
||||
* count
|
||||
* object type
|
||||
* count = 0 (optional)
|
||||
* (Used for _DLM)
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
enum acpi_return_package_types {
|
||||
|
@ -105,7 +113,8 @@ enum acpi_return_package_types {
|
|||
ACPI_PTYPE2_PKG_COUNT = 6,
|
||||
ACPI_PTYPE2_FIXED = 7,
|
||||
ACPI_PTYPE2_MIN = 8,
|
||||
ACPI_PTYPE2_REV_FIXED = 9
|
||||
ACPI_PTYPE2_REV_FIXED = 9,
|
||||
ACPI_PTYPE2_FIX_VAR = 10
|
||||
};
|
||||
|
||||
#ifdef ACPI_CREATE_PREDEFINED_TABLE
|
||||
|
@ -154,6 +163,7 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_AC8", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_AC9", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_ADR", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_AEI", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_AL0", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
|
||||
|
||||
|
@ -229,6 +239,13 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_CID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints/Strs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING, 0,0}, 0,0}},
|
||||
|
||||
{{"_CLS", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (3 Int) */
|
||||
{{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0}, 0, 0}},
|
||||
|
||||
{{"_CPC", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints/Bufs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER, 0, 0}, 0,
|
||||
0}},
|
||||
|
||||
{{"_CRS", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_CRT", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_CSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (1 Int(n), n-1 Int) */
|
||||
|
@ -237,12 +254,21 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_CST", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (1 Int(n), n Pkg (1 Buf/3 Int) */
|
||||
{{{ACPI_PTYPE2_PKG_COUNT,ACPI_RTYPE_BUFFER, 1, ACPI_RTYPE_INTEGER}, 3,0}},
|
||||
|
||||
{{"_CWS", 1, ACPI_RTYPE_INTEGER}},
|
||||
{{"_DCK", 1, ACPI_RTYPE_INTEGER}},
|
||||
{{"_DCS", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_DDC", 1, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER}},
|
||||
{{"_DDN", 0, ACPI_RTYPE_STRING}},
|
||||
{{"_DEP", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}},
|
||||
|
||||
{{"_DGS", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_DIS", 0, 0}},
|
||||
|
||||
{{"_DLM", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (1 Ref, 0/1 Optional Buf/Ref) */
|
||||
{{{ACPI_PTYPE2_FIX_VAR, ACPI_RTYPE_REFERENCE, 1,
|
||||
ACPI_RTYPE_REFERENCE | ACPI_RTYPE_BUFFER}, 0, 0}},
|
||||
|
||||
{{"_DMA", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_DOD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0,0}, 0,0}},
|
||||
|
@ -262,6 +288,7 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_EJ3", 1, 0}},
|
||||
{{"_EJ4", 1, 0}},
|
||||
{{"_EJD", 0, ACPI_RTYPE_STRING}},
|
||||
{{"_EVT", 1, 0}},
|
||||
{{"_FDE", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_FDI", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (16 Int) */
|
||||
{{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16,0}, 0,0}},
|
||||
|
@ -281,14 +308,17 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0}, 0, 0}},
|
||||
|
||||
{{"_GAI", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_GCP", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_GHL", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_GLK", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_GPD", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_GPE", 0, ACPI_RTYPE_INTEGER}}, /* _GPE method, not _GPE scope */
|
||||
{{"_GRT", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_GSB", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_GTF", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_GTM", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_GTS", 1, 0}},
|
||||
{{"_GWS", 1, ACPI_RTYPE_INTEGER}},
|
||||
{{"_HID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
|
||||
{{"_HOT", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_HPP", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (4 Int) */
|
||||
|
@ -303,6 +333,7 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_HPX", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (var Ints) */
|
||||
{{{ACPI_PTYPE2_MIN, ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
|
||||
|
||||
{{"_HRV", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_IFT", 0, ACPI_RTYPE_INTEGER}}, /* See IPMI spec */
|
||||
{{"_INI", 0, 0}},
|
||||
{{"_IRC", 0, 0}},
|
||||
|
@ -361,6 +392,9 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_PR3", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}},
|
||||
|
||||
{{"_PRE", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}},
|
||||
|
||||
{{"_PRL", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}},
|
||||
|
||||
|
@ -391,6 +425,7 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_PSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (5 Int) with count */
|
||||
{{{ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER,0,0}, 0,0}},
|
||||
|
||||
{{"_PSE", 1, 0}},
|
||||
{{"_PSL", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */
|
||||
{{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}},
|
||||
|
||||
|
@ -457,6 +492,7 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_SLI", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_SPD", 1, ACPI_RTYPE_INTEGER}},
|
||||
{{"_SRS", 1, 0}},
|
||||
{{"_SRT", 1, ACPI_RTYPE_INTEGER}},
|
||||
{{"_SRV", 0, ACPI_RTYPE_INTEGER}}, /* See IPMI spec */
|
||||
{{"_SST", 1, 0}},
|
||||
{{"_STA", 0, ACPI_RTYPE_INTEGER}},
|
||||
|
@ -464,6 +500,7 @@ static const union acpi_predefined_info predefined_names[] =
|
|||
{{"_STP", 2, ACPI_RTYPE_INTEGER}},
|
||||
{{"_STR", 0, ACPI_RTYPE_BUFFER}},
|
||||
{{"_STV", 2, ACPI_RTYPE_INTEGER}},
|
||||
{{"_SUB", 0, ACPI_RTYPE_STRING}},
|
||||
{{"_SUN", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_SWS", 0, ACPI_RTYPE_INTEGER}},
|
||||
{{"_TC1", 0, ACPI_RTYPE_INTEGER}},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -73,28 +73,40 @@ typedef const struct acpi_rsconvert_info {
|
|||
|
||||
/* Resource conversion opcodes */
|
||||
|
||||
#define ACPI_RSC_INITGET 0
|
||||
#define ACPI_RSC_INITSET 1
|
||||
#define ACPI_RSC_FLAGINIT 2
|
||||
#define ACPI_RSC_1BITFLAG 3
|
||||
#define ACPI_RSC_2BITFLAG 4
|
||||
#define ACPI_RSC_COUNT 5
|
||||
#define ACPI_RSC_COUNT16 6
|
||||
#define ACPI_RSC_LENGTH 7
|
||||
#define ACPI_RSC_MOVE8 8
|
||||
#define ACPI_RSC_MOVE16 9
|
||||
#define ACPI_RSC_MOVE32 10
|
||||
#define ACPI_RSC_MOVE64 11
|
||||
#define ACPI_RSC_SET8 12
|
||||
#define ACPI_RSC_DATA8 13
|
||||
#define ACPI_RSC_ADDRESS 14
|
||||
#define ACPI_RSC_SOURCE 15
|
||||
#define ACPI_RSC_SOURCEX 16
|
||||
#define ACPI_RSC_BITMASK 17
|
||||
#define ACPI_RSC_BITMASK16 18
|
||||
#define ACPI_RSC_EXIT_NE 19
|
||||
#define ACPI_RSC_EXIT_LE 20
|
||||
#define ACPI_RSC_EXIT_EQ 21
|
||||
typedef enum {
|
||||
ACPI_RSC_INITGET = 0,
|
||||
ACPI_RSC_INITSET,
|
||||
ACPI_RSC_FLAGINIT,
|
||||
ACPI_RSC_1BITFLAG,
|
||||
ACPI_RSC_2BITFLAG,
|
||||
ACPI_RSC_3BITFLAG,
|
||||
ACPI_RSC_ADDRESS,
|
||||
ACPI_RSC_BITMASK,
|
||||
ACPI_RSC_BITMASK16,
|
||||
ACPI_RSC_COUNT,
|
||||
ACPI_RSC_COUNT16,
|
||||
ACPI_RSC_COUNT_GPIO_PIN,
|
||||
ACPI_RSC_COUNT_GPIO_RES,
|
||||
ACPI_RSC_COUNT_GPIO_VEN,
|
||||
ACPI_RSC_COUNT_SERIAL_RES,
|
||||
ACPI_RSC_COUNT_SERIAL_VEN,
|
||||
ACPI_RSC_DATA8,
|
||||
ACPI_RSC_EXIT_EQ,
|
||||
ACPI_RSC_EXIT_LE,
|
||||
ACPI_RSC_EXIT_NE,
|
||||
ACPI_RSC_LENGTH,
|
||||
ACPI_RSC_MOVE_GPIO_PIN,
|
||||
ACPI_RSC_MOVE_GPIO_RES,
|
||||
ACPI_RSC_MOVE_SERIAL_RES,
|
||||
ACPI_RSC_MOVE_SERIAL_VEN,
|
||||
ACPI_RSC_MOVE8,
|
||||
ACPI_RSC_MOVE16,
|
||||
ACPI_RSC_MOVE32,
|
||||
ACPI_RSC_MOVE64,
|
||||
ACPI_RSC_SET8,
|
||||
ACPI_RSC_SOURCE,
|
||||
ACPI_RSC_SOURCEX
|
||||
} ACPI_RSCONVERT_OPCODES;
|
||||
|
||||
/* Resource Conversion sub-opcodes */
|
||||
|
||||
|
@ -106,6 +118,9 @@ typedef const struct acpi_rsconvert_info {
|
|||
#define ACPI_RS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_resource,f)
|
||||
#define AML_OFFSET(f) (u8) ACPI_OFFSET (union aml_resource,f)
|
||||
|
||||
/*
|
||||
* Individual entry for the resource dump tables
|
||||
*/
|
||||
typedef const struct acpi_rsdump_info {
|
||||
u8 opcode;
|
||||
u8 offset;
|
||||
|
@ -116,20 +131,25 @@ typedef const struct acpi_rsdump_info {
|
|||
|
||||
/* Values for the Opcode field above */
|
||||
|
||||
#define ACPI_RSD_TITLE 0
|
||||
#define ACPI_RSD_LITERAL 1
|
||||
#define ACPI_RSD_STRING 2
|
||||
#define ACPI_RSD_UINT8 3
|
||||
#define ACPI_RSD_UINT16 4
|
||||
#define ACPI_RSD_UINT32 5
|
||||
#define ACPI_RSD_UINT64 6
|
||||
#define ACPI_RSD_1BITFLAG 7
|
||||
#define ACPI_RSD_2BITFLAG 8
|
||||
#define ACPI_RSD_SHORTLIST 9
|
||||
#define ACPI_RSD_LONGLIST 10
|
||||
#define ACPI_RSD_DWORDLIST 11
|
||||
#define ACPI_RSD_ADDRESS 12
|
||||
#define ACPI_RSD_SOURCE 13
|
||||
typedef enum {
|
||||
ACPI_RSD_TITLE = 0,
|
||||
ACPI_RSD_1BITFLAG,
|
||||
ACPI_RSD_2BITFLAG,
|
||||
ACPI_RSD_3BITFLAG,
|
||||
ACPI_RSD_ADDRESS,
|
||||
ACPI_RSD_DWORDLIST,
|
||||
ACPI_RSD_LITERAL,
|
||||
ACPI_RSD_LONGLIST,
|
||||
ACPI_RSD_SHORTLIST,
|
||||
ACPI_RSD_SHORTLISTX,
|
||||
ACPI_RSD_SOURCE,
|
||||
ACPI_RSD_STRING,
|
||||
ACPI_RSD_UINT8,
|
||||
ACPI_RSD_UINT16,
|
||||
ACPI_RSD_UINT32,
|
||||
ACPI_RSD_UINT64,
|
||||
ACPI_RSD_WORDLIST
|
||||
} ACPI_RSDUMP_OPCODES;
|
||||
|
||||
/* restore default alignment */
|
||||
|
||||
|
@ -138,13 +158,18 @@ typedef const struct acpi_rsdump_info {
|
|||
/* Resource tables indexed by internal resource type */
|
||||
|
||||
extern const u8 acpi_gbl_aml_resource_sizes[];
|
||||
extern const u8 acpi_gbl_aml_resource_serial_bus_sizes[];
|
||||
extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[];
|
||||
|
||||
/* Resource tables indexed by raw AML resource descriptor type */
|
||||
|
||||
extern const u8 acpi_gbl_resource_struct_sizes[];
|
||||
extern const u8 acpi_gbl_resource_struct_serial_bus_sizes[];
|
||||
extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[];
|
||||
|
||||
extern struct acpi_rsconvert_info
|
||||
*acpi_gbl_convert_resource_serial_bus_dispatch[];
|
||||
|
||||
struct acpi_vendor_walk_info {
|
||||
struct acpi_vendor_uuid *uuid;
|
||||
struct acpi_buffer *buffer;
|
||||
|
@ -190,6 +215,10 @@ acpi_status
|
|||
acpi_rs_set_srs_method_data(struct acpi_namespace_node *node,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
/*
|
||||
* rscalc
|
||||
*/
|
||||
|
@ -293,6 +322,11 @@ extern struct acpi_rsconvert_info acpi_rs_convert_address16[];
|
|||
extern struct acpi_rsconvert_info acpi_rs_convert_ext_irq[];
|
||||
extern struct acpi_rsconvert_info acpi_rs_convert_address64[];
|
||||
extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[];
|
||||
extern struct acpi_rsconvert_info acpi_rs_convert_gpio[];
|
||||
extern struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[];
|
||||
extern struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[];
|
||||
extern struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[];
|
||||
extern struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[];
|
||||
|
||||
/* These resources require separate get/set tables */
|
||||
|
||||
|
@ -310,6 +344,7 @@ extern struct acpi_rsconvert_info acpi_rs_set_vendor[];
|
|||
* rsinfo
|
||||
*/
|
||||
extern struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[];
|
||||
extern struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[];
|
||||
|
||||
/*
|
||||
* rsdump
|
||||
|
@ -331,6 +366,12 @@ extern struct acpi_rsdump_info acpi_rs_dump_address64[];
|
|||
extern struct acpi_rsdump_info acpi_rs_dump_ext_address64[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_gpio[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_fixed_dma[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[];
|
||||
extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[];
|
||||
#endif
|
||||
|
||||
#endif /* __ACRESRC_H__ */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -45,6 +45,7 @@
|
|||
#define _ACUTILS_H
|
||||
|
||||
extern const u8 acpi_gbl_resource_aml_sizes[];
|
||||
extern const u8 acpi_gbl_resource_aml_serial_bus_sizes[];
|
||||
|
||||
/* Strings used by the disassembler and debugger resource dump routines */
|
||||
|
||||
|
@ -578,6 +579,24 @@ acpi_ut_create_list(char *list_name,
|
|||
|
||||
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
|
||||
|
||||
/*
|
||||
* utaddress - address range check
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ut_add_address_range(acpi_adr_space_type space_id,
|
||||
acpi_physical_address address,
|
||||
u32 length, struct acpi_namespace_node *region_node);
|
||||
|
||||
void
|
||||
acpi_ut_remove_address_range(acpi_adr_space_type space_id,
|
||||
struct acpi_namespace_node *region_node);
|
||||
|
||||
u32
|
||||
acpi_ut_check_address_range(acpi_adr_space_type space_id,
|
||||
acpi_physical_address address, u32 length, u8 warn);
|
||||
|
||||
void acpi_ut_delete_address_lists(void);
|
||||
|
||||
/*
|
||||
* utxferror - various error/warning output functions
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -188,6 +188,14 @@
|
|||
#define AML_LLESSEQUAL_OP (u16) 0x9294
|
||||
#define AML_LNOTEQUAL_OP (u16) 0x9293
|
||||
|
||||
/*
|
||||
* Opcodes for "Field" operators
|
||||
*/
|
||||
#define AML_FIELD_OFFSET_OP (u8) 0x00
|
||||
#define AML_FIELD_ACCESS_OP (u8) 0x01
|
||||
#define AML_FIELD_CONNECTION_OP (u8) 0x02 /* ACPI 5.0 */
|
||||
#define AML_FIELD_EXT_ACCESS_OP (u8) 0x03 /* ACPI 5.0 */
|
||||
|
||||
/*
|
||||
* Internal opcodes
|
||||
* Use only "Unknown" AML opcodes, don't attempt to use
|
||||
|
@ -202,6 +210,8 @@
|
|||
#define AML_INT_METHODCALL_OP (u16) 0x0035
|
||||
#define AML_INT_RETURN_VALUE_OP (u16) 0x0036
|
||||
#define AML_INT_EVAL_SUBTREE_OP (u16) 0x0037
|
||||
#define AML_INT_CONNECTION_OP (u16) 0x0038
|
||||
#define AML_INT_EXTACCESSFIELD_OP (u16) 0x0039
|
||||
|
||||
#define ARG_NONE 0x0
|
||||
|
||||
|
@ -456,13 +466,16 @@ typedef enum {
|
|||
* access_as keyword
|
||||
*/
|
||||
typedef enum {
|
||||
AML_FIELD_ATTRIB_SMB_QUICK = 0x02,
|
||||
AML_FIELD_ATTRIB_SMB_SEND_RCV = 0x04,
|
||||
AML_FIELD_ATTRIB_SMB_BYTE = 0x06,
|
||||
AML_FIELD_ATTRIB_SMB_WORD = 0x08,
|
||||
AML_FIELD_ATTRIB_SMB_BLOCK = 0x0A,
|
||||
AML_FIELD_ATTRIB_SMB_WORD_CALL = 0x0C,
|
||||
AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D
|
||||
AML_FIELD_ATTRIB_QUICK = 0x02,
|
||||
AML_FIELD_ATTRIB_SEND_RCV = 0x04,
|
||||
AML_FIELD_ATTRIB_BYTE = 0x06,
|
||||
AML_FIELD_ATTRIB_WORD = 0x08,
|
||||
AML_FIELD_ATTRIB_BLOCK = 0x0A,
|
||||
AML_FIELD_ATTRIB_MULTIBYTE = 0x0B,
|
||||
AML_FIELD_ATTRIB_WORD_CALL = 0x0C,
|
||||
AML_FIELD_ATTRIB_BLOCK_CALL = 0x0D,
|
||||
AML_FIELD_ATTRIB_RAW_BYTES = 0x0E,
|
||||
AML_FIELD_ATTRIB_RAW_PROCESS = 0x0F
|
||||
} AML_ACCESS_ATTRIBUTE;
|
||||
|
||||
/* Bit fields in the AML method_flags byte */
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -58,29 +58,48 @@
|
|||
#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT"
|
||||
#define ACPI_RESTAG_BASEADDRESS "_BAS"
|
||||
#define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */
|
||||
#define ACPI_RESTAG_DEBOUNCETIME "_DBT"
|
||||
#define ACPI_RESTAG_DECODE "_DEC"
|
||||
#define ACPI_RESTAG_DEVICEPOLARITY "_DPL"
|
||||
#define ACPI_RESTAG_DMA "_DMA"
|
||||
#define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */
|
||||
#define ACPI_RESTAG_DRIVESTRENGTH "_DRS"
|
||||
#define ACPI_RESTAG_ENDIANNESS "_END"
|
||||
#define ACPI_RESTAG_FLOWCONTROL "_FLC"
|
||||
#define ACPI_RESTAG_GRANULARITY "_GRA"
|
||||
#define ACPI_RESTAG_INTERRUPT "_INT"
|
||||
#define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */
|
||||
#define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */
|
||||
#define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */
|
||||
#define ACPI_RESTAG_IORESTRICTION "_IOR"
|
||||
#define ACPI_RESTAG_LENGTH "_LEN"
|
||||
#define ACPI_RESTAG_LINE "_LIN"
|
||||
#define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
|
||||
#define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
|
||||
#define ACPI_RESTAG_MAXADDR "_MAX"
|
||||
#define ACPI_RESTAG_MINADDR "_MIN"
|
||||
#define ACPI_RESTAG_MAXTYPE "_MAF"
|
||||
#define ACPI_RESTAG_MINTYPE "_MIF"
|
||||
#define ACPI_RESTAG_MODE "_MOD"
|
||||
#define ACPI_RESTAG_PARITY "_PAR"
|
||||
#define ACPI_RESTAG_PHASE "_PHA"
|
||||
#define ACPI_RESTAG_PIN "_PIN"
|
||||
#define ACPI_RESTAG_PINCONFIG "_PPI"
|
||||
#define ACPI_RESTAG_POLARITY "_POL"
|
||||
#define ACPI_RESTAG_REGISTERBITOFFSET "_RBO"
|
||||
#define ACPI_RESTAG_REGISTERBITWIDTH "_RBW"
|
||||
#define ACPI_RESTAG_RANGETYPE "_RNG"
|
||||
#define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */
|
||||
#define ACPI_RESTAG_LENGTH_RX "_RXL"
|
||||
#define ACPI_RESTAG_LENGTH_TX "_TXL"
|
||||
#define ACPI_RESTAG_SLAVEMODE "_SLV"
|
||||
#define ACPI_RESTAG_SPEED "_SPE"
|
||||
#define ACPI_RESTAG_STOPBITS "_STB"
|
||||
#define ACPI_RESTAG_TRANSLATION "_TRA"
|
||||
#define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */
|
||||
#define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */
|
||||
#define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */
|
||||
#define ACPI_RESTAG_VENDORDATA "_VEN"
|
||||
|
||||
/* Default sizes for "small" resource descriptors */
|
||||
|
||||
|
@ -90,6 +109,7 @@
|
|||
#define ASL_RDESC_END_DEPEND_SIZE 0x00
|
||||
#define ASL_RDESC_IO_SIZE 0x07
|
||||
#define ASL_RDESC_FIXED_IO_SIZE 0x03
|
||||
#define ASL_RDESC_FIXED_DMA_SIZE 0x05
|
||||
#define ASL_RDESC_END_TAG_SIZE 0x01
|
||||
|
||||
struct asl_resource_node {
|
||||
|
@ -164,6 +184,12 @@ struct aml_resource_end_tag {
|
|||
AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum;
|
||||
};
|
||||
|
||||
struct aml_resource_fixed_dma {
|
||||
AML_RESOURCE_SMALL_HEADER_COMMON u16 request_lines;
|
||||
u16 channels;
|
||||
u8 width;
|
||||
};
|
||||
|
||||
/*
|
||||
* LARGE descriptors
|
||||
*/
|
||||
|
@ -263,6 +289,110 @@ struct aml_resource_generic_register {
|
|||
u64 address;
|
||||
};
|
||||
|
||||
/* Common descriptor for gpio_int and gpio_io (ACPI 5.0) */
|
||||
|
||||
struct aml_resource_gpio {
|
||||
AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id;
|
||||
u8 connection_type;
|
||||
u16 flags;
|
||||
u16 int_flags;
|
||||
u8 pin_config;
|
||||
u16 drive_strength;
|
||||
u16 debounce_timeout;
|
||||
u16 pin_table_offset;
|
||||
u8 res_source_index;
|
||||
u16 res_source_offset;
|
||||
u16 vendor_offset;
|
||||
u16 vendor_length;
|
||||
/*
|
||||
* Optional fields follow immediately:
|
||||
* 1) PIN list (Words)
|
||||
* 2) Resource Source String
|
||||
* 3) Vendor Data bytes
|
||||
*/
|
||||
};
|
||||
|
||||
#define AML_RESOURCE_GPIO_REVISION 1 /* ACPI 5.0 */
|
||||
|
||||
/* Values for connection_type above */
|
||||
|
||||
#define AML_RESOURCE_GPIO_TYPE_INT 0
|
||||
#define AML_RESOURCE_GPIO_TYPE_IO 1
|
||||
#define AML_RESOURCE_MAX_GPIOTYPE 1
|
||||
|
||||
/* Common preamble for all serial descriptors (ACPI 5.0) */
|
||||
|
||||
#define AML_RESOURCE_SERIAL_COMMON \
|
||||
u8 revision_id; \
|
||||
u8 res_source_index; \
|
||||
u8 type; \
|
||||
u8 flags; \
|
||||
u16 type_specific_flags; \
|
||||
u8 type_revision_id; \
|
||||
u16 type_data_length; \
|
||||
|
||||
/* Values for the type field above */
|
||||
|
||||
#define AML_RESOURCE_I2C_SERIALBUSTYPE 1
|
||||
#define AML_RESOURCE_SPI_SERIALBUSTYPE 2
|
||||
#define AML_RESOURCE_UART_SERIALBUSTYPE 3
|
||||
#define AML_RESOURCE_MAX_SERIALBUSTYPE 3
|
||||
#define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */
|
||||
|
||||
struct aml_resource_common_serialbus {
|
||||
AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON};
|
||||
|
||||
struct aml_resource_i2c_serialbus {
|
||||
AML_RESOURCE_LARGE_HEADER_COMMON
|
||||
AML_RESOURCE_SERIAL_COMMON u32 connection_speed;
|
||||
u16 slave_address;
|
||||
/*
|
||||
* Optional fields follow immediately:
|
||||
* 1) Vendor Data bytes
|
||||
* 2) Resource Source String
|
||||
*/
|
||||
};
|
||||
|
||||
#define AML_RESOURCE_I2C_REVISION 1 /* ACPI 5.0 */
|
||||
#define AML_RESOURCE_I2C_TYPE_REVISION 1 /* ACPI 5.0 */
|
||||
#define AML_RESOURCE_I2C_MIN_DATA_LEN 6
|
||||
|
||||
struct aml_resource_spi_serialbus {
|
||||
AML_RESOURCE_LARGE_HEADER_COMMON
|
||||
AML_RESOURCE_SERIAL_COMMON u32 connection_speed;
|
||||
u8 data_bit_length;
|
||||
u8 clock_phase;
|
||||
u8 clock_polarity;
|
||||
u16 device_selection;
|
||||
/*
|
||||
* Optional fields follow immediately:
|
||||
* 1) Vendor Data bytes
|
||||
* 2) Resource Source String
|
||||
*/
|
||||
};
|
||||
|
||||
#define AML_RESOURCE_SPI_REVISION 1 /* ACPI 5.0 */
|
||||
#define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */
|
||||
#define AML_RESOURCE_SPI_MIN_DATA_LEN 9
|
||||
|
||||
struct aml_resource_uart_serialbus {
|
||||
AML_RESOURCE_LARGE_HEADER_COMMON
|
||||
AML_RESOURCE_SERIAL_COMMON u32 default_baud_rate;
|
||||
u16 rx_fifo_size;
|
||||
u16 tx_fifo_size;
|
||||
u8 parity;
|
||||
u8 lines_enabled;
|
||||
/*
|
||||
* Optional fields follow immediately:
|
||||
* 1) Vendor Data bytes
|
||||
* 2) Resource Source String
|
||||
*/
|
||||
};
|
||||
|
||||
#define AML_RESOURCE_UART_REVISION 1 /* ACPI 5.0 */
|
||||
#define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */
|
||||
#define AML_RESOURCE_UART_MIN_DATA_LEN 10
|
||||
|
||||
/* restore default alignment */
|
||||
|
||||
#pragma pack()
|
||||
|
@ -284,6 +414,7 @@ union aml_resource {
|
|||
struct aml_resource_end_dependent end_dpf;
|
||||
struct aml_resource_io io;
|
||||
struct aml_resource_fixed_io fixed_io;
|
||||
struct aml_resource_fixed_dma fixed_dma;
|
||||
struct aml_resource_vendor_small vendor_small;
|
||||
struct aml_resource_end_tag end_tag;
|
||||
|
||||
|
@ -299,6 +430,11 @@ union aml_resource {
|
|||
struct aml_resource_address64 address64;
|
||||
struct aml_resource_extended_address64 ext_address64;
|
||||
struct aml_resource_extended_irq extended_irq;
|
||||
struct aml_resource_gpio gpio;
|
||||
struct aml_resource_i2c_serialbus i2c_serial_bus;
|
||||
struct aml_resource_spi_serialbus spi_serial_bus;
|
||||
struct aml_resource_uart_serialbus uart_serial_bus;
|
||||
struct aml_resource_common_serialbus common_serial_bus;
|
||||
|
||||
/* Utility overlays */
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -250,6 +250,13 @@ acpi_ds_get_bank_field_arguments(union acpi_operand_object *obj_desc)
|
|||
status = acpi_ds_execute_arguments(node, node->parent,
|
||||
extra_desc->extra.aml_length,
|
||||
extra_desc->extra.aml_start);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
status = acpi_ut_add_address_range(obj_desc->region.space_id,
|
||||
obj_desc->region.address,
|
||||
obj_desc->region.length, node);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
|
@ -384,8 +391,15 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
|
|||
|
||||
/* Execute the argument AML */
|
||||
|
||||
status = acpi_ds_execute_arguments(node, node->parent,
|
||||
status = acpi_ds_execute_arguments(node, extra_desc->extra.scope_node,
|
||||
extra_desc->extra.aml_length,
|
||||
extra_desc->extra.aml_start);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
status = acpi_ut_add_address_range(obj_desc->region.space_id,
|
||||
obj_desc->region.address,
|
||||
obj_desc->region.length, node);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -221,6 +221,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
|
|||
{
|
||||
acpi_status status;
|
||||
u64 position;
|
||||
union acpi_parse_object *child;
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR(ds_get_field_names, info);
|
||||
|
||||
|
@ -232,10 +233,11 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
|
|||
|
||||
while (arg) {
|
||||
/*
|
||||
* Three types of field elements are handled:
|
||||
* 1) Offset - specifies a bit offset
|
||||
* 2) access_as - changes the access mode
|
||||
* 3) Name - Enters a new named field into the namespace
|
||||
* Four types of field elements are handled:
|
||||
* 1) Name - Enters a new named field into the namespace
|
||||
* 2) Offset - specifies a bit offset
|
||||
* 3) access_as - changes the access mode/attributes
|
||||
* 4) Connection - Associate a resource template with the field
|
||||
*/
|
||||
switch (arg->common.aml_opcode) {
|
||||
case AML_INT_RESERVEDFIELD_OP:
|
||||
|
@ -253,21 +255,70 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
|
|||
break;
|
||||
|
||||
case AML_INT_ACCESSFIELD_OP:
|
||||
|
||||
case AML_INT_EXTACCESSFIELD_OP:
|
||||
/*
|
||||
* Get a new access_type and access_attribute -- to be used for all
|
||||
* field units that follow, until field end or another access_as
|
||||
* keyword.
|
||||
* Get new access_type, access_attribute, and access_length fields
|
||||
* -- to be used for all field units that follow, until the
|
||||
* end-of-field or another access_as keyword is encountered.
|
||||
* NOTE. These three bytes are encoded in the integer value
|
||||
* of the parseop for convenience.
|
||||
*
|
||||
* In field_flags, preserve the flag bits other than the
|
||||
* ACCESS_TYPE bits
|
||||
* ACCESS_TYPE bits.
|
||||
*/
|
||||
|
||||
/* access_type (byte_acc, word_acc, etc.) */
|
||||
|
||||
info->field_flags = (u8)
|
||||
((info->
|
||||
field_flags & ~(AML_FIELD_ACCESS_TYPE_MASK)) |
|
||||
((u8) ((u32) arg->common.value.integer >> 8)));
|
||||
((u8)((u32)(arg->common.value.integer & 0x07))));
|
||||
|
||||
info->attribute = (u8) (arg->common.value.integer);
|
||||
/* access_attribute (attrib_quick, attrib_byte, etc.) */
|
||||
|
||||
info->attribute =
|
||||
(u8)((arg->common.value.integer >> 8) & 0xFF);
|
||||
|
||||
/* access_length (for serial/buffer protocols) */
|
||||
|
||||
info->access_length =
|
||||
(u8)((arg->common.value.integer >> 16) & 0xFF);
|
||||
break;
|
||||
|
||||
case AML_INT_CONNECTION_OP:
|
||||
/*
|
||||
* Clear any previous connection. New connection is used for all
|
||||
* fields that follow, similar to access_as
|
||||
*/
|
||||
info->resource_buffer = NULL;
|
||||
info->connection_node = NULL;
|
||||
|
||||
/*
|
||||
* A Connection() is either an actual resource descriptor (buffer)
|
||||
* or a named reference to a resource template
|
||||
*/
|
||||
child = arg->common.value.arg;
|
||||
if (child->common.aml_opcode == AML_INT_BYTELIST_OP) {
|
||||
info->resource_buffer = child->named.data;
|
||||
info->resource_length =
|
||||
(u16)child->named.value.integer;
|
||||
} else {
|
||||
/* Lookup the Connection() namepath, it should already exist */
|
||||
|
||||
status = acpi_ns_lookup(walk_state->scope_info,
|
||||
child->common.value.
|
||||
name, ACPI_TYPE_ANY,
|
||||
ACPI_IMODE_EXECUTE,
|
||||
ACPI_NS_DONT_OPEN_SCOPE,
|
||||
walk_state,
|
||||
&info->connection_node);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_ERROR_NAMESPACE(child->common.
|
||||
value.name,
|
||||
status);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case AML_INT_NAMEDFIELD_OP:
|
||||
|
@ -374,6 +425,8 @@ acpi_ds_create_field(union acpi_parse_object *op,
|
|||
}
|
||||
}
|
||||
|
||||
ACPI_MEMSET(&info, 0, sizeof(struct acpi_create_field_info));
|
||||
|
||||
/* Second arg is the field flags */
|
||||
|
||||
arg = arg->common.next;
|
||||
|
@ -386,7 +439,6 @@ acpi_ds_create_field(union acpi_parse_object *op,
|
|||
info.region_node = region_node;
|
||||
|
||||
status = acpi_ds_get_field_names(&info, walk_state, arg->common.next);
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
|
@ -474,8 +526,8 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
|
|||
*/
|
||||
while (arg) {
|
||||
/*
|
||||
* Ignore OFFSET and ACCESSAS terms here; we are only interested in the
|
||||
* field names in order to enter them into the namespace.
|
||||
* Ignore OFFSET/ACCESSAS/CONNECTION terms here; we are only interested
|
||||
* in the field names in order to enter them into the namespace.
|
||||
*/
|
||||
if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) {
|
||||
status = acpi_ns_lookup(walk_state->scope_info,
|
||||
|
@ -651,6 +703,5 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
|
|||
info.region_node = region_node;
|
||||
|
||||
status = acpi_ds_get_field_names(&info, walk_state, arg->common.next);
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -71,6 +71,12 @@ acpi_status acpi_ev_initialize_events(void)
|
|||
|
||||
ACPI_FUNCTION_TRACE(ev_initialize_events);
|
||||
|
||||
/* If Hardware Reduced flag is set, there are no fixed events */
|
||||
|
||||
if (acpi_gbl_reduced_hardware) {
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the Fixed and General Purpose Events. This is done prior to
|
||||
* enabling SCIs to prevent interrupts from occurring before the handlers
|
||||
|
@ -111,6 +117,12 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
|
|||
|
||||
ACPI_FUNCTION_TRACE(ev_install_xrupt_handlers);
|
||||
|
||||
/* If Hardware Reduced flag is set, there is no ACPI h/w */
|
||||
|
||||
if (acpi_gbl_reduced_hardware) {
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
/* Install the SCI handler */
|
||||
|
||||
status = acpi_ev_install_sci_handler();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -70,6 +70,12 @@ acpi_status acpi_ev_init_global_lock_handler(void)
|
|||
|
||||
ACPI_FUNCTION_TRACE(ev_init_global_lock_handler);
|
||||
|
||||
/* If Hardware Reduced flag is set, there is no global lock */
|
||||
|
||||
if (acpi_gbl_reduced_hardware) {
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
/* Attempt installation of the global lock handler */
|
||||
|
||||
status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -329,6 +329,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
|
|||
* FUNCTION: acpi_ev_address_space_dispatch
|
||||
*
|
||||
* PARAMETERS: region_obj - Internal region object
|
||||
* field_obj - Corresponding field. Can be NULL.
|
||||
* Function - Read or Write operation
|
||||
* region_offset - Where in the region to read or write
|
||||
* bit_width - Field width in bits (8, 16, 32, or 64)
|
||||
|
@ -344,6 +345,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
|
|||
|
||||
acpi_status
|
||||
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
||||
union acpi_operand_object *field_obj,
|
||||
u32 function,
|
||||
u32 region_offset, u32 bit_width, u64 *value)
|
||||
{
|
||||
|
@ -353,6 +355,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
union acpi_operand_object *handler_desc;
|
||||
union acpi_operand_object *region_obj2;
|
||||
void *region_context = NULL;
|
||||
struct acpi_connection_info *context;
|
||||
|
||||
ACPI_FUNCTION_TRACE(ev_address_space_dispatch);
|
||||
|
||||
|
@ -375,6 +378,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
return_ACPI_STATUS(AE_NOT_EXIST);
|
||||
}
|
||||
|
||||
context = handler_desc->address_space.context;
|
||||
|
||||
/*
|
||||
* It may be the case that the region has never been initialized.
|
||||
* Some types of regions require special init code
|
||||
|
@ -404,8 +409,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
acpi_ex_exit_interpreter();
|
||||
|
||||
status = region_setup(region_obj, ACPI_REGION_ACTIVATE,
|
||||
handler_desc->address_space.context,
|
||||
®ion_context);
|
||||
context, ®ion_context);
|
||||
|
||||
/* Re-enter the interpreter */
|
||||
|
||||
|
@ -455,6 +459,25 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
acpi_ut_get_region_name(region_obj->region.
|
||||
space_id)));
|
||||
|
||||
/*
|
||||
* Special handling for generic_serial_bus and general_purpose_io:
|
||||
* There are three extra parameters that must be passed to the
|
||||
* handler via the context:
|
||||
* 1) Connection buffer, a resource template from Connection() op.
|
||||
* 2) Length of the above buffer.
|
||||
* 3) Actual access length from the access_as() op.
|
||||
*/
|
||||
if (((region_obj->region.space_id == ACPI_ADR_SPACE_GSBUS) ||
|
||||
(region_obj->region.space_id == ACPI_ADR_SPACE_GPIO)) &&
|
||||
context && field_obj) {
|
||||
|
||||
/* Get the Connection (resource_template) buffer */
|
||||
|
||||
context->connection = field_obj->field.resource_buffer;
|
||||
context->length = field_obj->field.resource_length;
|
||||
context->access_length = field_obj->field.access_length;
|
||||
}
|
||||
|
||||
if (!(handler_desc->address_space.handler_flags &
|
||||
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) {
|
||||
/*
|
||||
|
@ -469,7 +492,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
|
||||
status = handler(function,
|
||||
(region_obj->region.address + region_offset),
|
||||
bit_width, value, handler_desc->address_space.context,
|
||||
bit_width, value, context,
|
||||
region_obj2->extra.region_context);
|
||||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -297,9 +297,9 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)
|
|||
/* Bytewise reads */
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
status = acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
|
||||
region_offset, 8,
|
||||
&value);
|
||||
status =
|
||||
acpi_ev_address_space_dispatch(obj_desc, NULL, ACPI_READ,
|
||||
region_offset, 8, &value);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -267,7 +267,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
|
|||
*
|
||||
* PARAMETERS: aml_start - Pointer to the region declaration AML
|
||||
* aml_length - Max length of the declaration AML
|
||||
* region_space - space_iD for the region
|
||||
* space_id - Address space ID for the region
|
||||
* walk_state - Current state
|
||||
*
|
||||
* RETURN: Status
|
||||
|
@ -279,7 +279,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
|
|||
acpi_status
|
||||
acpi_ex_create_region(u8 * aml_start,
|
||||
u32 aml_length,
|
||||
u8 region_space, struct acpi_walk_state *walk_state)
|
||||
u8 space_id, struct acpi_walk_state *walk_state)
|
||||
{
|
||||
acpi_status status;
|
||||
union acpi_operand_object *obj_desc;
|
||||
|
@ -304,16 +304,19 @@ acpi_ex_create_region(u8 * aml_start,
|
|||
* Space ID must be one of the predefined IDs, or in the user-defined
|
||||
* range
|
||||
*/
|
||||
if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) &&
|
||||
(region_space < ACPI_USER_REGION_BEGIN) &&
|
||||
(region_space != ACPI_ADR_SPACE_DATA_TABLE)) {
|
||||
ACPI_ERROR((AE_INFO, "Invalid AddressSpace type 0x%X",
|
||||
region_space));
|
||||
return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID);
|
||||
if (!acpi_is_valid_space_id(space_id)) {
|
||||
/*
|
||||
* Print an error message, but continue. We don't want to abort
|
||||
* a table load for this exception. Instead, if the region is
|
||||
* actually used at runtime, abort the executing method.
|
||||
*/
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"Invalid/unknown Address Space ID: 0x%2.2X",
|
||||
space_id));
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n",
|
||||
acpi_ut_get_region_name(region_space), region_space));
|
||||
acpi_ut_get_region_name(space_id), space_id));
|
||||
|
||||
/* Create the region descriptor */
|
||||
|
||||
|
@ -330,10 +333,16 @@ acpi_ex_create_region(u8 * aml_start,
|
|||
region_obj2 = obj_desc->common.next_object;
|
||||
region_obj2->extra.aml_start = aml_start;
|
||||
region_obj2->extra.aml_length = aml_length;
|
||||
if (walk_state->scope_info) {
|
||||
region_obj2->extra.scope_node =
|
||||
walk_state->scope_info->scope.node;
|
||||
} else {
|
||||
region_obj2->extra.scope_node = node;
|
||||
}
|
||||
|
||||
/* Init the region from the operands */
|
||||
|
||||
obj_desc->region.space_id = region_space;
|
||||
obj_desc->region.space_id = space_id;
|
||||
obj_desc->region.address = 0;
|
||||
obj_desc->region.length = 0;
|
||||
obj_desc->region.node = node;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -192,10 +192,13 @@ static struct acpi_exdump_info acpi_ex_dump_buffer_field[3] = {
|
|||
"Buffer Object"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_region_field[3] = {
|
||||
static struct acpi_exdump_info acpi_ex_dump_region_field[5] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region_field), NULL},
|
||||
{ACPI_EXD_FIELD, 0, NULL},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"}
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(field.access_length), "AccessLength"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.resource_buffer),
|
||||
"ResourceBuffer"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_bank_field[5] = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -100,18 +100,25 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
|
|||
(obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_SMBUS
|
||||
|| obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_GSBUS
|
||||
|| obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_IPMI)) {
|
||||
/*
|
||||
* This is an SMBus or IPMI read. We must create a buffer to hold
|
||||
* This is an SMBus, GSBus or IPMI read. We must create a buffer to hold
|
||||
* the data and then directly access the region handler.
|
||||
*
|
||||
* Note: Smbus protocol value is passed in upper 16-bits of Function
|
||||
* Note: SMBus and GSBus protocol value is passed in upper 16-bits of Function
|
||||
*/
|
||||
if (obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_SMBUS) {
|
||||
length = ACPI_SMBUS_BUFFER_SIZE;
|
||||
function =
|
||||
ACPI_READ | (obj_desc->field.attribute << 16);
|
||||
} else if (obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_GSBUS) {
|
||||
length = ACPI_GSBUS_BUFFER_SIZE;
|
||||
function =
|
||||
ACPI_READ | (obj_desc->field.attribute << 16);
|
||||
} else { /* IPMI */
|
||||
|
||||
length = ACPI_IPMI_BUFFER_SIZE;
|
||||
|
@ -248,21 +255,23 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
|
|||
(obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_SMBUS
|
||||
|| obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_GSBUS
|
||||
|| obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_IPMI)) {
|
||||
/*
|
||||
* This is an SMBus or IPMI write. We will bypass the entire field
|
||||
* This is an SMBus, GSBus or IPMI write. We will bypass the entire field
|
||||
* mechanism and handoff the buffer directly to the handler. For
|
||||
* these address spaces, the buffer is bi-directional; on a write,
|
||||
* return data is returned in the same buffer.
|
||||
*
|
||||
* Source must be a buffer of sufficient size:
|
||||
* ACPI_SMBUS_BUFFER_SIZE or ACPI_IPMI_BUFFER_SIZE.
|
||||
* ACPI_SMBUS_BUFFER_SIZE, ACPI_GSBUS_BUFFER_SIZE, or ACPI_IPMI_BUFFER_SIZE.
|
||||
*
|
||||
* Note: SMBus protocol type is passed in upper 16-bits of Function
|
||||
* Note: SMBus and GSBus protocol type is passed in upper 16-bits of Function
|
||||
*/
|
||||
if (source_desc->common.type != ACPI_TYPE_BUFFER) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"SMBus or IPMI write requires Buffer, found type %s",
|
||||
"SMBus/IPMI/GenericSerialBus write requires Buffer, found type %s",
|
||||
acpi_ut_get_object_type_name(source_desc)));
|
||||
|
||||
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
|
||||
|
@ -273,6 +282,11 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
|
|||
length = ACPI_SMBUS_BUFFER_SIZE;
|
||||
function =
|
||||
ACPI_WRITE | (obj_desc->field.attribute << 16);
|
||||
} else if (obj_desc->field.region_obj->region.space_id ==
|
||||
ACPI_ADR_SPACE_GSBUS) {
|
||||
length = ACPI_GSBUS_BUFFER_SIZE;
|
||||
function =
|
||||
ACPI_WRITE | (obj_desc->field.attribute << 16);
|
||||
} else { /* IPMI */
|
||||
|
||||
length = ACPI_IPMI_BUFFER_SIZE;
|
||||
|
@ -281,7 +295,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
|
|||
|
||||
if (source_desc->buffer.length < length) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"SMBus or IPMI write requires Buffer of length %u, found length %u",
|
||||
"SMBus/IPMI/GenericSerialBus write requires Buffer of length %u, found length %u",
|
||||
length, source_desc->buffer.length));
|
||||
|
||||
return_ACPI_STATUS(AE_AML_BUFFER_LIMIT);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -86,6 +86,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
|
|||
{
|
||||
acpi_status status = AE_OK;
|
||||
union acpi_operand_object *rgn_desc;
|
||||
u8 space_id;
|
||||
|
||||
ACPI_FUNCTION_TRACE_U32(ex_setup_region, field_datum_byte_offset);
|
||||
|
||||
|
@ -101,6 +102,17 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
|
|||
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
space_id = rgn_desc->region.space_id;
|
||||
|
||||
/* Validate the Space ID */
|
||||
|
||||
if (!acpi_is_valid_space_id(space_id)) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"Invalid/unknown Address Space ID: 0x%2.2X",
|
||||
space_id));
|
||||
return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the Region Address and Length have not been previously evaluated,
|
||||
* evaluate them now and save the results.
|
||||
|
@ -119,11 +131,12 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
|
|||
}
|
||||
|
||||
/*
|
||||
* Exit now for SMBus or IPMI address space, it has a non-linear
|
||||
* Exit now for SMBus, GSBus or IPMI address space, it has a non-linear
|
||||
* address space and the request cannot be directly validated
|
||||
*/
|
||||
if (rgn_desc->region.space_id == ACPI_ADR_SPACE_SMBUS ||
|
||||
rgn_desc->region.space_id == ACPI_ADR_SPACE_IPMI) {
|
||||
if (space_id == ACPI_ADR_SPACE_SMBUS ||
|
||||
space_id == ACPI_ADR_SPACE_GSBUS ||
|
||||
space_id == ACPI_ADR_SPACE_IPMI) {
|
||||
|
||||
/* SMBus or IPMI has a non-linear address space */
|
||||
|
||||
|
@ -271,11 +284,12 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
|
|||
|
||||
/* Invoke the appropriate address_space/op_region handler */
|
||||
|
||||
status =
|
||||
acpi_ev_address_space_dispatch(rgn_desc, function, region_offset,
|
||||
ACPI_MUL_8(obj_desc->common_field.
|
||||
access_byte_width),
|
||||
value);
|
||||
status = acpi_ev_address_space_dispatch(rgn_desc, obj_desc,
|
||||
function, region_offset,
|
||||
ACPI_MUL_8(obj_desc->
|
||||
common_field.
|
||||
access_byte_width),
|
||||
value);
|
||||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
if (status == AE_NOT_IMPLEMENTED) {
|
||||
|
@ -316,6 +330,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
|
|||
static u8
|
||||
acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value)
|
||||
{
|
||||
ACPI_FUNCTION_NAME(ex_register_overflow);
|
||||
|
||||
if (obj_desc->common_field.bit_length >= ACPI_INTEGER_BIT_SIZE) {
|
||||
/*
|
||||
|
@ -330,6 +345,11 @@ acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value)
|
|||
* The Value is larger than the maximum value that can fit into
|
||||
* the register.
|
||||
*/
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"Index value 0x%8.8X%8.8X overflows field width 0x%X",
|
||||
ACPI_FORMAT_UINT64(value),
|
||||
obj_desc->common_field.bit_length));
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -47,6 +47,7 @@
|
|||
#include "acinterp.h"
|
||||
#include "amlcode.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acdispat.h"
|
||||
|
||||
#define _COMPONENT ACPI_EXECUTER
|
||||
ACPI_MODULE_NAME("exprep")
|
||||
|
@ -455,6 +456,30 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
|
|||
obj_desc->field.region_obj =
|
||||
acpi_ns_get_attached_object(info->region_node);
|
||||
|
||||
/* Fields specific to generic_serial_bus fields */
|
||||
|
||||
obj_desc->field.access_length = info->access_length;
|
||||
|
||||
if (info->connection_node) {
|
||||
second_desc = info->connection_node->object;
|
||||
if (!(second_desc->common.flags & AOPOBJ_DATA_VALID)) {
|
||||
status =
|
||||
acpi_ds_get_buffer_arguments(second_desc);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_ut_delete_object_desc(obj_desc);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
}
|
||||
|
||||
obj_desc->field.resource_buffer =
|
||||
second_desc->buffer.pointer;
|
||||
obj_desc->field.resource_length =
|
||||
(u16)second_desc->buffer.length;
|
||||
} else if (info->resource_buffer) {
|
||||
obj_desc->field.resource_buffer = info->resource_buffer;
|
||||
obj_desc->field.resource_length = info->resource_length;
|
||||
}
|
||||
|
||||
/* Allow full data read from EC address space */
|
||||
|
||||
if ((obj_desc->field.region_obj->region.space_id ==
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -435,4 +435,29 @@ void acpi_ex_integer_to_string(char *out_string, u64 value)
|
|||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_is_valid_space_id
|
||||
*
|
||||
* PARAMETERS: space_id - ID to be validated
|
||||
*
|
||||
* RETURN: TRUE if valid/supported ID.
|
||||
*
|
||||
* DESCRIPTION: Validate an operation region space_iD.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
u8 acpi_is_valid_space_id(u8 space_id)
|
||||
{
|
||||
|
||||
if ((space_id >= ACPI_NUM_PREDEFINED_REGIONS) &&
|
||||
(space_id < ACPI_USER_REGION_BEGIN) &&
|
||||
(space_id != ACPI_ADR_SPACE_DATA_TABLE) &&
|
||||
(space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -134,6 +134,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
|
|||
/* Supported widths are 8/16/32 */
|
||||
|
||||
if ((bit_width != 8) && (bit_width != 16) && (bit_width != 32)) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"Bad BitWidth parameter: %8.8X", bit_width));
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -620,6 +620,7 @@ acpi_ns_check_package(struct acpi_predefined_data *data,
|
|||
case ACPI_PTYPE2_FIXED:
|
||||
case ACPI_PTYPE2_MIN:
|
||||
case ACPI_PTYPE2_COUNT:
|
||||
case ACPI_PTYPE2_FIX_VAR:
|
||||
|
||||
/*
|
||||
* These types all return a single Package that consists of a
|
||||
|
@ -759,6 +760,34 @@ acpi_ns_check_package_list(struct acpi_predefined_data *data,
|
|||
}
|
||||
break;
|
||||
|
||||
case ACPI_PTYPE2_FIX_VAR:
|
||||
/*
|
||||
* Each subpackage has a fixed number of elements and an
|
||||
* optional element
|
||||
*/
|
||||
expected_count =
|
||||
package->ret_info.count1 + package->ret_info.count2;
|
||||
if (sub_package->package.count < expected_count) {
|
||||
goto package_too_small;
|
||||
}
|
||||
|
||||
status =
|
||||
acpi_ns_check_package_elements(data, sub_elements,
|
||||
package->ret_info.
|
||||
object_type1,
|
||||
package->ret_info.
|
||||
count1,
|
||||
package->ret_info.
|
||||
object_type2,
|
||||
sub_package->package.
|
||||
count -
|
||||
package->ret_info.
|
||||
count1, 0);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return (status);
|
||||
}
|
||||
break;
|
||||
|
||||
case ACPI_PTYPE2_FIXED:
|
||||
|
||||
/* Each sub-package has a fixed length */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2011, Intel Corp.
|
||||
* Copyright (C) 2000 - 2012, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -634,6 +634,7 @@ acpi_ns_remove_null_elements(struct acpi_predefined_data *data,
|
|||
case ACPI_PTYPE2_FIXED:
|
||||
case ACPI_PTYPE2_MIN:
|
||||
case ACPI_PTYPE2_REV_FIXED:
|
||||
case ACPI_PTYPE2_FIX_VAR:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче