10 November 2017. Summary of changes for version 20171110:
1) ACPICA kernel-resident subsystem:
This release implements full support for ACPI 6.2A:
NFIT - Added a new subtable, "Platform Capabilities Structure"
No other changes to ACPICA were required, since ACPI 6.2A is primarily an
errata release of the specification.
Other ACPI table changes:
IORT: Added the SMMUv3 Device ID mapping index. Hanjun Guo
PPTT: Added cache attribute flag definitions to actbl1.h. Jeremy
Linton
Utilities: Modified the string/integer conversion functions to use
internal 64-bit divide support instead of a native divide. On 32-bit
platforms, a 64-bit divide typically requires a library function which
may not be present in the build (kernel or otherwise).
Implemented a targeted error message for timeouts returned from the
Embedded Controller device driver. This is seen frequently enough to
special-case an AE_TIME returned from an EC operation region access:
"Timeout from EC hardware or EC device driver"
Changed the "ACPI Exception" message prefix to "ACPI Error" so that all
runtime error messages have the identical prefix.
2) iASL Compiler/Disassembler and Tools:
AcpiXtract: Fixed a problem with table header detection within the
acpidump file. Processing a table could be ended early if a 0x40 (@)
appears in the original binary table, resulting in the @ symbol appearing
in the decoded ASCII field at the end of the acpidump text line. The
symbol caused acpixtract to incorrectly think it had reached the end of
the current table and the beginning of a new table.
AcpiXtract: Added an option (-f) to ignore some errors during table
extraction. This initial implementation ignores non-ASCII and non-
printable characters found in the acpidump text file.
TestSuite(ASLTS)/AcpiExec: Fixed and restored the memory usage statistics
for ASLTS. This feature is used to track memory allocations from
different memory caches within the ACPICA code. At the end of an ASLTS
run, these memory statistics are recorded and stored in a log file.
Debugger (user-space version): Implemented a simple "Background" command.
Creates a new thread to execute a control method in the background, while
control returns to the debugger prompt to allow additional commands.
Syntax: Background <Namepath> [Arguments]
----------------------------------------
29 September 2017. Summary of changes for version 20170929:
1) ACPICA kernel-resident subsystem:
Redesigned and implemented an improved ASL While() loop timeout
mechanism. This mechanism is used to prevent infinite loops in the kernel
AML interpreter caused by either non-responsive hardware or incorrect AML
code. The new implementation uses AcpiOsGetTimer instead of a simple
maximum loop count, and is thus more accurate and constant across
different machines. The default timeout is currently 30 seconds, but this
may be adjusted later.
Renamed the ACPI_AML_INFINITE_LOOP exception to AE_AML_LOOP_TIMEOUT to
better reflect the new implementation of the loop timeout mechanism.
Updated the AcpiGetTimerDuration interface to cleanup the 64-bit support
and to fix an off-by-one error. Jung-uk Kim.
Fixed an EFI build problem by updating the makefiles to for a new file
that was added, utstrsuppt.c
2) iASL Compiler/Disassembler and Tools:
Implemented full support for the PDTT, SDEV, and TPM2 ACPI tables. This
includes support in the table disassembler, compiler, and template
generator.
iASL: Added an exception for an illegal type of recursive method
invocation. If a method creates named objects, the first recursive call
will fail at runtime. This change adds an error detection at compile time
to catch the problem up front. Note: Marking such a method as
"serialized" will not help with this problem, because the same thread can
acquire the method mutex more than once. Example compiler and runtime
output:
Method (MTH1)
{
Name (INT1, 1)
MTH1 ()
}
dsdt.asl 22: MTH1 ()
Error 6152 - ^ Illegal recursive call to method
that creates named objects (MTH1)
Previous runtime exception:
ACPI Error: [INT1] Namespace lookup failure,
AE_ALREADY_EXISTS (20170831/dswload2-465)
iASL: Updated support for External() opcodes to improve namespace
management and error detection. These changes are related to issues seen
with multiple-segment namespace pathnames within External declarations,
such as below:
External(\_SB.PCI0.GFX0, DeviceObj)
External(\_SB.PCI0.GFX0.ALSI)
iASL: Implemented support for multi-line error/warning messages. This
enables more detailed and helpful error messages as below, from the
initial deployment for the duplicate names error:
DSDT.iiii 1692: Device(PEG2) {
Error 6074 - ^ Name already exists in scope
(PEG2)
Original name creation/declaration below:
DSDT.iiii 93: External(\_SB.PCI0.PEG2, DeviceObj)
AcpiXtract: Added additional flexibility to support differing input hex
dump formats. Specifically, hex dumps that contain partial disassembly
and/or comments within the ACPI table data definition. There exist some
dump utilities seen in the field that create this type of hex dump (such
as Simics). For example:
DSDT @ 0xdfffd0c0 (10999 bytes)
Signature DSDT
Length 10999
Revision 1
Checksum 0xf3 (Ok)
OEM_ID BXPC
OEM_table_id BXDSDT
OEM_revision 1
Creator_id 1280593481
Creator_revision 537399345
0000: 44 53 44 54 f7 2a 00 00 01 f3 42 58 50 43 00 00
...
2af0: 5f 4c 30 46 00 a4 01
Test suite: Miscellaneous changes/fixes:
More cleanup and simplification of makefiles
Continue compilation of test cases after a compile failure
Do not perform binary compare unless both files actually exist
iASL: Performed some code/module restructuring. Moved all memory
allocation functions to new modules. Two new files, aslallocate.c and
aslcache.c
In the old API, event_set_handler would assume MP-unsafe for IPL_VM
and MP-safe for all other levels (IPL_SCHED, IPL_HIGH). The recent
Xen interrupt rototill started passing known_mpsafe=true for _all_
interrupt handlers. Change it to known_mpsafe=false for the IPL_VM
(= IPL_CLOCK, IPL_NET) ones.
The immediate problem appears to have been elsewhere, in the wrong
interrupt level passed by the Xen-specific intr_establish to
event_set_handler.
We should maybe restore these assertions later, but at least one was
violated before cherry's interrupt rototill anyway.
so they don't show unless debugging; e.g. the AHCI_P_IX_TFES seems to be
triggered normally by ATAPI with 'Media Change' error
adresses 'dmesg spam: ahcisata0 port 1: active 2 is 0x40000001 tfd 0x2051'
thread by Stefan Hertenberger on current-users@
contain several kernel segments of the same type (eg several .text
segments). Some parts are still a bit messy but will be cleaned up soon.
I cannot compile-test this change on i386, but it seems fine enough.
NOTE: you need to rebuild and reinstall a new prekern after this change.
Don't unconditionally use IPL_CLOCK, which aside from being the wrong
IPL for non-IPL_CLOCK interrupt handlers has the side effect of running
all interrupt handlers without the giant lock, even those that are not
MP-safe.
This is a step toward fixing:
https://mail-index.netbsd.org/tech-kern/2017/11/09/msg022571.html
ok cherry
This corrects linking attempt with GNU binutils GOLD (linker).
ld.gold: error: /usr/libexec/liblto_plugin.so: \
could not load plugin library: /usr/libexec/liblto_plugin.so: \
Undefined symbol "_sch_istable" (symnum = 12)
Keep the same minor for the previous recent bump.
This now matches ioapic_trymask:
- Caller masks CPU interrupts while the PIC's interrupts are unmasked.
- Trymask masks the PIC's interrupts, and tests whether any were
pending that we missed because the CPU interrupts are masked.
==> If there were any pending, trymask unmasks PIC's interrupts and
returns false.
==> If not, interrupts are masked on the PIC and CPU and there were
none pending and trymask returns true.
No functional change right now because cpu_intr_redistribute is
currently disabled on Xen.
ok cherry
Correct a (relatively harmless) use after free in prompt expansion
processing [detected by asan.]
Relatively harmless: as (while incorrect) the way the data is (was)
used more or less guaranteed that the buffer contents would be
unaltered until well after they are (were) no longer wanted (this
is the expanded prompt string, it is just output (or copied into
libedit internal storage) and forgotten.
This should make no visible difference to anyone (not using asan or
similar.)
XXX pullup -8
- Put cursor on the leftmost column of a multiwidth char, instead of
the rightmost one. Otherwise, some terminal emulators do not focus on
the entire of the char.
Logic taken from nvi-m17n by itojun.
It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.
If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.
A resource allocation graph of the senario looks like this:
route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
=(rt_update_wait)=> route update
Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.
Note that the deadlock happens only if NET_MPSAFE is enabled.