commits
From NetBSD, from FreeBSD (as nvmecontrol)
Since we don't create separate devices for NVMe controllers, ioctl
access goes through the disk device (e.g., nvmectl identify /dev/sd0c)
The X1 Nano can usually cruise with no fan on during most normal
activity, but the EC has this temperature threshold set a tad too
low so it constantly toggles the fan between off and running at its
lowest speed. Do this manually in the acpithinkpad driver but bump
the temperature threshold up a bit to stop it from turning on unless
needed.
This reverts commit bf9a317d19824ee8094e0b4d59231240363f3c05.
For some reason 60Hz doesn't work properly, so prefer 48Hz until I
can figure out why.
This driver takes over the 3 uhidev devices exposed by this device
and hooks up `wsconsctl display.brightness` to read and set the
brightness.
Support for reading the ambient light sensor will be coming soon.
Useful for under-volting components to conserve power.
machdep.voltage.cpu: 0 -> -85
machdep.voltage.gpu: 0 -> -85
machdep.voltage.cpu_cache: 0 -> 85
machdep.voltage.cpu=-85
machdep.voltage.gpu=-85
machdep.voltage.cpu_cache=85
machdep.voltage.sys_agent=0
machdep.voltage.analog_io=0
This uses cnst's writable fan sysctl patch, mostly taken from
http://sensors.cnst.su/fanctl/
The new value field is added to ksensor instead of sensor to avoid
an ABI change.
Adjustable with sysctl machdep.hwp
This should be a better heuristic than the previous attempt which
just used the first min/max found and broke on some devices.
Plamen Mihaylov's LUNA-88K2 originally has 2 CPU modules in slot #0
and #2, but MULTIPROCESSOR kernel panics because they are not placed
in contiguous slots. This diff fixes it.
Original diff from miod@, tested by Plamen Mihaylov and me.
The ASN.1 templates are a rather direct translation of the ASN.1 in the
relevant RFCs and they allow deserializing the Manifest and ROA eContent
in a single step instead of numerous opaque d2i_ASN1_SEQUENCE_ANY() calls.
Once the eContent is deserialized, we can walk the structs, validate it
as before and populate the internal data structures.
Positive feedback job
ok claudio
Replace it with EXC_END, which points to the end of hardware exception
addresses, and adjust logic accordingly.
ok kettenis@
From Alex Deucher
0fad10b263a33492107d62caa460d5e4c717ce29 in linux 5.15.y/5.15.41
a56f445f807b0276fc0660c330bf93a9ea78e8ea in mainline linux
Bug reported and patch tested by Scott C. MacCallum.
ok bluhm@
Split the object content handling off into asn1_d2i_ex_primitive_content(),
move the handling ov V_ASN1_ANY into asn1_d2i_ex_any() and move the MSTRING
handling into asn1_d2i_ex_mstring(). This way we parse the header once
(rather than twice for ANY and MSTRING), then process the content, while
also avoiding complex special cases in a single code path.
ok tb@
Change asn1_template_ex_d2i() so that we short circuit in the no explicit
tagging case.
Split out the SET OF/SEQUENCE OF handling from asn1_template_noexp_d2i()
into a asn1_template_stack_of_d2i() function and simplify the remaining
code.
ok tb@
ok patrick@, dtucker@
Should have been part of a previous commit.
ok jsing
Factor the trimming of the end and the counting of unused bits into
helper functions and reuse an ASN.1 bit string API to set the unused
bits and the ASN1_STRING_FLAG_BITS_SET. With a couple of explanatory
comments it becomes much clearer what the code is actually doing and
why.
ok jsing
In order to set the BIT STRING containing an address prefix, use existing
helper functions from the ASN.1 code instead of redoing everything by
hand. Make the function single exit and rename a few variables to make
it clearer what is being done.
ok jsing
Instead of using a temporary variable on the stack, we can use the usual
Henson mechanism for allocating the struct. Make the function single exit
and throw an error instead of crashing or leaking if out is NULL or *out
is non-NULL.
tweaks/ok jsing
A long standing failure to initialize a struct on the stack fully was
exposed by a recent refactoring. Fortunately, the uninitialized 'flag'
member is only used to decide whether or not to call freezero(NULL, 0),
so it is completely harmless. This is a first trivial fix, a better
version will be landed separately with regress.
Reported by Steffen Jaeckel, GH #760
ok beck
Now that combine no longer exists, we can also free and reallocate.
ok tb@
having it return a pointer to something that has a lifetime managed
by a lock without accounting for it or taking a reference count or
anything like that is asking for trouble. copying the address to
caller provded memory while still inside the lock is a lot safer.
discussed with visa@
ok bluhm@ claudio@
The X1 Nano can usually cruise with no fan on during most normal
activity, but the EC has this temperature threshold set a tad too
low so it constantly toggles the fan between off and running at its
lowest speed. Do this manually in the acpithinkpad driver but bump
the temperature threshold up a bit to stop it from turning on unless
needed.
The ASN.1 templates are a rather direct translation of the ASN.1 in the
relevant RFCs and they allow deserializing the Manifest and ROA eContent
in a single step instead of numerous opaque d2i_ASN1_SEQUENCE_ANY() calls.
Once the eContent is deserialized, we can walk the structs, validate it
as before and populate the internal data structures.
Positive feedback job
ok claudio
Split the object content handling off into asn1_d2i_ex_primitive_content(),
move the handling ov V_ASN1_ANY into asn1_d2i_ex_any() and move the MSTRING
handling into asn1_d2i_ex_mstring(). This way we parse the header once
(rather than twice for ANY and MSTRING), then process the content, while
also avoiding complex special cases in a single code path.
ok tb@
A long standing failure to initialize a struct on the stack fully was
exposed by a recent refactoring. Fortunately, the uninitialized 'flag'
member is only used to decide whether or not to call freezero(NULL, 0),
so it is completely harmless. This is a first trivial fix, a better
version will be landed separately with regress.
Reported by Steffen Jaeckel, GH #760
ok beck
having it return a pointer to something that has a lifetime managed
by a lock without accounting for it or taking a reference count or
anything like that is asking for trouble. copying the address to
caller provded memory while still inside the lock is a lot safer.
discussed with visa@
ok bluhm@ claudio@