Age | Commit message (Collapse) | Author |
|
them to unmuddy the waters a bit.
ok guenther@
|
|
faults to avoid sleeping. Implement this functionality for i386 and amd64
for faults in the user address space. If the ci_inatomic flag is set in
struct cpu_info, copyin(9) and copyout(9) will return EFAULT when a user-space
address needs to be faulted in. Use this to properly implement
__copy_to_user_inatomic() and __copy_from_user_inatomic_nocache() in the
inteldrm(4) code.
ok krw@, guenther@
|
|
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h>
by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all
MACHINE_ARCH but amd64 and i386 (and hppa64).
|
|
|
|
suspend work on some machines.
ok deraadt@
|
|
page.
|
|
hibernate goo up after 64KB to avoid posible corruption by buggy BIOS SMM
code. Diff also ensures the first 64KB doesn't get handed to UVM either.
ok deraadt@, tested by many with no regressions reported
|
|
|
|
ok krw@, deraadt@
|
|
instead of the cache line containing the local variable used to specify the
address. Fixes the gnome corruption and hangs people have been experiencing
for the last couple of months or so.
ok deraadt@, mlarkin@
|
|
for PCI devices. This hook should be called twice, before and after
changing the power state of a PCI device.
Before setting the device to the new state, the ACPI layer will notify
every power resources linked to the device for that state and make sure
they are turned "_ON". After changing the state of the device, it will
decrement the reference of every power resources linked to that device
for the old state and turn them "_OFF" if they are no longer referenced.
This fixes the no-USB after resume problem seen on various ThinkPad,
problem initialy diagnosed with Alexander Polakov.
ok kettenis@, deraadt@
|
|
(at least BOOT 3.20 on amd64 and BOOT 3.18 on i386) or you'll risk losing
your serial console.
ok deraadt@
|
|
|
|
if can tell the target CPU isn't actually idling and introduce cpu_kick()
for the cases where we want to force a non-idle CPU into the kernel.
critical review of early versions by weingart@; testing by many
ok haesbaert@ krw@
|
|
1. Makes amd64 and i386 MTRR code nearly identical
2. Removes support for per-process MTRRs (which were never implemented)
3. Treat "unknown" MTRR types as uncacheable instead of trying to preserve
bogus settings made by the BIOS
4. Various KNF cleanups
Should be no functional change.
ok jsg@, deraadt@
|
|
type definitions that are the same across all archs from
<machine/_types.h> to <sys/_types.h>
ok deraadt@ kettenis@ otto@
|
|
breakage lurking; ok kettenis@
|
|
the same across all archs from <machine/_types.h> to <sys/_types.h>
ok deraadt@
|
|
is supposed to establish interrupts at IPL_VM, we only need to "flatten"
mutex ipls up until IPL_TTY. Add an assertion to enforce that IPL_AUDIO
interrupts are establish with the IPL_MPSAFE flag set. Should improve
latency of audio interrupts a tiny bit.
ok matthew@
|
|
removed at n2k13 but a few errant references still remained. No functional
change. Spot tested by my on i386 and amd64 UP environments, no regressions
seen.
noticed by deraadt@
|
|
This adds information about smt id (thread), core id and package id
(socket) to amd64.
ci_smt_id, ci_core_id, ci_pkg_id should be followed by other
archictectures and core relying on them should be under
ARCH_HAVE_CPU_TOPOLOGY.
ok tedu@
|
|
|
|
|
|
we block all interrupts that can grab the kernel lock. The simplest way to
achieve this is to make sure mutexes always raise the ipl to the highest
level that has interrupts that grab the kernel lock. This will allow us
to have "mpsafe" interrupt handlers at lower priority levels.
No change for non-MULTIPROCESSOR kernels.
discussed with many
ok mpi@, tedu@
|
|
mode and halt them. Needed for hibernate.
ok deraadt@ kettenis@ "there's no risk there"
|
|
it's now atomic_lock to better reflect its usage, and librthread now
features a new spinlock that's really a ticket lock.
thrlseep can handle both types of lock via a flag in the clock arg.
(temp back compat hack)
remove some old stuff that's accumulated along the way and no longer used.
some feedback from dlg, who is concerned with all things ticket lock.
(you need to boot a new kernel before installing librthread)
|
|
executing code possibly causing side effects during the image unpack
operation. But before we can halt the APs, we need to complete their init
(as they will be hatched but idling, possibly with interrupts off).
Introduces MD function hibernate_quiesce_cpus to do this, called from the
MI hibernate resume code.
ok deraadt
|
|
functions to enable and disable interrupts, if needed. If a platform doesnt
need interrupt handling in this way, the MD function can be a no-op.
discussed with pirofti and deraadt
|
|
resume time stack pointer to the first page reserved, effectively giving us
only one page to work with. Found when I was debugging some unrelated stack
issues in the resume code.
|
|
part of the future we have planned. middling ok from a few
|
|
kernel lock upon entry through a new IPL_MPSAFE flag/level.
ok mikeb@, mpi@
|
|
single c function. This will hopefully make easier to stop taking
the kernel lock when running "mp safe" interrupt handlers.
help from ok kettenis
|
|
cycles per second isnt reliable, particularly inside "virtual" machines.
cpuspeed can be calculated as 0, which causes a divide by zero later on
which is bad.
this goes to more effort to detect if the performance counters are in use
by the hypervisor, or detecting if they gave us a cpuspeed of 0 so we can
fall through to using rdtsc.
the same change as:
src/sys/arch/i386/include/specialreg.h r.45
src/sys/arch/i386/isa/clock.c 1.49
ok jsg@
|
|
|
|
namespace a bit much. These are the names for the value encoded in
core.c_ucode or siginfo.si_trapno, but userland never looks directly
and only cares about the abstract signal code.
ok guenther
|
|
the things that libkvm needs.
|
|
libm. While at it, remove now unused workarounds for lint.
Agreed by kettenis@, guenther@, matthew@.
|
|
another symbol without weak attribute. To be used in libc and libm
soon. Agreed by kettenis@, guenther@, matthew@.
|
|
|
|
|
|
to keep definitions our of user space. The MD files now follow a consistant
order -- all namespace intrusion is at the tail can be cleaned up
independently. locore, bootblocks, and libkvm still see enough visibility to
build. Checked on 90% of platforms...
|
|
little while...
diff from martynas who is not around now
|
|
support to reload bindings after suspend/resume and to update cachability
flags in the address translation table entries.
|
|
ok deraadt@
|
|
kgmon(8) to deal with them, this time without public header changes.
Previously various CPUs were iterating over the same global buffer at
the same time to modify it and never ended.
This diff includes some ideas submited by Thor Simon to NetBSD via miod@.
ok deraadt@, mikeb@, haesbaert@
|
|
at this moment.
|
|
various CPUs were iterating over the same global buffer at the same
time to modify it and never ended.
This diff includes some ideas submited by Thor Simon to NetBSD via miod@.
ok mikeb@, haesbaert@
|
|
swap for you to the hosts endianness. sometimes you dont want this hand
holding and just want raw access to the registers. bus_space does have
stuff to do this already, but they deal with buffers which can be awkward
if you just want to get or set a single register.
this adds the following to i386 and amd64:
bus_space_read_raw_2() bus_space_read_raw_4() bus_space_read_raw_8()
bus_space_write_raw_2() bus_space_write_raw_4() bus_space_write_raw_8()
sparc64 already implements this, even though it wasnt part of the
official api. how handy.
i'll do other archs as i can.
kettenis@ and miod@ seem ok with this
|
|
Agreed with millert@ and guenther@
|
|
as an identifier for IO or memory mappings that was checked inside the api,
turn it into a pointer to a structure of function pointers. the api then
generally becomes a set of macros that deref the function pointers on the
callers behalf. the idea is that following a pointer to very small
functions is cheap compared to doing compares continuously.
a notable exception to the macro wrappers is bus_space_barrier which is now
a static inline function. the only argument to it that gets used is the
flags, and thats usually a constant at compile time so it can be inlined
to a single fence instruction.
the kernel is smaller and the api is more cache friendly now.
ok deraadt@
|