| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
GenericSerialBus operating regions witout checking whether they're really
available. This needs to work on RAMDISK kernels as well. Since we
don't want to pull in the i2c subsystem on those, provide a separate
and much simpler dummy implementation of the GenericSerialBus access code
when SMALL_KERNEL is defined.
ok tb@
|
|
|
|
|
|
|
| |
or padded, and hence e. g. the access to the PCI vendor/device id would be
broken. The structs for the other tables all seem to be packed as well.
ok kettenis@
|
|
|
|
|
|
| |
found and test by Rafael Avila de Espindola
ok kettenis
|
|
|
|
|
|
|
|
|
| |
is blessed with IOMMU magic, if available. This is mainly for arm64,
since on amd64 and i386 the IOMMU only captures PCIe devices, as far
as I know, which uses the pci_probe_device_hook(). This though is for
non-PCI devices attached through ACPI.
ok kettenis@
|
|
|
|
|
|
|
| |
used towards an smmu(4) for non-PCI devices. The references are provided
as ASCII printable paths.
ok kettenis@
|
|
|
|
|
|
| |
caused by the reference handling change from December.
ok kettenis@ patrick@
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are not in a printable format, hence printing them as string is
wrong. Additionally, aml_searchrel()/aml_searchname() expect the name
to be passed in a printable format as well. Passing a nameref can lead
to an out-of-bounds read, and the comparison can fail. Hence make sure
that namerefs are passed to aml_getname() first, which returns printable
strings. Note that aml_getname() uses a static buffer, so there are a
few restrictions how the string can be used.
ok kettenis@
|
| |
|
|
|
|
| |
ok patrick@
|
|
|
|
|
|
|
| |
LocalX. In that case, resolving the reference must be done before
resetting the LocalX variable. test daniel
ok kettenis
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timecounter struct is large and I think it may change in the
future. Changing it later will be easier if we use C99-style
initialization for all timecounter structs. It also makes reading the
code a bit easier.
For reasons I cannot explain, switching to C99-style initialization
sometimes changes the hash of the resulting object file, even though
the resulting struct should be the same. So there is a binary change
here, but only sometimes. No behavior should change in either case.
I can't compile-test this everywhere but I have been staring at the
diff for days now and I'm relatively confident this will not break
compilation. Fingers crossed.
ok gnezdo@
|
|
|
|
| |
ok kettenis@ pirofti@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tpm(4) has timeout constants in milliseconds, e.g.
#define TPM_ACCESS_TMO 2000 /* 2sec */
This is fine.
The odd thing is that tpm(4) first converts these timeouts to counts
of ticks via tpm_tmotohz() before using DELAY() to busy-wait. DELAY()
takes a count of microseconds, which are not equivalent to ticks, so
the units are all screwed up.
Let's correct this:
- Remove tpm_tmotohz(). We're not working with ticks so we don't it.
- Multiply the timeouts to match the delay interval. tpm_request_locality()
and tpm_getburst() use intervals of 10 microseconds, so multiply the
millisecond timeouts by 100. In tpm_waitfor() the delay interval is 1
microsecond, so multiply the millisecond timeout by 1000.
- Update the parameter name in tpm_waitfor() to note that we expect a
count of milliseconds, not "tries".
Discussion: https://marc.info/?l=openbsd-tech&m=160995671326406&w=2
Prompted by kettenis@.
Suspend/resume tested by florian@ on an X1 Gen 2. For the record, it
looks like this:
tpm0 at acpi0 TPM_ addr 0xfed40000/0x5000, device 0x0000104a rev 0x4e
Earlier versions of this patch were reviewed by kn@, but the patch
became more ambitious when kettenis@ got involved so those reviews
are no longer applicable.
jcs@ notes (https://marc.info/?l=openbsd-tech&m=160834427630142&w=2)
in a related discussion that this driver "sucks" and should be
replaced with NetBSD's rewrite. This would get us a cleaner driver
with TPM 2.0 support. So there is future work to do here.
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
| |
the generic IORT node information but also the Root Complex's attributes.
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
| |
so that it can be used by more drivers.
ok kettenis@
|
|
|
|
|
|
|
|
|
|
| |
region reporting table. Since the extent only covered memory starting
at 16M, these regions could not be reserved and would in turn cause a
panic. Make the extent start at 0 and immediately reserve the first
16M right away, so that we can change the reserved memory allocator to
EX_CONFLICTOK to make allocations succeed if they are already reserved.
ok kettenis@
|
|
|
|
| |
it is used by acpihpet.c
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok patrick@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These references need to be resolved at runtime rather than when
they're parsed such that they pick up the right values for those nodes
which can be changed when for example _INI methods run.
The current approach is to replace these reference with a string that
names the node in question. The problem with that is that packages
can also contain normal strings. Which means that we need special
code that depends on the context where the package is used.
This diff takes a different approach by retaining a reference when
parsing. Code that uses a package will need to resolve this reference
but there is no ambiguiety anymore.
ok patrick@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
because the asmc read/write functions are timing out regularly on each
cycle. Since the sensor task is executed during kernel lock, this can
have a negative impact on time sensitive code, as seen with USB isoc
transfers.
Rewriting the asmc read/write functions to a similar execution pattern as
the Linux driver does, entirely removes the timeouts, and hence reduces
the asmc sensor update code to be executed within ~3ms.
ok mpi@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok patrick@
|
|
|
|
| |
ok gnedzo@
|
|
|
|
| |
ok patrick@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
|
|
| |
simple device that simply reacts to interrupts by invoking _EVT with the
interrupt number. This is used on the HoneyComb LX2K to implement power
button handling.
ok kettenis@
|
|
|
|
|
|
| |
PCHs. With help from James Hastings.
ok deraadt@
|
|
|
|
|
|
|
| |
This creates separate domains for each PCI device and can provide protection
against invalid memory access. Needed for Passthrough PCI from vmd.
ok deraadt@, kettenis@
: ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| |
MacBooks already handle the brightness through the drm driver.
Therefore only attach abl(4) to iMacs.
Issue initially reported by James Luigy.
Discussed with kettenis@, ok jung@
|
|
|
|
|
|
|
| |
ToHexString() on a Package. Should probably be replaced by a better solution
after release.
ok deraadt@
|
|
|
|
|
|
|
|
|
| |
a _HID. Should fix the issues with broken AML that Janne Johansson reported.
This issue should be fixed in a more generic way, but that is too risky for
the upcoming release.
tested by jmc@
ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a HP ProBook 650 G1 acpivout backlight brightness control only works
if we don't claim to be Windows 8. If we don't claim to be Windows 8
_BCL gives 21 levels with increments of 5, otherwise 101 levels (0-100)
and a _BCM that does nothing. This is related to requirements Microsoft
has for Windows 8 and later hardware certification.
Having acpivout not fully attach lets inteldrm handle brightness ioctls.
Brightness control via physical buttons will require a new acpi driver
for the HP flavour of WMI.
Add Windows 10 2004 _OSI value to the list while here.
ok mpi@ kmos@ on an earlier version
tested by kmos@ on 6460b and 6470b ProBooks which had the same problem
feedback and ok kettenis@
|
|
|
|
| |
and why we need magic to map it.
|
|
|
|
|
|
|
|
|
| |
Apple machines. The driver attaches through acpi(4) when the HID
'APP0002' is found.
Thanks to kettenis@ for helping me sorting out the PCI bits.
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
doesn't need to be hard coded anymore.
|
|
|
|
|
|
| |
This e.g. makes the driver also work on iMac11,2.
ok kettenis@, jung@
|
|
|
|
| |
The header is being pulled via db_machdep.h -> uvm_extern.h -> uvm_map.h
|
|
|
|
|
|
|
|
|
| |
after Device() ones, since we should prefer the newer node type.
If we see any Device() nodes, don't attach acpicpu(4) to any Processor()
nodes if they're also present. This also makes acpitz(4) and
acpipwrres(4) devices attach slightly later.
ok kettenis@, also tested by jmc@
|
|
|
|
| |
ok jmatthew@
|
|
|
|
| |
OK deraadt@, mpi@
|
|
|
|
|
|
|
| |
example for control method batteries that are attached to I2C but use an
OperationRegion() to access the I2C device.
ok jcs@, gnedzo@
|