Commit Graph

103 Commits

Author SHA1 Message Date
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
andvar cdc507f0d2 fix various typos in comment, documentation and log messages. 2022-05-24 20:50:17 +00:00
andvar a41f6947a1 fix few typos for word "previous(ly)" in comments. 2022-03-23 13:06:06 +00:00
andvar c45fbc6e3a fix few typos in comments and log message. 2022-02-13 22:20:08 +00:00
andvar eb03b08ccf fix typos in word "operation(s)". 2021-12-12 08:49:57 +00:00
msaitoh 1a03346fd7 s/OCCURED/OCCURRED/ in a debug message. 2021-12-10 11:09:52 +00:00
skrll f1a526204c acpi_print_gicc_flags: print {en,dis}abled 2021-11-08 10:19:42 +00:00
andvar fb817dab52 fix various typos in comments, mainly copypasta. 2021-10-24 20:00:11 +00:00
andvar a136e22ab6 fix various typos in comments, messages and documentation. 2021-09-19 10:34:06 +00:00
rillig bbb9ad67ae acpidump: fix lint errors
When lint runs on the code, it defines the preprocessor macro 'lint' to
be 1.  Due to that, this name cannot be used as a regular identifier.

acpi.c(86): error: syntax error '1' [249]
acpi.c(1004): error: syntax error '1' [249]
acpi.c(2422): error: void function acpi_print_lpit cannot return value
    [213]

The FreeBSD code doesn't need this name change since lint is specific to
NetBSD.

No functional change.
2021-09-14 20:34:36 +00:00
andvar 11850c9e27 s/existant/existent/ in comments and messages, plus few more similar fixes. 2021-09-03 22:33:17 +00:00
andvar 2e0bf311b3 fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected. 2021-08-17 22:00:26 +00:00
skrll 91ad7c9ee3 Consistently use ACPI_SIG_SSDT 2021-01-20 15:27:51 +00:00
jmcneill 798fdf3f82 MAsk -> Mask, spotted by rillig@ 2020-12-14 10:18:28 +00:00
jmcneill 0eb6f089ee Add support for decoding Platform Communications Channel Tables ("PCCT"). 2020-12-12 16:08:39 +00:00
jmcneill 962d94c5c4 acpidump: Do not print FACS if HW_REDUCED flag is set.
According to ACPI 6.3 spec, FACS is optional when HW_REDUCED is set. ACPICA
ignores the FACS completely when HW_REDUCED is set, so we need to follow
suit since it is not available through /dev/acpi as the table is not
installed.
2020-12-06 18:38:58 +00:00
jmcneill 161b30af53 acpi: add character device for accessing ACPI tables
The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.
2020-12-06 02:57:29 +00:00
jmcneill 0d54a9589a Add HAVE_ACPI and HAVE_UEFI flags to bsd.own.mk and use them to
conditionally include ACPI and UEFI bits instead of relying on adhoc
MACHINE_ARCH tests.
2020-09-12 15:25:41 +00:00
jmcneill f2c0a93275 Build acpi tools and iasl on aarch64eb, and fix set lists for MKDEBUG. 2020-09-11 14:06:00 +00:00
riastradh 25f11de3b9 mmap MAP_FAILED audit. 2020-08-20 15:54:11 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
maxv 0e3f83ef93 Dump TPM2. 2019-06-22 12:39:40 +00:00
dogcow 8ffd671a61 acpica 20190405 changed some internal macros; update code to match 2019-04-29 02:49:35 +00:00
msaitoh 800ead4e1b Add missing newline. 2019-02-09 16:00:41 +00:00
mrg fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
msaitoh 9836c9649c Fix acpi_print_string(). Treat NUL termination correctly to not to print
NUL character. For example, this change prints an OEMID "41 4d 44 00 41 4d"
with "AMD". Tested by Patrick Welche.
2018-12-30 05:05:21 +00:00
msaitoh c0f969c5d5 Decode IO Remapping Table. 2018-12-02 10:51:07 +00:00
maya 0b54191a1c & promotes to int already, so clang warns about the hh modifier.
(and we use -Werror)

ok xtos
2018-11-11 00:24:01 +00:00
msaitoh 755dd63262 Decode Boot Graghics Resource Table (BGRT). 2018-11-05 07:39:57 +00:00
msaitoh 055f8b85fb Decode CSRT (Core System Resources Table). 2018-11-01 03:08:46 +00:00
msaitoh 43a714dc69 Add GTDT and PPTT. 2018-10-19 05:04:45 +00:00
msaitoh c26b2779fe Fix output of Cache type in PPTT. 2018-10-18 05:20:05 +00:00
msaitoh bf819d34f8 Don't print X_PM_TMR_BLK if the address value is 0. 2018-10-18 05:04:44 +00:00
msaitoh 27cdf6cf05 Don't print PM_TMR_BLK if the value is 0 (see also acpi_timer.c rev. 1.23). 2018-10-18 04:52:00 +00:00
msaitoh aba8816bd6 Decode Generic Timer Description Table(GTDT) and Processor Properties Topology
Table(PPTT). Cosmetic changes and fixes might be required. Testesd by jmcneill.
2018-10-18 04:29:44 +00:00
msaitoh b04bf7f2c3 Print SPCR's Interface Type and ARMH GIC Interrupt Type. 2018-10-18 04:25:34 +00:00
jmcneill 43db5d20d4 FACS is optional if the HW_REDUCED_ACPI flag is set in the FADT. 2018-10-16 21:44:37 +00:00
jmcneill d25cdfbd09 Add acpidump, amldb, and iasl to aarch64 build. 2018-10-14 13:36:32 +00:00
jmcneill 8ebf8cb05c getopt returns int, not char 2018-10-14 12:43:58 +00:00
msaitoh 8b136ef70d Remove extra newline in SPMI table. 2018-10-05 05:09:31 +00:00
msaitoh 5073389c63 - Decode DMAR's ANDD (ACPI Name Space).
- Add X2APIC_MODE flag of DMAR. Note that Intel's VT-d's document says the
  flag's name is DMA_CTRL_PLATFORM_OPT_IN but actbl1.h says it's
  DMAR_X2APIC_MODE.
2018-10-03 09:52:59 +00:00
msaitoh 3de33cabd4 Add ACPI LPIT (Low Power Idle Table) from FreeBSD r336185. 2018-10-03 09:46:11 +00:00
msaitoh 761e1e94b4 Print ACPI_HEST_GHES_ASSIST flag (ACPI 6.2). 2017-09-28 06:55:08 +00:00
msaitoh 0fd02e45f9 Cosmetic change (tab and newline). 2017-09-27 08:14:18 +00:00
msaitoh 597a86a670 - Print SAPIC EID of Processor Local APIC/SAPIC Affinity.
- Print GIC Interrupt Translation Service(ITS) Affinity (ACPI 6.2)
- KNF
- Whilte space cleanup.
2017-09-27 05:43:55 +00:00
msaitoh 50d91653ef Don't define GAS adddess ID constants in acpidump.h and use actypes.h's
definitions. No functional change.
2017-09-07 04:40:56 +00:00
msaitoh 0f0f0fe40a - Space, tab and newline change for consistency output.
- Print a type number for unknown HEST sub entry ID.
2017-09-04 08:12:29 +00:00
msaitoh 084106f3ab - Calculate offset of a sub header correctly in acpi_handle_hest() to print
all of sub entries in HEST correctly.
- Print a SpaceID number for unknown ID in acpi_print_gas().
- Use PRINTFLAG() in acpi_print_hest_notify().
- Use %u instead of %d for unsgined values in acpi_print_hest_generic().
2017-09-04 08:08:41 +00:00
msaitoh 8dabdd9fc2 Fix calculation the offset of the Action Table in WDAT to print each
entries correctly.
2017-09-04 07:59:15 +00:00
msaitoh 5d527485aa Decode the following entries:
- DBG2 (Debug Port Table 2)
 - SPMI (Server Platform Management Interface Table)
 - WDDT (Watchdog Timer Description Table)
 - UEFI (UEFI, not fully decoded yet)
2017-09-01 18:35:50 +00:00