Age | Commit message (Collapse) | Author |
|
ok kettenis@
|
|
We reprogram the lapic timer by hand in three separate places.
This is error-prone and difficult to read.
To clean things up, introduce routines for reprogramming the lapic
timer in a given mode. lapic_timer_oneshot() starts a oneshot
countdown. lapic_timer_periodic() starts a repeating countdown.
Both of these routines call lapic_timer_start(), wherein we actually
write the lapic registers.
With input from dlg@.
Earlier version eyeballed by mlarkin@.
Suspend/resume tested by gnezdo@.
|
|
|
|
proper BSD way where the third argument is always a pointer and data is
transferred between userland and kernel using copyin(9) and copyout(9).
Intead an int is encoded in the thirs argument. This works on 32-bit
architectures and little-endian 64-bit architectures. But not on
big-endian 64-bit architectures. Deal with this by handling the argument
as long (which matches the size of a pointer).
Hopefully we can eliminate these ioctls in the near future.
ok deraadt@
|
|
|
|
magic numbers. As the nearby comment says '< 2 is obsolete. >2 is reserved'. So
0x2 is just right.
|
|
initialize the 'version' field. Not numbers.
|
|
initialize the 'version' field. Not numbers.
|
|
ok kettenis visa
|
|
actual length which has been allocated. We saw cases where the
wTotalLength value is changing on a second read, e.g. when a USB device
was waked up from sleep mode.
ok mpi@
|
|
Copy signotify() from amd64, so that if proc *p is on another cpu, then
signotify(p) notifies the correct cpu.
ok kettenis@
|
|
|
|
|
|
|
|
Reported by Maxime Villard, fix from Matt Dunwoodie after feeedback from
claudio who is fine with either of the two suggested fixes going in.
|
|
bus_space_mmap(9) implementation to make sure we enter mappings with
the right memory attributes.
|
|
at the beginning of the loop. We need to use cr3 at the start of each
iteration for the top level page directory.
From and ok sf@
|
|
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
deraadt@: looks fine
|
|
|
|
The best-guessed limits will be tested by trial.
|
|
The best-guessed limits will be tested by trial.
|
|
|
|
Logitech keyboard for unknown reasons.
Reported by denis@
ok djm@
|
|
ok yasuoka@
|
|
pipex(4) layer this `ifnet' still uses `if_data'. Also pppx(4) doesn't
use per cpu counters but `if_data'.
Add per cpu counters to pppx(4) and pipex(4). This finishes interface
statistics collecting mess.
ok yasuoka@
|
|
allow shrinking the names arrays.
|
|
handle the priority levels better and guarantee ordering of restoring the
priority level after running an interrupt handler and checking for a new
interrupt.
|
|
entered by pmap_enter(9). Otherwise kernel stack pages get evicted and
that doesn't end well.
We probably only need to lock in wired pages and I will probably revisit
this at some later stage.
tested by deraadt@
|
|
|
|
|
|
intr_barrier() now uses the argument so directly call sched_barrier(NULL)
which is what intr_barrier() used to do until recently.
problem reported by and fix tested by Andre Stoebe
|
|
Due to unstable of PLL1, sometimes the system has hanged up
especially at boot. This is observed at Allwinner H3/H2+ processor.
To solve the problem, PLL1 setting procedure is same as Linux.
1. change clock source to 24MHz
2. wait 1usec (new)
3. disable PLL1 (new)
4. set new NKMP value, but M should be 1
5. re-enable PLL1 (new)
6. wait PLL1 stable (modified)
7. change clock source to PLL1
8. wait 1usec (new)
Once disable PLL1 before setting NKMP is very important. And, sometimes
LOCK flag is set even if PLL has not locked yet so wait for PLL is
modified with simple delay() by the value of PLL_STABLE_TIME_REG1 register.
Not only Allwinner H3/H2+ but also all (i.e. A64) Allwinner processors
datasheet has "If the clock source is changed, at most to wait for 8
present running clock cycles." sentence at CPU clock source selection
field of CPU/AXI configuration register. But this is ambiguous that
_who_ should do _what_ during that cycles.
It is unclear that changing clock source itself invoke PLL1 unstability.
For safety, added 1usec wait after changing clock source like Linux.
ok by kettenis@, thanks to adr at sdf dot org
|
|
and let cdstart() use it if the requested i/o is unable to fit into a READ(10).
Certainly better than silently truncating the i/o into a READ(10)/WRITE(10).
|
|
|
|
|
|
are expected to fit into a 4-byte field.
|
|
the boot kernel didn't hand us a valid bootduid.
ok visa@
|
|
get picked up by ddb. This makes the "pp" and "show struct" commands that
depends on CTF work.
ok gkoehler@
|
|
no other thread is currently within a remote section. Otherwise, the
remote subsystem could end up in a broken state where it doesn't reset
the necessary bits upon leaving the remote section.
Therefore introduce the kr_barrier() routine which waits until all
ongoing remote sections have been left. Also, extend the scope of the
mutex to also cover fields of struct kcov_dev. This is necessary to
ensure correctness.
Reported-by: syzbot+64122a5f01be1b1abb96@syzkaller.appspotmail.com
|
|
something more generic. It will soon cover the whole kcov subsystem.
|
|
have the caller assign it to xs->cmdlen. Pass in xs->cmd instead of xs. A
slightly cleaner API that provides the potential of detecting and reacting to a
failure to create the desired command.
|
|
xs fields to a more convenient location, shrinking upcoming diffs. Nuke some
Captain Obvious comments.
|
|
|
|
favour of simply using the device's claimed SCSI level of support. Except of
course for ATAPI/USB devices which often don't claim anything. Keep assuming
they are at least SCSI-2. Use consistant tests in
sdminphys/cdminphys/sdstart/cdstart.
|
|
|
|
Fixes CID 1496732.
ok patrick@
|
|
ok deraadt@
|
|
|
|
Although technically a point-to-multipoint interface, point-to-point
semantics apply/fit when installing local routes, e.g. configuring IPv6
addresses on it.
This is to fix SIOCGNBRINFO_IN6 and thus ndp(8).
Report and diff from Matt Dunwoodie <ncon at noconroy dot net>, thanks!
OK tobhe
|