Age | Commit message (Collapse) | Author |
|
block is no
longer used by luna88k.
Tested & ok miod@ aoyam@
|
|
which got limited to at most two tries 26 years ago for the 2.3 release,
but the documentation was never updated to match this change. Do it now.
Reported by Nir Lichtman on tech@
|
|
support for tape block devices was removed in 2016
ok miod@
|
|
Tested by & ok aoyama@
|
|
ok claudio@
|
|
Input and ok jmc@, jsg@
|
|
The spice^Wkernel must flow^Wbuild.
|
|
ok mglocker@
|
|
No binary change.
|
|
|
|
No binary change.
|
|
|
|
mcount.c, in the same way that -fno-ret-protector is set (because
the default ret-protector is an "always" generator). This change
ensures there is never a stack protector prologue/epilogue in the
functions in that file, no matter what stack protector selection
algorithm is in play.
ok kettenis guenther
|
|
where a switch happens outside. Cleanup these code paths and make the
machine independent.
- when a process forks (fork, tfork, kthread), the new proc needs to
somehow be scheduled for the first time. This is done by proc_trampoline.
Since proc_trampoline is machine dependent assembler code change
the MP specific proc_trampoline_mp() to proc_trampoline_mi() and make
sure it is now always called.
- cpu_hatch: when booting APs the code needs to jump to the first proc
running on that CPU. This should be the idle thread for that CPU.
- sched_exit: when a proc exits it needs to switch away from itself and
then instruct the reaper to clean up the rest. This is done by switching
to the idle loop.
Since the last two cases require a context switch to the idle proc factor
out the common code to sched_toidle() and use it in those places.
Tested by many on all archs.
OK miod@ mpi@ cheloha@
|
|
Actually these devices are not supported on luna88k, but we need them
in order to create attribute header files (e.g. "ucom.h") required in
MI part recently.
Suggested by miod@, tested by me.
|
|
All the state initialization once done in clockintr_init() has been
moved to other parts of the kernel. It's a dead function. Remove it.
Likewise, the clockintr_flags variable no longer sports any meaningful
flags. Remove it. This frees up the CL_* flag namespace, which might
be useful to the clockintr frontend if we ever need to add behavior
flags to any of those functions.
|
|
ok jsg
|
|
To give the primary CPU an opportunity to perform clock interrupt
preparation in a machine-independent manner we need to separate the
"initialization" parts of cpu_initclocks() from the "start the clock
interrupt" parts. Currently, cpu_initclocks() does everything all at
once, so there is no space for this MI setup.
Many platforms have more-or-less already done this separation by
implementing a separate routine named "cpu_startclock()". This patch
promotes cpu_startclock() from de facto standard to mandatory API.
- Prototype cpu_startclock() in sys/systm.h alongside cpu_initclocks().
The separation of responsibility between the two routines is a bit
fuzzy but the basic guidelines are as follows:
+ cpu_initclocks() must initialize hz, stathz, and profhz, and call
clockintr_init().
+ cpu_startclock() must call clockintr_cpu_init() and start the clock
interrupt cycle on the calling CPU.
These guidelines will shift in the future, but that's the way things
stand as of *this* commit.
- In initclocks(): first call cpu_initclocks(), then do MI setup, and
last call cpu_startclock().
- On platforms where cpu_startclock() already exists: don't call
cpu_startclock() from cpu_initclocks() anymore.
- On platforms where cpu_startclock() doesn't yet exist: implement it.
Usually this is as simple as dividing cpu_initclocks() in two.
Tested on amd64 (i8254, lapic), arm64, i386 (i8254, lapic), macppc,
mips64/octeon, and sparc64. Tested on arm/armv7 (agtimer(4)) by
phessler@ and jmatthew@. Tested on m88k/luna88k by aoyama@. Tested
on powerpc64 by gkoehler@ and mlarkin@. Tested on riscv64 by
jmatthew@.
Thread: https://marc.info/?l=openbsd-tech&m=169195251322149&w=2
|
|
WSDISPLAYIO_GETSUPPORTEDDEPTH ioctl.
This is needed to use recent updated wsfb(4) driver in 8bpp mode.
We can use 1bpp X server on 8bpp framebuffer by 'startx -- -depth 1'.
Tested by me.
|
|
This patch isolates profil(2) and GPROF from statclock(). Currently,
statclock() implements both profil(2) and GPROF through a complex
mechanism involving both platform code (setstatclockrate) and the
scheduler (pscnt, psdiv, and psratio). We have a machine-independent
interface to the clock interrupt hardware now, so we no longer need to
do it this way.
- Move profil(2)-specific code from statclock() to a new clock
interrupt callback, profclock(), in subr_prof.c. Each
schedstate_percpu has its own profclock handle. The profclock is
enabled/disabled for a given CPU when it is needed by the running
thread during mi_switch() and sched_exit().
- Move GPROF-specific code from statclock() to a new clock interrupt
callback, gmonclock(), in subr_prof.c. Where available, each cpu_info
has its own gmonclock handle . The gmonclock is enabled/disabled for
a given CPU via sysctl(2) in prof_state_toggle().
- Both profclock() and gmonclock() have a fixed period, profclock_period,
that is initialized during initclocks().
- Export clockintr_advance(), clockintr_cancel(), clockintr_establish(),
and clockintr_stagger() via <sys/clockintr.h>. They have external
callers now.
- Delete pscnt, psdiv, psratio. From schedstate_percpu, also delete
spc_pscnt and spc_psdiv. The statclock frequency is not dynamic
anymore so these variables are now useless.
- Delete code/state related to the dynamic statclock frequency from
kern_clockintr.c. The statclock frequency can still be pseudo-random,
so move the contents of clockintr_statvar_init() into clockintr_init().
With input from miod@, deraadt@, and claudio@. Early revisions
cleaned up by claudio. Early revisions tested by claudio@. Tested by
cheloha@ on amd64, arm64, macppc, octeon, and sparc64 (sun4v).
Compile- and boot- tested on i386 by mlarkin@. riscv64 compilation
bugs found by mlarkin@. Tested on riscv64 by jca@. Tested on
powerpc64 by gkoehler@.
|
|
Now 'chmod a-x /bsd.upgrade' works in order to prevent re-upgrade, like other architectures.
Tested by me on LUNA-88K2.
|
|
This is needed to work libsa's ufs_fchmod() on luna88k.
Tested by me on LUNA-88K2.
|
|
Move the clockqueue_init() call out of clockintr_cpu_init() and up
just before the sched_init_cpu() call for a given CPU.
This will allow sched_init_cpu() to allocate clockintr handles for a
given CPU's scheduler in a later patch.
Link: https://marc.info/?l=openbsd-tech&m=168661507607622&w=2
ok kettenis@, claudio@
|
|
|
|
ok miod@
|
|
|
|
ok miod@ millert@
|
|
This also brings to install boot.8 man page correctly.
ok miod@
|
|
only compile tty-related code (stty command, tty variable) on platforms
where it makes sense for the boot loader to control it, rather than the
PROM/firmware/whatever.
|
|
Now the correct date is displayed instead of January 1, 1970.
Tested on LUNA-88K2 and nono emulator by me.
"make sense" miod@
|
|
"Of course!" miod@
|
|
Now 'ls' against directory works fine.
Tested on LUNA-88K2 and nono emulator by me.
|
|
|
|
Different from original LUNA(68k), the number of planes is directly
stored as an integer value on LUNA-88K.
Tested on LUNA-88K2 by me.
|
|
exoticsilicon dot com.
ok miod
|
|
|
|
|
|
of it. Crank version to 0.8.
ok aoyama@
|
|
Current bootloader can pass boothowto information to the kernel. It
also has the capability to load random seed data from /etc/random.seed
already. So set RB_GOODRANDOM at the bootloader when loadrandom() has
been finished successfully.
Now the kernel says "random: good seed from bootblocks".
Tested by LUNA-88K2 and nono emulator, "Absolutely!" ok miod@
|
|
This occurs the kernel has booted from old boot loader or directly
booted by command line parameter on emulator.
Tested by LUNA-88K2 and nono emulator.
|
|
|
|
is ELF" world. Eliminate use of them in m88k code.
ok aoyama@
|
|
- Initialize tick_nsec during cpu_initclocks()
We have no control over the interrupt clock on luna88k, so this switch
is trivial.
Bringup help and testing from aoyama@ and miod@.
Link: https://marc.info/?l=openbsd-tech&m=166776371203450&w=2
ok aoyama@ mlarkin@
|
|
Tested on LUNA-88K2 with 4bpp/8bpp framebuffer by me.
|
|
Only five legacy half-duplex hardware drivers require this function to
change between playing and recording:
i386: ess(4), gus(4), pas(4), sb(4)
luna88k: nec86(4)
If defined, it is always called early in audio_open(), so just move the
call from audio(4) to each hardware driver's open() handler.
SPKR_ON/OFF remain defined to leave driver-specific code unchanged.
Further cleanup (unchecked speaker_ctl() return values,
FWRITE -> AUMODE_PLAY -> SPKR_ON dances, etc.) can happen later.
Builds fine on i386.
OK ratchov
|
|
Make drivers which do *not* adverise AUDIO_PROP_FULLDPLEX return ENXIO
in their open() if full-duplex mode was requested.
This way, sys/dev/audio.c:audio_open() will fail immediately rather than
later through the to-be-removed get_props() check.
These are all drivers which simply don't support full-duplex mode.
In device-tree based drivers like simpleaudio(4)/rkiis(4) and newer Apple
ones like aplaudio(4)/aplmca(4), this adds a new open() stub to the
low-level drivers which merely does the duplex check.
My Pinebook Pro keeps playing audio and recording silence with this diff
just like before (rkiis(4) is currently play-only):
simpleaudio0 at mainbus0
simpleaudio1 at mainbus0
audio0 at simpleaudio1
$ aucat -i song69.wav -o rec.wav
OK ratchov miod
|
|
This prevents "luna88k_ext_int: cpu0 level 1 interrupt" message on
heavy load.
"This makes sense" miod@, tested by me.
|
|
This audio(9) struct will lose a member, but drivers init their struct quite
inconsistently, most pre-C99 style.
Use C99 style everywhere, to get rid of all annoying differences and allow
for easy member removals/additions:
- don't change current order of members
- no explicit NULL members
- no comments or blank lines
- trailing comma in last member line
GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64.
macppc and alpha build-tested by miod
OK ratchov miod
|
|
necsb(4/luna88k) is the only driver that "implements" it... through EIO.
Remove it so setfd can be removed from struct audio_hw_if.
Prodded by ratchov
OK aoyama
|
|
|