#
1.48 |
|
31-May-2020 |
dlg |
introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.
rnd.c uses nanotime to get access to some bits that change quickly between events that it can mix into the entropy pool. it doesn't use nanotime to get a monotonically increasing set or ordered and accurate timestamps, it just wants something with bits that change.
there's been discussions for years about letting rnd use a clock that's super fast to read, but not necessarily accurate, but it wasn't until recently that i figured out it wasn't interested in time at all, so things like keeping a fast clock coherent between cpu cores or correct according to ntp is unecessary. this means we can just let rnd read the cycle counters on cpus and things will be fine. cpus with cycle counters that vary in their speed and arent kept consistent between cores may even be desirable in this context.
so this is the first step in converting rnd.c to reading cycle counter. it copies the nanotime backend to each arch, and they can replace it with something MD as a second step later on.
djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits. thanks to visa for his eyes. ok deraadt@ visa@ deraadt@ says he will help handle any MD fallout that occurs.
|
Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE
|
#
1.47 |
|
01-Apr-2019 |
tedu |
fast track ddb> reboot command to skip anything which might panic again. ok deraadt
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE
|
#
1.46 |
|
11-Dec-2017 |
deraadt |
In uvm Chuck decided backing store would not be allocated proactively for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.45 |
|
30-Apr-2017 |
mpi |
Rename Debugger() into db_enter().
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler.
ok deraadt@, kettenis@, visa@
|
Revision tags: OPENBSD_6_1_BASE
|
#
1.44 |
|
09-Oct-2016 |
tom |
Apply consistency to forever loops with continue and NOTREACHED
Same thought from kettenis@, ok krw@ phessler@ millert@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.43 |
|
05-Mar-2016 |
tobiasu |
Sync no-argument function declaration and definition by adding (void). Covers all of landisk/sh, per naddy's suggestion.
ok on previous diff deraadt@ naddy@
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
|
#
1.42 |
|
10-Dec-2014 |
mikeb |
retire shutdown hooks; ok deraadt, krw
|
#
1.41 |
|
20-Sep-2014 |
kettenis |
Use config_suspend_all(9).
ok mpi@, uebayasi@, dlg@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.40 |
|
21-Jul-2014 |
uebayasi |
boot(9): Reduce annoying style diffs
- Always use either: ((x & RB_XXX) != 0) or ((x & RB_XXX) == 0) in boolean context (mostly if (x), or x ? y : z) - prom_halt() in alpha is confirmed to take int as boolean
Converted by coccinelle. No functional change intended.
|
#
1.39 |
|
14-Jul-2014 |
uebayasi |
More comment cleanup in boot().
|
#
1.38 |
|
13-Jul-2014 |
uebayasi |
boot(9): Cosmetic changes to improve diff'ability.
|
#
1.37 |
|
13-Jul-2014 |
uebayasi |
Cosmetic changes to reduce diffs.
|
#
1.36 |
|
10-Jul-2014 |
mpi |
Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting or rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
#
1.35 |
|
10-Jul-2014 |
uebayasi |
boot(): Remove comments about RB_TIMEBAD to reduce diffs
RB_TIMEBAD is documented well enough that the comment is not needed. sparc64 does slightly different and its comment is left with XXX.
OK deraadt@ miod@
|
#
1.34 |
|
10-Jul-2014 |
uebayasi |
boot(): Unify declarations
OK deraadt@
|
#
1.33 |
|
31-May-2014 |
mpi |
Revert previous diff setting cold to 1 on shutdown because it breaks machine with softraid(4) disks.
softraid(4) is the last real consumer of the doshutdownhooks(9) API and it is not trivial to convert its hook to a DVACT_POWERDOWN handler since the latter does not allow to sleep.
|
#
1.32 |
|
30-May-2014 |
mpi |
Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting or rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
#
1.31 |
|
14-Apr-2014 |
mpi |
Fewer <uvm/uvm.h>
|
#
1.30 |
|
13-Mar-2014 |
dlg |
get rid of the assumption that the head of the alldevs list is the "mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position.
have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead.
discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.29 |
|
28-Sep-2013 |
miod |
In boot(), do not iterate over alldevs if it's empty (i.e. halting from ddb with ddb entered early with boot -d or from UKC).
|
Revision tags: OPENBSD_5_4_BASE
|
#
1.28 |
|
11-Jun-2013 |
deraadt |
final removal of daddr64_t. daddr_t has been 64 bit for a long enough test period; i think 3 years ago the last bugs fell out. ok otto beck others
|
Revision tags: OPENBSD_5_3_BASE
|
#
1.27 |
|
08-Oct-2012 |
deraadt |
Revamp the sequences for suspend/hibernate -> resume so that the code paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
|
Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
|
#
1.26 |
|
26-Jun-2011 |
deraadt |
if_downall() cannot be done MI in sys_reboot() because vfs_shutdown() might need network (ie. nfs). Move the call to the MD boot() routines. This cause for boot hangs diagnosed by kettenis.
|
#
1.25 |
|
24-Jun-2011 |
naddy |
machdep.kbdreset enables a shutdown by Ctrl-Alt-Del on amd64 and i386. Stop abusing it on other archs for controling a shutdown by pressing the soft power button:
* Add a MI sysctl hw.allowpowerdown; if set to 1 (the default) it allows a power button shutdown. * Make acpi(4)/acpibtn(4) honor hw.allowpowerdown. * Switch the various power button intercepts on landisk, sgi, sparc64 and zaurus over to hw.allowpowerdown. * Garbage collect the machdep.kbdreset sysctl on all archs other than amd64 and i386.
ok miod@
|
#
1.24 |
|
30-May-2011 |
oga |
Remove the freelist member from vm_physseg
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist.
While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it.
Should shrink the code a bit, as well.
matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
|
Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
|
#
1.23 |
|
27-Jun-2010 |
miod |
Bunch of include adjustements to restore compilability.
|
#
1.22 |
|
27-Jun-2010 |
thib |
uvm constraints. Add two mandatory MD symbols, uvm_md_constraints which contains the constraints for DMA/memory allocation for each architecture, and dma_constraints which contains the range of addresses that are dma accessable by the system.
This is based on ariane@'s physcontig diff, with lots of bugfixes and additions the following additions by my self:
Introduce a new function pool_set_constraints() which sets the address range for which we allocate pages for the pool from, this is now used for the mbuf/mbuf cluster pools to keep them dma accessible.
The !direct archs no longer stuff pages into the kernel object in uvm_km_getpage_pla but rather do a pmap_extract() in uvm_km_putpages.
Tested heavily by my self on i386, amd64 and sparc64. Some tests on alpha and SGI.
"commit it" beck, art, oga, deraadt "i like the diff" deraadt
|
#
1.21 |
|
26-Jun-2010 |
guenther |
Don't #include <sys/user.h> into files that don't need the stuff it defines. In some cases, this means pulling in uvm.h or pcb.h instead, but most of the inclusions were just noise. Tested on alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax, mostly by krw and naddy. ok krw@
|
#
1.20 |
|
10-Jun-2010 |
deraadt |
Declare safepri at the MD level on each platform, so that the kern_synch.c does not have to deal with it as a common. Some platforms may be missed by this commit... if you spot one, fix it the same way. ok miod
|
#
1.19 |
|
21-Apr-2010 |
deraadt |
more cleanup to cope with the change that tries to make proc.h not act like it is everything.h ok tedu
|
#
1.18 |
|
17-Apr-2010 |
jasper |
- correctly set cpu_model: instead of a vendor + model, set the cpu type
ok miod@
|
Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE
|
#
1.17 |
|
26-Jun-2008 |
ray |
First pass at removing clauses 3 and 4 from NetBSD licenses.
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors.
OK deraadt@
|
#
1.16 |
|
08-Jun-2008 |
miod |
Make sure to cnpollc(1)/cnpollc(0) around cngetc() or getsn() calls.
|
#
1.15 |
|
09-Apr-2008 |
deraadt |
Add new stub uvm_shutdown() and call it from the right place in MD boot()
|
#
1.14 |
|
23-Mar-2008 |
deraadt |
setroot() is supposed to be safe in all cases, so kill the special cases for RB_DFLTROOT; ok miod
|
Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.13 |
|
06-Jun-2007 |
deraadt |
now that all partition size/offsets are potentially 64-bit, change the type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
|
#
1.12 |
|
29-Apr-2007 |
miod |
Blink 8x slower, so that this fits better with Kraftwerk's ``Elektro Kardiogramm'' in the background.
|
#
1.11 |
|
29-Apr-2007 |
miod |
machdep.led_blink sysctl for landisk, also move cpu_sysctl() code and related variables from arch/sh/ to arch/landisk/. ok deraadt@
|
#
1.10 |
|
13-Mar-2007 |
miod |
Move UKC later in the boot process, so that it can use malloc().
|
Revision tags: OPENBSD_4_1_BASE
|
#
1.9 |
|
03-Mar-2007 |
miod |
Kernel crash dumps and associated libkvm bits for landisk.
|
#
1.8 |
|
06-Feb-2007 |
miod |
Get memory size from SH-IPL+g whenever possible, before relying upon the hardcoded 64MB. No functional change since we have not encountered non-64MB systems yet.
|
#
1.7 |
|
09-Nov-2006 |
deraadt |
no newline at end of cpu_model
|
#
1.6 |
|
06-Nov-2006 |
miod |
No bootinfo stuff. We'll use something different to pass device information from the boot blocks to the kernel.
|
#
1.5 |
|
25-Oct-2006 |
drahn |
Add ramdisk hooks portion.
|
#
1.4 |
|
19-Oct-2006 |
drahn |
support boot -c
|
#
1.3 |
|
16-Oct-2006 |
drahn |
Do not zero bss in the kernel, the bootloader does this for us and it causes a problem loading the kernel.
|
#
1.2 |
|
06-Oct-2006 |
mickey |
w/ help of netbsd srcs and some mother unzel made it lift off
|
#
1.1 |
|
06-Oct-2006 |
miod |
branches: 1.1.1; Initial revision
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.47 |
|
01-Apr-2019 |
tedu |
fast track ddb> reboot command to skip anything which might panic again. ok deraadt
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE
|
#
1.46 |
|
11-Dec-2017 |
deraadt |
In uvm Chuck decided backing store would not be allocated proactively for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.45 |
|
30-Apr-2017 |
mpi |
Rename Debugger() into db_enter().
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler.
ok deraadt@, kettenis@, visa@
|
Revision tags: OPENBSD_6_1_BASE
|
#
1.44 |
|
09-Oct-2016 |
tom |
Apply consistency to forever loops with continue and NOTREACHED
Same thought from kettenis@, ok krw@ phessler@ millert@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.43 |
|
05-Mar-2016 |
tobiasu |
Sync no-argument function declaration and definition by adding (void). Covers all of landisk/sh, per naddy's suggestion.
ok on previous diff deraadt@ naddy@
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
|
#
1.42 |
|
10-Dec-2014 |
mikeb |
retire shutdown hooks; ok deraadt, krw
|
#
1.41 |
|
20-Sep-2014 |
kettenis |
Use config_suspend_all(9).
ok mpi@, uebayasi@, dlg@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.40 |
|
21-Jul-2014 |
uebayasi |
boot(9): Reduce annoying style diffs
- Always use either: ((x & RB_XXX) != 0) or ((x & RB_XXX) == 0) in boolean context (mostly if (x), or x ? y : z) - prom_halt() in alpha is confirmed to take int as boolean
Converted by coccinelle. No functional change intended.
|
#
1.39 |
|
14-Jul-2014 |
uebayasi |
More comment cleanup in boot().
|
#
1.38 |
|
13-Jul-2014 |
uebayasi |
boot(9): Cosmetic changes to improve diff'ability.
|
#
1.37 |
|
13-Jul-2014 |
uebayasi |
Cosmetic changes to reduce diffs.
|
#
1.36 |
|
10-Jul-2014 |
mpi |
Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting or rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
#
1.35 |
|
10-Jul-2014 |
uebayasi |
boot(): Remove comments about RB_TIMEBAD to reduce diffs
RB_TIMEBAD is documented well enough that the comment is not needed. sparc64 does slightly different and its comment is left with XXX.
OK deraadt@ miod@
|
#
1.34 |
|
10-Jul-2014 |
uebayasi |
boot(): Unify declarations
OK deraadt@
|
#
1.33 |
|
31-May-2014 |
mpi |
Revert previous diff setting cold to 1 on shutdown because it breaks machine with softraid(4) disks.
softraid(4) is the last real consumer of the doshutdownhooks(9) API and it is not trivial to convert its hook to a DVACT_POWERDOWN handler since the latter does not allow to sleep.
|
#
1.32 |
|
30-May-2014 |
mpi |
Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting or rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
#
1.31 |
|
14-Apr-2014 |
mpi |
Fewer <uvm/uvm.h>
|
#
1.30 |
|
13-Mar-2014 |
dlg |
get rid of the assumption that the head of the alldevs list is the "mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position.
have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead.
discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.29 |
|
28-Sep-2013 |
miod |
In boot(), do not iterate over alldevs if it's empty (i.e. halting from ddb with ddb entered early with boot -d or from UKC).
|
Revision tags: OPENBSD_5_4_BASE
|
#
1.28 |
|
11-Jun-2013 |
deraadt |
final removal of daddr64_t. daddr_t has been 64 bit for a long enough test period; i think 3 years ago the last bugs fell out. ok otto beck others
|
Revision tags: OPENBSD_5_3_BASE
|
#
1.27 |
|
08-Oct-2012 |
deraadt |
Revamp the sequences for suspend/hibernate -> resume so that the code paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
|
Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
|
#
1.26 |
|
26-Jun-2011 |
deraadt |
if_downall() cannot be done MI in sys_reboot() because vfs_shutdown() might need network (ie. nfs). Move the call to the MD boot() routines. This cause for boot hangs diagnosed by kettenis.
|
#
1.25 |
|
24-Jun-2011 |
naddy |
machdep.kbdreset enables a shutdown by Ctrl-Alt-Del on amd64 and i386. Stop abusing it on other archs for controling a shutdown by pressing the soft power button:
* Add a MI sysctl hw.allowpowerdown; if set to 1 (the default) it allows a power button shutdown. * Make acpi(4)/acpibtn(4) honor hw.allowpowerdown. * Switch the various power button intercepts on landisk, sgi, sparc64 and zaurus over to hw.allowpowerdown. * Garbage collect the machdep.kbdreset sysctl on all archs other than amd64 and i386.
ok miod@
|
#
1.24 |
|
30-May-2011 |
oga |
Remove the freelist member from vm_physseg
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist.
While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it.
Should shrink the code a bit, as well.
matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
|
Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
|
#
1.23 |
|
27-Jun-2010 |
miod |
Bunch of include adjustements to restore compilability.
|
#
1.22 |
|
27-Jun-2010 |
thib |
uvm constraints. Add two mandatory MD symbols, uvm_md_constraints which contains the constraints for DMA/memory allocation for each architecture, and dma_constraints which contains the range of addresses that are dma accessable by the system.
This is based on ariane@'s physcontig diff, with lots of bugfixes and additions the following additions by my self:
Introduce a new function pool_set_constraints() which sets the address range for which we allocate pages for the pool from, this is now used for the mbuf/mbuf cluster pools to keep them dma accessible.
The !direct archs no longer stuff pages into the kernel object in uvm_km_getpage_pla but rather do a pmap_extract() in uvm_km_putpages.
Tested heavily by my self on i386, amd64 and sparc64. Some tests on alpha and SGI.
"commit it" beck, art, oga, deraadt "i like the diff" deraadt
|
#
1.21 |
|
26-Jun-2010 |
guenther |
Don't #include <sys/user.h> into files that don't need the stuff it defines. In some cases, this means pulling in uvm.h or pcb.h instead, but most of the inclusions were just noise. Tested on alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax, mostly by krw and naddy. ok krw@
|
#
1.20 |
|
10-Jun-2010 |
deraadt |
Declare safepri at the MD level on each platform, so that the kern_synch.c does not have to deal with it as a common. Some platforms may be missed by this commit... if you spot one, fix it the same way. ok miod
|
#
1.19 |
|
21-Apr-2010 |
deraadt |
more cleanup to cope with the change that tries to make proc.h not act like it is everything.h ok tedu
|
#
1.18 |
|
17-Apr-2010 |
jasper |
- correctly set cpu_model: instead of a vendor + model, set the cpu type
ok miod@
|
Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE
|
#
1.17 |
|
26-Jun-2008 |
ray |
First pass at removing clauses 3 and 4 from NetBSD licenses.
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors.
OK deraadt@
|
#
1.16 |
|
08-Jun-2008 |
miod |
Make sure to cnpollc(1)/cnpollc(0) around cngetc() or getsn() calls.
|
#
1.15 |
|
09-Apr-2008 |
deraadt |
Add new stub uvm_shutdown() and call it from the right place in MD boot()
|
#
1.14 |
|
23-Mar-2008 |
deraadt |
setroot() is supposed to be safe in all cases, so kill the special cases for RB_DFLTROOT; ok miod
|
Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.13 |
|
06-Jun-2007 |
deraadt |
now that all partition size/offsets are potentially 64-bit, change the type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
|
#
1.12 |
|
29-Apr-2007 |
miod |
Blink 8x slower, so that this fits better with Kraftwerk's ``Elektro Kardiogramm'' in the background.
|
#
1.11 |
|
29-Apr-2007 |
miod |
machdep.led_blink sysctl for landisk, also move cpu_sysctl() code and related variables from arch/sh/ to arch/landisk/. ok deraadt@
|
#
1.10 |
|
13-Mar-2007 |
miod |
Move UKC later in the boot process, so that it can use malloc().
|
Revision tags: OPENBSD_4_1_BASE
|
#
1.9 |
|
03-Mar-2007 |
miod |
Kernel crash dumps and associated libkvm bits for landisk.
|
#
1.8 |
|
06-Feb-2007 |
miod |
Get memory size from SH-IPL+g whenever possible, before relying upon the hardcoded 64MB. No functional change since we have not encountered non-64MB systems yet.
|
#
1.7 |
|
09-Nov-2006 |
deraadt |
no newline at end of cpu_model
|
#
1.6 |
|
06-Nov-2006 |
miod |
No bootinfo stuff. We'll use something different to pass device information from the boot blocks to the kernel.
|
#
1.5 |
|
25-Oct-2006 |
drahn |
Add ramdisk hooks portion.
|
#
1.4 |
|
19-Oct-2006 |
drahn |
support boot -c
|
#
1.3 |
|
16-Oct-2006 |
drahn |
Do not zero bss in the kernel, the bootloader does this for us and it causes a problem loading the kernel.
|
#
1.2 |
|
06-Oct-2006 |
mickey |
w/ help of netbsd srcs and some mother unzel made it lift off
|
#
1.1 |
|
06-Oct-2006 |
miod |
branches: 1.1.1; Initial revision
|
#
1.46 |
|
11-Dec-2017 |
deraadt |
In uvm Chuck decided backing store would not be allocated proactively for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
|
Revision tags: OPENBSD_6_2_BASE
|
#
1.45 |
|
30-Apr-2017 |
mpi |
Rename Debugger() into db_enter().
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler.
ok deraadt@, kettenis@, visa@
|
Revision tags: OPENBSD_6_1_BASE
|
#
1.44 |
|
09-Oct-2016 |
tom |
Apply consistency to forever loops with continue and NOTREACHED
Same thought from kettenis@, ok krw@ phessler@ millert@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.43 |
|
05-Mar-2016 |
tobiasu |
Sync no-argument function declaration and definition by adding (void). Covers all of landisk/sh, per naddy's suggestion.
ok on previous diff deraadt@ naddy@
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
|
#
1.42 |
|
10-Dec-2014 |
mikeb |
retire shutdown hooks; ok deraadt, krw
|
#
1.41 |
|
20-Sep-2014 |
kettenis |
Use config_suspend_all(9).
ok mpi@, uebayasi@, dlg@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.40 |
|
21-Jul-2014 |
uebayasi |
boot(9): Reduce annoying style diffs
- Always use either: ((x & RB_XXX) != 0) or ((x & RB_XXX) == 0) in boolean context (mostly if (x), or x ? y : z) - prom_halt() in alpha is confirmed to take int as boolean
Converted by coccinelle. No functional change intended.
|
#
1.39 |
|
14-Jul-2014 |
uebayasi |
More comment cleanup in boot().
|
#
1.38 |
|
13-Jul-2014 |
uebayasi |
boot(9): Cosmetic changes to improve diff'ability.
|
#
1.37 |
|
13-Jul-2014 |
uebayasi |
Cosmetic changes to reduce diffs.
|
#
1.36 |
|
10-Jul-2014 |
mpi |
Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting or rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
#
1.35 |
|
10-Jul-2014 |
uebayasi |
boot(): Remove comments about RB_TIMEBAD to reduce diffs
RB_TIMEBAD is documented well enough that the comment is not needed. sparc64 does slightly different and its comment is left with XXX.
OK deraadt@ miod@
|
#
1.34 |
|
10-Jul-2014 |
uebayasi |
boot(): Unify declarations
OK deraadt@
|
#
1.33 |
|
31-May-2014 |
mpi |
Revert previous diff setting cold to 1 on shutdown because it breaks machine with softraid(4) disks.
softraid(4) is the last real consumer of the doshutdownhooks(9) API and it is not trivial to convert its hook to a DVACT_POWERDOWN handler since the latter does not allow to sleep.
|
#
1.32 |
|
30-May-2014 |
mpi |
Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting or rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
#
1.31 |
|
14-Apr-2014 |
mpi |
Fewer <uvm/uvm.h>
|
#
1.30 |
|
13-Mar-2014 |
dlg |
get rid of the assumption that the head of the alldevs list is the "mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position.
have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead.
discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.29 |
|
28-Sep-2013 |
miod |
In boot(), do not iterate over alldevs if it's empty (i.e. halting from ddb with ddb entered early with boot -d or from UKC).
|
Revision tags: OPENBSD_5_4_BASE
|
#
1.28 |
|
11-Jun-2013 |
deraadt |
final removal of daddr64_t. daddr_t has been 64 bit for a long enough test period; i think 3 years ago the last bugs fell out. ok otto beck others
|
Revision tags: OPENBSD_5_3_BASE
|
#
1.27 |
|
08-Oct-2012 |
deraadt |
Revamp the sequences for suspend/hibernate -> resume so that the code paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
|
Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
|
#
1.26 |
|
26-Jun-2011 |
deraadt |
if_downall() cannot be done MI in sys_reboot() because vfs_shutdown() might need network (ie. nfs). Move the call to the MD boot() routines. This cause for boot hangs diagnosed by kettenis.
|
#
1.25 |
|
24-Jun-2011 |
naddy |
machdep.kbdreset enables a shutdown by Ctrl-Alt-Del on amd64 and i386. Stop abusing it on other archs for controling a shutdown by pressing the soft power button:
* Add a MI sysctl hw.allowpowerdown; if set to 1 (the default) it allows a power button shutdown. * Make acpi(4)/acpibtn(4) honor hw.allowpowerdown. * Switch the various power button intercepts on landisk, sgi, sparc64 and zaurus over to hw.allowpowerdown. * Garbage collect the machdep.kbdreset sysctl on all archs other than amd64 and i386.
ok miod@
|
#
1.24 |
|
30-May-2011 |
oga |
Remove the freelist member from vm_physseg
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist.
While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it.
Should shrink the code a bit, as well.
matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
|
Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
|
#
1.23 |
|
27-Jun-2010 |
miod |
Bunch of include adjustements to restore compilability.
|
#
1.22 |
|
27-Jun-2010 |
thib |
uvm constraints. Add two mandatory MD symbols, uvm_md_constraints which contains the constraints for DMA/memory allocation for each architecture, and dma_constraints which contains the range of addresses that are dma accessable by the system.
This is based on ariane@'s physcontig diff, with lots of bugfixes and additions the following additions by my self:
Introduce a new function pool_set_constraints() which sets the address range for which we allocate pages for the pool from, this is now used for the mbuf/mbuf cluster pools to keep them dma accessible.
The !direct archs no longer stuff pages into the kernel object in uvm_km_getpage_pla but rather do a pmap_extract() in uvm_km_putpages.
Tested heavily by my self on i386, amd64 and sparc64. Some tests on alpha and SGI.
"commit it" beck, art, oga, deraadt "i like the diff" deraadt
|
#
1.21 |
|
26-Jun-2010 |
guenther |
Don't #include <sys/user.h> into files that don't need the stuff it defines. In some cases, this means pulling in uvm.h or pcb.h instead, but most of the inclusions were just noise. Tested on alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax, mostly by krw and naddy. ok krw@
|
#
1.20 |
|
10-Jun-2010 |
deraadt |
Declare safepri at the MD level on each platform, so that the kern_synch.c does not have to deal with it as a common. Some platforms may be missed by this commit... if you spot one, fix it the same way. ok miod
|
#
1.19 |
|
21-Apr-2010 |
deraadt |
more cleanup to cope with the change that tries to make proc.h not act like it is everything.h ok tedu
|
#
1.18 |
|
17-Apr-2010 |
jasper |
- correctly set cpu_model: instead of a vendor + model, set the cpu type
ok miod@
|
Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE
|
#
1.17 |
|
26-Jun-2008 |
ray |
First pass at removing clauses 3 and 4 from NetBSD licenses.
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors.
OK deraadt@
|
#
1.16 |
|
08-Jun-2008 |
miod |
Make sure to cnpollc(1)/cnpollc(0) around cngetc() or getsn() calls.
|
#
1.15 |
|
09-Apr-2008 |
deraadt |
Add new stub uvm_shutdown() and call it from the right place in MD boot()
|
#
1.14 |
|
23-Mar-2008 |
deraadt |
setroot() is supposed to be safe in all cases, so kill the special cases for RB_DFLTROOT; ok miod
|
Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.13 |
|
06-Jun-2007 |
deraadt |
now that all partition size/offsets are potentially 64-bit, change the type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
|
#
1.12 |
|
29-Apr-2007 |
miod |
Blink 8x slower, so that this fits better with Kraftwerk's ``Elektro Kardiogramm'' in the background.
|
#
1.11 |
|
29-Apr-2007 |
miod |
machdep.led_blink sysctl for landisk, also move cpu_sysctl() code and related variables from arch/sh/ to arch/landisk/. ok deraadt@
|
#
1.10 |
|
13-Mar-2007 |
miod |
Move UKC later in the boot process, so that it can use malloc().
|
Revision tags: OPENBSD_4_1_BASE
|
#
1.9 |
|
03-Mar-2007 |
miod |
Kernel crash dumps and associated libkvm bits for landisk.
|
#
1.8 |
|
06-Feb-2007 |
miod |
Get memory size from SH-IPL+g whenever possible, before relying upon the hardcoded 64MB. No functional change since we have not encountered non-64MB systems yet.
|
#
1.7 |
|
09-Nov-2006 |
deraadt |
no newline at end of cpu_model
|
#
1.6 |
|
06-Nov-2006 |
miod |
No bootinfo stuff. We'll use something different to pass device information from the boot blocks to the kernel.
|
#
1.5 |
|
25-Oct-2006 |
drahn |
Add ramdisk hooks portion.
|
#
1.4 |
|
19-Oct-2006 |
drahn |
support boot -c
|
#
1.3 |
|
16-Oct-2006 |
drahn |
Do not zero bss in the kernel, the bootloader does this for us and it causes a problem loading the kernel.
|
#
1.2 |
|
06-Oct-2006 |
mickey |
w/ help of netbsd srcs and some mother unzel made it lift off
|
#
1.1 |
|
06-Oct-2006 |
miod |
branches: 1.1.1; Initial revision
|