aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-27 17:51:45 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-27 17:51:45 -0400
commit92a18409ba03c1f810b831919596122c60586bc5 (patch)
tree0eddbcbf9f0f372b0c8bad3fd4e9fc7f351f8df6 /include
parent64aa90f26c06e1cb2aacfb98a7d0eccfbd6c1a91 (diff)
parentc12f07d17c12193256a99e20c9a0f130fb8f7be8 (diff)
Merge branch 'acpica'
* acpica: (30 commits) ACPICA: Add new GPE public interface - acpi_mark_gpe_for_wake. ACPICA: GPEs: Do not allow enable for GPEs that have no handler(s). ACPICA: Fix a regression for deletion of Alias() objects. ACPICA: Update version to 20140627 ACPICA: Tables: Merge DMAR table structure updates ACPICA: Hardware: back port of a recursive locking fix ACPICA: utprint/oslibcfs: cleanup - no functional change ACPICA: Executer: Fix trivial issues in acpi_get_serial_access_bytes() ACPICA: OSL: Update acpidump to reduce source code differences ACPICA: acpidump: Reduce freopen() invocations to improve portability ACPICA: acpidump: Replace file IOs with new APIs to improve portability ACPICA: acpidump: Remove exit() from generic layer to improve portability ACPICA: acpidump: Add memory/string OSL usage to improve portability ACPICA: Common: Enhance acpi_getopt() to improve portability ACPICA: Common: Enhance cm_get_file_size() to improve portability ACPICA: Application: Enhance ACPI_USAGE_xxx/ACPI_OPTION with acpi_os_printf() to improve portability ACPICA: Utilities: Introduce acpi_log_error() to improve portability ACPICA: Utilities: Add formatted printing APIs ACPICA: OSL: Add portable file IO to improve portability ACPICA: OSL: Clean up acpi_os_printf()/acpi_os_vprintf() stubs ...
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpiosxf.h31
-rw-r--r--include/acpi/acpixf.h26
-rw-r--r--include/acpi/actbl1.h14
-rw-r--r--include/acpi/actbl2.h2
-rw-r--r--include/acpi/actypes.h14
-rw-r--r--include/acpi/ghes.h2
-rw-r--r--include/acpi/platform/acenv.h53
7 files changed, 120 insertions, 22 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index f6f5f8af2112..03b3e6d405ff 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -399,4 +399,35 @@ char *acpi_os_get_next_filename(void *dir_handle);
399void acpi_os_close_directory(void *dir_handle); 399void acpi_os_close_directory(void *dir_handle);
400#endif 400#endif
401 401
402/*
403 * File I/O and related support
404 */
405#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_file
406ACPI_FILE acpi_os_open_file(const char *path, u8 modes);
407#endif
408
409#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_file
410void acpi_os_close_file(ACPI_FILE file);
411#endif
412
413#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_file
414int
415acpi_os_read_file(ACPI_FILE file,
416 void *buffer, acpi_size size, acpi_size count);
417#endif
418
419#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_file
420int
421acpi_os_write_file(ACPI_FILE file,
422 void *buffer, acpi_size size, acpi_size count);
423#endif
424
425#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_file_offset
426long acpi_os_get_file_offset(ACPI_FILE file);
427#endif
428
429#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_set_file_offset
430acpi_status acpi_os_set_file_offset(ACPI_FILE file, long offset, u8 from);
431#endif
432
402#endif /* __ACPIOSXF_H__ */ 433#endif /* __ACPIOSXF_H__ */
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 35b525c19711..508e5649dda9 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,7 +46,7 @@
46 46
47/* Current ACPICA subsystem version in YYYYMMDD format */ 47/* Current ACPICA subsystem version in YYYYMMDD format */
48 48
49#define ACPI_CA_VERSION 0x20140424 49#define ACPI_CA_VERSION 0x20140627
50 50
51#include <acpi/acconfig.h> 51#include <acpi/acconfig.h>
52#include <acpi/actypes.h> 52#include <acpi/actypes.h>
@@ -335,6 +335,23 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
335 335
336#endif /* ACPI_DEBUG_OUTPUT */ 336#endif /* ACPI_DEBUG_OUTPUT */
337 337
338/*
339 * Application prototypes
340 *
341 * All interfaces used by application will be configured
342 * out of the ACPICA build unless the ACPI_APPLICATION
343 * flag is defined.
344 */
345#ifdef ACPI_APPLICATION
346#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
347 prototype;
348
349#else
350#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
351 static ACPI_INLINE prototype {return;}
352
353#endif /* ACPI_APPLICATION */
354
338/***************************************************************************** 355/*****************************************************************************
339 * 356 *
340 * ACPICA public interface prototypes 357 * ACPICA public interface prototypes
@@ -658,6 +675,10 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
658 u32 gpe_number)) 675 u32 gpe_number))
659 676
660ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 677ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
678 acpi_mark_gpe_for_wake(acpi_handle gpe_device,
679 u32 gpe_number))
680
681ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
661 acpi_setup_gpe_for_wake(acpi_handle 682 acpi_setup_gpe_for_wake(acpi_handle
662 parent_device, 683 parent_device,
663 acpi_handle gpe_device, 684 acpi_handle gpe_device,
@@ -861,6 +882,9 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
861 const char *module_name, 882 const char *module_name,
862 u32 component_id, 883 u32 component_id,
863 const char *format, ...)) 884 const char *format, ...))
885ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
886 void ACPI_INTERNAL_VAR_XFACE
887 acpi_log_error(const char *format, ...))
864 888
865/* 889/*
866 * Divergences 890 * Divergences
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 4ad7da805180..9613e8e97960 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -604,7 +604,7 @@ struct acpi_hest_generic {
604 604
605/* Generic Error Status block */ 605/* Generic Error Status block */
606 606
607struct acpi_generic_status { 607struct acpi_hest_generic_status {
608 u32 block_status; 608 u32 block_status;
609 u32 raw_data_offset; 609 u32 raw_data_offset;
610 u32 raw_data_length; 610 u32 raw_data_length;
@@ -614,15 +614,15 @@ struct acpi_generic_status {
614 614
615/* Values for block_status flags above */ 615/* Values for block_status flags above */
616 616
617#define ACPI_GEN_ERR_UC BIT(0) 617#define ACPI_HEST_UNCORRECTABLE (1)
618#define ACPI_GEN_ERR_CE BIT(1) 618#define ACPI_HEST_CORRECTABLE (1<<1)
619#define ACPI_GEN_ERR_MULTI_UC BIT(2) 619#define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
620#define ACPI_GEN_ERR_MULTI_CE BIT(3) 620#define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
621#define ACPI_GEN_ERR_COUNT_SHIFT (0xFF<<4) /* 8 bits, error count */ 621#define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
622 622
623/* Generic Error Data entry */ 623/* Generic Error Data entry */
624 624
625struct acpi_generic_data { 625struct acpi_hest_generic_data {
626 u8 section_type[16]; 626 u8 section_type[16];
627 u32 error_severity; 627 u32 error_severity;
628 u16 revision; 628 u16 revision;
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 860e5c883eb3..21314d37cb07 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -516,7 +516,7 @@ struct acpi_dmar_andd {
516 struct acpi_dmar_header header; 516 struct acpi_dmar_header header;
517 u8 reserved[3]; 517 u8 reserved[3];
518 u8 device_number; 518 u8 device_number;
519 u8 object_name[]; 519 char object_name[1];
520}; 520};
521 521
522/******************************************************************************* 522/*******************************************************************************
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 19b26bb69a70..608a04019372 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -126,6 +126,7 @@
126typedef unsigned char u8; 126typedef unsigned char u8;
127typedef unsigned char u8; 127typedef unsigned char u8;
128typedef unsigned short u16; 128typedef unsigned short u16;
129typedef short s16;
129typedef COMPILER_DEPENDENT_UINT64 u64; 130typedef COMPILER_DEPENDENT_UINT64 u64;
130typedef COMPILER_DEPENDENT_INT64 s64; 131typedef COMPILER_DEPENDENT_INT64 s64;
131 132
@@ -1244,4 +1245,17 @@ struct acpi_memory_list {
1244#define ACPI_OSI_WIN_7 0x0B 1245#define ACPI_OSI_WIN_7 0x0B
1245#define ACPI_OSI_WIN_8 0x0C 1246#define ACPI_OSI_WIN_8 0x0C
1246 1247
1248/* Definitions of file IO */
1249
1250#define ACPI_FILE_READING 0x01
1251#define ACPI_FILE_WRITING 0x02
1252#define ACPI_FILE_BINARY 0x04
1253
1254#define ACPI_FILE_BEGIN 0x01
1255#define ACPI_FILE_END 0x02
1256
1257/* Definitions of getopt */
1258
1259#define ACPI_OPT_END -1
1260
1247#endif /* __ACTYPES_H__ */ 1261#endif /* __ACTYPES_H__ */
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index dfd60d0bfd27..720446cb243e 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -14,7 +14,7 @@
14 14
15struct ghes { 15struct ghes {
16 struct acpi_hest_generic *generic; 16 struct acpi_hest_generic *generic;
17 struct acpi_generic_status *estatus; 17 struct acpi_hest_generic_status *estatus;
18 u64 buffer_paddr; 18 u64 buffer_paddr;
19 unsigned long flags; 19 unsigned long flags;
20 union { 20 union {
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index e863dd5c4e04..5f8cc1fa3278 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -87,20 +87,14 @@
87#define ACPI_DBG_TRACK_ALLOCATIONS 87#define ACPI_DBG_TRACK_ALLOCATIONS
88#endif 88#endif
89 89
90/* acpi_names configuration. Single threaded with debugger output enabled. */
91
92#ifdef ACPI_NAMES_APP
93#define ACPI_DEBUGGER
94#define ACPI_APPLICATION
95#define ACPI_SINGLE_THREADED
96#endif
97
98/* 90/*
99 * acpi_bin/acpi_dump/acpi_src/acpi_xtract/Example configuration. All single 91 * acpi_bin/acpi_dump/acpi_help/acpi_names/acpi_src/acpi_xtract/Example configuration.
100 * threaded, with no debug output. 92 * All single threaded.
101 */ 93 */
102#if (defined ACPI_BIN_APP) || \ 94#if (defined ACPI_BIN_APP) || \
103 (defined ACPI_DUMP_APP) || \ 95 (defined ACPI_DUMP_APP) || \
96 (defined ACPI_HELP_APP) || \
97 (defined ACPI_NAMES_APP) || \
104 (defined ACPI_SRC_APP) || \ 98 (defined ACPI_SRC_APP) || \
105 (defined ACPI_XTRACT_APP) || \ 99 (defined ACPI_XTRACT_APP) || \
106 (defined ACPI_EXAMPLE_APP) 100 (defined ACPI_EXAMPLE_APP)
@@ -108,12 +102,40 @@
108#define ACPI_SINGLE_THREADED 102#define ACPI_SINGLE_THREADED
109#endif 103#endif
110 104
105/* acpi_help configuration. Error messages disabled. */
106
111#ifdef ACPI_HELP_APP 107#ifdef ACPI_HELP_APP
112#define ACPI_APPLICATION
113#define ACPI_SINGLE_THREADED
114#define ACPI_NO_ERROR_MESSAGES 108#define ACPI_NO_ERROR_MESSAGES
115#endif 109#endif
116 110
111/* acpi_names configuration. Debug output enabled. */
112
113#ifdef ACPI_NAMES_APP
114#define ACPI_DEBUG_OUTPUT
115#endif
116
117/* acpi_exec/acpi_names/Example configuration. Native RSDP used. */
118
119#if (defined ACPI_EXEC_APP) || \
120 (defined ACPI_EXAMPLE_APP) || \
121 (defined ACPI_NAMES_APP)
122#define ACPI_USE_NATIVE_RSDP_POINTER
123#endif
124
125/* acpi_dump configuration. Native mapping used if provied by OSPMs */
126
127#ifdef ACPI_DUMP_APP
128#define ACPI_USE_NATIVE_MEMORY_MAPPING
129#define USE_NATIVE_ALLOCATE_ZEROED
130#endif
131
132/* acpi_names/Example configuration. Hardware disabled */
133
134#if (defined ACPI_EXAMPLE_APP) || \
135 (defined ACPI_NAMES_APP)
136#define ACPI_REDUCED_HARDWARE 1
137#endif
138
117/* Linkable ACPICA library */ 139/* Linkable ACPICA library */
118 140
119#ifdef ACPI_LIBRARY 141#ifdef ACPI_LIBRARY
@@ -185,6 +207,9 @@
185#elif defined(_AED_EFI) 207#elif defined(_AED_EFI)
186#include "acefi.h" 208#include "acefi.h"
187 209
210#elif defined(_GNU_EFI)
211#include "acefi.h"
212
188#elif defined(__HAIKU__) 213#elif defined(__HAIKU__)
189#include "achaiku.h" 214#include "achaiku.h"
190 215
@@ -399,8 +424,12 @@ typedef char *va_list;
399#ifdef ACPI_APPLICATION 424#ifdef ACPI_APPLICATION
400#include <stdio.h> 425#include <stdio.h>
401#define ACPI_FILE FILE * 426#define ACPI_FILE FILE *
427#define ACPI_FILE_OUT stdout
428#define ACPI_FILE_ERR stderr
402#else 429#else
403#define ACPI_FILE void * 430#define ACPI_FILE void *
431#define ACPI_FILE_OUT NULL
432#define ACPI_FILE_ERR NULL
404#endif /* ACPI_APPLICATION */ 433#endif /* ACPI_APPLICATION */
405#endif /* ACPI_FILE */ 434#endif /* ACPI_FILE */
406 435