summaryrefslogtreecommitdiffstats
path: root/sys/arch/sgi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Disambiguate expressions.visa2021-03-211-3/+3
|
* spellingjsg2021-03-1112-35/+35
|
* Make kernel ld.script similar to octeon's on loongson and sgi.visa2021-02-181-7/+37
|
* Leave out gp initialization from kernel entry on mips64visa2021-02-113-7/+2
| | | | | | | | | On OpenBSD/mips64, the kernel is compiled with -mno-abicalls. This disables gp-relative addressing and essentially makes gp a spare register in the kernel. Hence it is unnecessary to initialize gp when entering the kernel. The _gp symbol is not needed either. Suggested by miod@
* Add uhidpp(4), a driver for Logitech HID++ devices. Currently limited toanton2021-02-043-3/+6
| | | | | | | | | 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@
* Again allow COPTS= to come from the environment again, and don't lose thederaadt2021-01-281-4/+4
| | | | | SMALL_KERNEL specific variations. ok espie jsg
* introduce ujoy(4), a restricted subset of uhid(4) for gamecontrollers.thfr2021-01-234-4/+9
| | | | | | | | 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@
* Use daddr_t and not daddr32_t in boot media.krw2020-12-094-10/+10
| | | | | | | | | | 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@
* Declare hw_{prod,serial,uuid,vendor,ver} in <sys/systm.h>.visa2020-08-266-15/+6
| | | | OK deraadt@, mpi@
* Userland timecounter implementation for octeonvisa2020-07-181-2/+2
| | | | OK naddy@; no objections from kettenis@
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-103-6/+6
| | | | ok dlg@ tobhe@
* Add support for timeconting in userland.pirofti2020-07-063-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* wire up kstat(4)dlg2020-07-061-2/+3
| | | | "looks right" deraadt@
* Remove obsolete <machine/stdarg.h> header. Nowadays the varargvisa2020-06-301-5/+0
| | | | | | | | functionality is provided by <sys/stdarg.h> using compiler builtins. Tested in a ports bulk build on amd64 by naddy@ OK naddy@ mpi@
* Adjust sgi bootblocks' iostrategy routinesvisa2020-06-062-4/+12
| | | | | | Return an error if write is requested, only reading is implemented. Set *cnt only if the pointer is non-NULL.
* Let sgi bootblocks build again.visa2020-06-061-4/+4
|
* Fix previous commit.visa2020-06-061-2/+2
|
* cpu_rnd_messybits() for mips64visa2020-06-051-10/+1
| | | | | | | Use CP0 Count as a basis. Also take noise from virtual memory activity by including BadVAddr. OK deraadt@ dlg@
* introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.dlg2020-05-311-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Retire <machine/varargs.h>.visa2020-05-271-5/+0
| | | | | | Nothing uses the header anymore. OK deraadt@ mpi@
* sgi had the same bug as sparc64 -- failed to put readdir and fchmodderaadt2020-05-261-3/+6
| | | | operations for ufs and ufs2 into the file_system[] array ...
* increment version numbers, due to recent RB_GOODSEED and fchmod +T changesderaadt2020-05-261-2/+2
|
* /etc/random.seed reuse can now be detected. The stat +T bit marks the filederaadt2020-05-261-1/+7
| | | | | (fchmod +T by bootcode, chmod 600 by /etc/rc). If the seed is reused, and HWRNG isn't available, the kernel won't get RB_GOODSEED indication...
* fchmod() will be needed soon.deraadt2020-05-251-2/+2
| | | | ok kettenis
* make loadrandom() return 0 for success, -1 for failure. While here,deraadt2020-05-251-12/+18
| | | | | | relax the fstat() check because the system will have left the file in the right mode. ok visa kettenis
* change wsdisplay attribute type from long to uint32_tjsg2020-05-256-64/+64
| | | | | | | | miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
* rename wsdisplay alloc_attr() to pack_attr()jsg2020-05-256-19/+19
| | | | | | | | Suggested by John Carmack. miod agrees a rename would make sense and explained it was initially thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. ok mpi@
* Use <dev/clock_subr.h> in dsclock(4).visa2020-05-211-34/+43
| | | | Looks good to miod@
* Use <dev/clock_subr.h> in dpclock(4).visa2020-05-211-31/+42
| | | | Looks good to miod@
* Use <dev/clock_subr.h> in dsrtc(4).visa2020-05-211-65/+82
| | | | | | Tested on IP30 with DS1687. Looks good to miod@
* ce examples of "Ar arg Ar arg" with "Ar arg arg" and stop the spread;jmc2020-04-231-6/+6
|
* Fix some of the more esoteric bus_space functions. Thekettenis2020-04-141-7/+8
| | | | | | | | | | bus_space_read_region_n, bus_space_write_region_n and bus_space_set_region_n functions were all broken. Same fix as arm64; Thanks to patrick@ for noting that mips64 had the same code. ok visa@
* Build bootecoff with divdi3.c. bootecoff needs __divdi3,visa2020-04-061-2/+2
| | | | | | but the linker does not complain about missing symbols. Prompted by miod@
* Enable FFS2 in sgi bootblocks and ramdisks.visa2020-04-069-11/+18
| | | | | | Tested with boot64 on IP30. State of boot32 and bootecoff is unknown. OK otto@, deraadt@
* Nuke unnecessary abstraction 'scsi_minphys()' which just callskrw2020-02-051-2/+2
| | | | | | 'minphys()'. Just use & check for NULL instead, since 'minphys()' is always called on the code path ([cd|sd|st]minphys) that calls physio().
* Use a consistant idiom/format when declaring scsi_adapter structureskrw2020-01-231-5/+2
| | | | | | | | | | | in drivers. Terse one liners, NULLs instead of 0's, explicitly specify all members, etc. Nuke #ifdef notyet blocks related to the scsi_adapter in aic. No intentional functional change. ok tedu@
* wire up pppac(4) to some majors on each arch.dlg2020-01-231-1/+2
| | | | | | | | 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@
* Import dt(4) a driver and framework for Dynamic Profiling.mpi2020-01-211-2/+3
| | | | | | | | | | | 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@
* Convert various boolean_t/TRUE/FALSE to int/1/0 in mips64 memory code.visa2019-12-202-8/+8
| | | | OK mpi@
* Replace a lonely TRUE.visa2019-12-201-2/+2
| | | | OK mpi@
* Add fido(4), a HID driver for FIDO/U2F security keysreyk2019-12-174-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Retguard will start using sections named ".openbsd.randomdata.retguard.*"guenther2019-11-091-1/+8
| | | | | | | | | | | | | and not just ".openbsd.randomdata.retguard". Accept both in the kernel ldscripts so that they're placed together between the __retguard_{start,end} symbols. Similarly, match not just ".openbsd.randomdata" but also ".openbsd.randomdata.*" to pick up other random (pun intended) items. While here, stub in those retguard bits into all the ldscripts. ok deraadt@
* The compiler -pg option implies -fno-ret-protector, as we want to disableguenther2019-11-071-2/+2
| | | | | | | | | | | 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@
* Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdataderaadt2019-10-292-3/+8
| | | | | | | | | 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
* merge version directly into codederaadt2019-10-283-50/+5
|
* sgi: iockbc(4), mkbc(4): tsleep(9) -> tsleep_nsec(9); ok kn@ visa@cheloha2019-10-172-4/+4
|
* Implement splassert() on mips64.visa2019-09-051-1/+17
|
* Adjust interrupt priority levels on mips64 so that prioritiesvisa2019-09-051-23/+20
| | | | | | of soft interrupts are lower than priorities of hard interrupts. This allows the delivery of hard interrupts while soft interrupts are masked.
* Remove DST/TIMEZONE options(4) from kernel configs; ok jca@ deraadt@cheloha2019-09-046-18/+6
|
* In the bootblocks, after discovering and opening /bsd.upgrade, fchmod -xderaadt2019-08-031-3/+3
| | | | | | | | | | | | | | | | so the file cannot be re-executed upon the next boot. This provides a stronger one-shot-upgrade model than the upgrade script's rm /bsd.upgrade. Now various forms of upgrade failure will reboot into /bsd, which is probably more recoverable. Performing fchmod -x depends on (1) use of MI boot.c (not alpha/macppc/sparc64/sgi/octeon) and (2) "can write blocks" functionality in the IO layer. Most architectures have this support now. Two diagnostics "fchmod a-x %s: failed" and "/bsd.upgrade is not u+x" will remain in the tree while refinements happen for some of the laggard architectures. based upon a discussion florian tested in snapshots for more than a week without any complaints