summaryrefslogtreecommitdiff
path: root/sys/arch/landisk
AgeCommit message (Collapse)Author
2024-11-06Do not store the value of sp in struct clockframe, for nothing has a needMiod Vallat
for it.
2024-11-05The first field of struct cfdriver is a pointer. Put NULL rather than 0 here.Miod Vallat
2024-11-05The MI boot code used to have an infinite loop trying to boot the kernel,Miod Vallat
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@
2024-11-05Rename ci_intrdepth to ci_idepth in preparation for MI use of it; I mistakenlyMiod Vallat
picked the old name when introducing this field. Reminded by mpi@
2024-10-24Add a ci_intrdepth field to struct cpu_info for sh, and use it to implementMiod Vallat
CLKF_INTR properly.
2024-07-14Add missing <machine/elf.h> for compound arches.Miod Vallat
The spice^Wkernel must flow^Wbuild.
2024-06-11remove prototypes and defines for drivers landisk doesn't useJonathan Gray
build test and ok miod@
2024-01-28set -fno-stack-protector in NORMAL_C_NOP, which is used to compileTheo de Raadt
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
2023-04-13remove duplicate includesJonathan Gray
ok deraadt@ miod@ krw@
2023-03-12sh, landisk: set HZ=64 againScott Soule Cheloha
The addition of HZ to sys/kernel.h in v1.26 overrides the default definition of HZ in sh/clock.c, changing landisk from HZ=64 to HZ=100. Explicitly set HZ=64 in the GENERIC and RAMDISK config(8) files to can change it from 100 back to 64. Not sure if this is the best thing, but it does fix the problem. Problem confirmed by, and fix tested by, miod@. ok miod@
2023-02-23Remove dangerous user-settable "addr" variable from MI boot loader, andMiod Vallat
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.
2022-12-08_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingPhilip Guenther
is ELF" world. Eliminate use of them in landisk code. ok deraadt@
2022-10-15ansiJonathan Gray
2022-09-02Constify nam2blk[], chrtoblktbl[] and octeon devmap[].Miod Vallat
ok mpi@ millert@
2022-09-02Add UFS2 support, with libsa for boot and with a specific ufs-and-ufs2-in-oneMiod Vallat
flavour for xxboot, due to its size constraints.
2022-08-24Add missing licence, from nonaka@netbsd.orgMiod Vallat
2022-08-24Build libsa with NO_NET as we don't need any of the network-related code in it.Miod Vallat
2022-08-24Force compilation to fail in case of implicit function declaration.Miod Vallat
2022-08-24Add prototype declarations for a bunch of functions.Miod Vallat
2022-08-17No more disklabel -B.Miod Vallat
2022-07-02remove machine/lock.h where unusedJonathan Gray
Previously for __cpu_simple_lock parts. Now only hppa and m88k use __cpu_simple_lock (and hppa uses atomic.h for it). ok miod@ visa@
2022-06-28Remove unused field d_poll from struct cdevsw.Visa Hankala
OK miod@ mpi@
2022-05-24fdisk(8) no longer uses the partition table it finds inKenneth R Westerback
/usr/mdec/mbr. Make the partition table all zeros and see if any hidden uses fall out. ok deraadt@
2022-05-10Convert KVA allocation to km_alloc(9).Mark Kettenis
ok mpi@
2022-04-06constify struct cfattachChristian Weisgerber
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2022-01-04hide more things behind _KERNEL, in case userland manages to includeTheo de Raadt
this file
2021-11-11Retire switch(4) it never really was production ready and the OpenFlowClaudio Jeker
API implemented is a deadend. OK akoshibe@ yasuoka@ deraadt@ kn@ patrick@ sthen@
2021-10-24#define open O_* flags in libsa/stand.h, so that bootblocks can useTheo de Raadt
O_RDONLY rather using 0 ok beck
2021-08-22ucc also fails to work here, because there is no wskbd_rawinputTheo de Raadt
2021-08-20Add ucc(4), a driver for USB HID Consumer Control keyboards. Suchanton
keyboard is a pseudo device which is used to expose audio and application launch keys. My prime motivation is to get the volume mute, increment and decrement keys to just work on my keyboard without the need to use usbhidaction(1). Looks reasonable to kettenis@ mpi@ and ok jcs@
2021-03-11spellingJonathan Gray
2021-02-04Add uhidpp(4), a driver for Logitech HID++ devices. Currently limited toanton
exposing battery sensors for HID++ 2.0 devices. Most of the code is derived from the hid-logitech-hidpp Linux driver. Thanks to Ville Valkonen <weezeldinga at gmail dot com> for testing. ok mglocker@
2021-01-28Again allow COPTS= to come from the environment again, and don't lose theTheo de Raadt
SMALL_KERNEL specific variations. ok espie jsg
2021-01-23introduce ujoy(4), a restricted subset of uhid(4) for gamecontrollers.thfr
This includes ujoy_hid_is_collection() to work around limitations of hid_is_collection() until this can be combined without fallout. input, testing with 8bitdo controller, and ok brynet@ PS4 controller testing, fix for hid_is_collection, and ok mglocker@
2020-12-09Use daddr_t and not daddr32_t in boot media.Kenneth R Westerback
At a minimum, amd64/i386 should now boot from 4TB GPT formatted disks. More daddr32_t terminations with extreme prejudice to follow. Tested by various, in snaps for a few days. ok deraadt@
2020-07-06Add support for timeconting in userland.Paul Irofti
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
2020-07-06wire up kstat(4)David Gwynne
"looks right" deraadt@
2020-06-30Remove obsolete <machine/stdarg.h> header. Nowadays the varargVisa Hankala
functionality is provided by <sys/stdarg.h> using compiler builtins. Tested in a ports bulk build on amd64 by naddy@ OK naddy@ mpi@
2020-05-31introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.David Gwynne
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.
2020-05-27Retire <machine/varargs.h>.Visa Hankala
Nothing uses the header anymore. OK deraadt@ mpi@
2020-05-26increment version numbers, due to recent RB_GOODSEED and fchmod +T changesTheo de Raadt
2020-03-27Enable FFS2 on the landisk ramdisk. Booting from FFS2 is trickyOtto Moerbeek
since the bootxx needs to interpret the fs metadata and it has very little spare room. We could make two version of xxboot, but that's hardly worth the trouble.
2020-01-23wire up pppac(4) to some majors on each arch.David Gwynne
i was lazy and just put them at the end of the existing set. fyi, i think major 51 is free on all archs if anyone is looking for another one. ok claudio@
2020-01-21Import dt(4) a driver and framework for Dynamic Profiling.Martin Pieuchot
The design is fairly simple: events, in the form of descriptors on a ring, are being produced in any kernel context and being consumed by a userland process reading /dev/dt. Code and hooks are all guarded under '#if NDT > 0' so this commit shouldn't introduce any change as long as dt(4) is disable in GENERIC. ok kettenis@, visa@, jasper@, deraadt@
2019-12-23The boot loader allows to inspect memory with the hexdump command.Alexander Bluhm
Document the new feature in boot(8) man page. OK jmc@ deraadt@
2019-12-17Add fido(4), a HID driver for FIDO/U2F security keysReyk Floeter
While FIDO/U2F keys were already supported by the generic uhid(4) driver, this driver adds the first step to tighten the security of FIDO/U2F access. Specifically, users don't need read/write access to all USB/HID devices anymore and the driver also improves integration with pledge(2) and unveil(2): It is pledge-friendly because it doesn't require any ioctls to discover the device and unveil-friendly because it uses a single /dev/fido/* directory for its device nodes. It also allows to support FIDO/U2F in firefox without further weakening the "sandbox" of the browser. Firefox does not have a proper privsep design and many operations, such as U2F access, are handled directly by the main process. This means that the browser's "fat" main process needs direct read/write access to all USB HID devices, at least on other operating systems. With fido(4) we can support security keys in Firefox under OpenBSD without such a compromise. With this change, libfido2 stops using the ioctl to query the device vendor/product and just assumes "OpenBSD" "fido(4)" instead. The ioctl is still supported but there was no benefit in obtaining the vendor product or name; it also allows to use libfido2 under pledge. With feedback from deraadt@ and many others OK kettenis@ djm@ and jmc@ for the manpage bits
2019-11-28Implement a hexdump command in the boot loader. This helps toAlexander Bluhm
inspect the memory layout that the firmware has created. It is especially useful for UEFI debugging. OK deraadt@ kettenis@
2019-11-07The compiler -pg option implies -fno-ret-protector, as we want to disablePhilip Guenther
retguard and similar when profiling. However, that missed all the .S files, as ${PROF} wasn't added when ${NORMAL_S} was converted from direct invocation of ${AS} to instead use ${CC}. Similarly, mcount.o still had retguards as it cannot be built with -pg. So: pass ${PROF} when compiling .S files, and compile "no profiling" files with -fno-ret-protector on archs with retguard. feedback and ok mpi@ mortimer@
2019-10-29Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdataTheo de Raadt
section, which has grown a fair bit with the introduction of retguard. Mortimer discovered the repeated 512-byte sequence as retguard keys, and this resolves the issue. (Chacha does not fit on the media, so 1.5K early drop RC4 is hopefully sufficient in our KARL link universe) Version crank the bootblocks. sysupgrade -s will install new bootblocks. ok djm mortimer