summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
AgeCommit message (Collapse)Author
2021-02-11Leave out gp initialization from kernel entry on mips64Visa Hankala
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@
2021-02-06Revise kernel's ld.script on octeonVisa Hankala
This allows more control over the structure of the linked kernel image. Now the ELF .openbsd.randomdata segment can be omitted from BOOT kernel. The segment has caused trouble with broken firmware when the firmware tries to load it on top of the actual kernel segment. Discussed with and OK deraadt@
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-02-04Handle Netgear ProSecure UTM25Visa Hankala
This makes the system recognize and configure Netgear ProSecure UTM25. Of the network ports, LAN1-4 and WAN1 are functional. WAN2 does not work for some reason. Even though WAN1 has a separate link to the SoC, the connection appears to go through the same switch that the LAN ports use. At the moment, the system relies on U-Boot to set up the switch so that the LAN and WAN segments stay separate. Initial diff and input from Thaison Nguyen, thank you!
2021-01-30Abstract octeon board handling a littleVisa Hankala
Detect octeon board model in one place, and replace firmware-supplied board_type with an abstract model identifier in driver code. This makes it easier to manage with different products, and board flavours, that happen to use the same model information, such as board_type.
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@
2021-01-01Add kstat to ogx(4).Visa Hankala
2020-12-31Enable IPv4 and TCP/UDP checksum offload on transmission.Visa Hankala
2020-12-12Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.jan
OK dlg@, bluhm@ No Opinion mpi@ Not against it claudio@
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-10-25Revert accidental commit.Visa Hankala
2020-10-25Add missing firmload attribute.Visa Hankala
2020-10-10Remove unnecessary count of device instances.Visa Hankala
2020-09-10Add I2C bus scan routine for octiic(4)Visa Hankala
Unfortunately, machines tend to come with underpopulated device trees, and consequently this change is not very useful as is. The lack of good data is troublesome especially with things like I2C bus switches.
2020-09-10Register octiic(4) with the I2C frameworkVisa Hankala
This generally is an exercise in futility because the phandle of the controller node tends to be missing.
2020-09-09Make ogx(4)'s outbound bpf(4) tap actually workVisa Hankala
2020-09-08Clean up attachment of octgmx(4) a bitVisa Hankala
2020-09-08Handle AGL interfaceVisa Hankala
This makes certain machines' management network port usable.
2020-09-04Add kstat to cnmac(4)Visa Hankala
This makes various receive and transmit event counters readable. This additionally replaces the old, and somewhat unusual, way of updating error counters in ifp. Most of the hardware counters are 32 bits wide. Hence the code polls them periodically and adds the values to 64-bit software counters. The hardware counters are cleared when read.
2020-09-02vfs_shutdown() is neccessary to ensure buffer cache drain before reexec()Theo de Raadt
ok kettenis visa
2020-08-28Make fdt root node's model property readable through sysctl hw.productVisa Hankala
2020-08-15Remove unused headersVisa Hankala
2020-08-15Inline handling of receive checksum offloadVisa Hankala
2020-07-24Suppress kernel printf output in the octeon boot kernel.Visa Hankala
OK kettenis@
2020-07-18Userland timecounter implementation for octeonVisa Hankala
OK naddy@; no objections from kettenis@
2020-07-11Synchronize each core's CP0 cycle counter using the IO clock counter.Visa Hankala
This makes the cycle counter usable as timecounter on multiprocessor machines. Idea from Linux. Tested on CN5020, CN6120, CN7130 and CN7360. Looks reasonable to kettenis@
2020-07-10Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.Patrick Wildt
ok dlg@ tobhe@
2020-07-08Make membar_consumer() a plain compiler barrier in kernel on octeon.Visa Hankala
The processor does not perform speculative reads and only one of its execution pipes should issue memory accesses. As a result, loads should happen in the correct order without barrier instructions. Tested on CN5020, CN6120, CN7130 and CN7360. This diff has been in use on the octeon-based mips64 bulk build cluster for several months. Also tested in snaps for a while.
2020-07-06IEEE1275 (Open Firmware) defines that parameter name strings can have aMark Kettenis
length of up to 31 characters. This limit is also present in the flattened device tree specification/ Unfortunately this limit isn't enforced by the tooling and there are systems in the wild that use longer strings. This includes the device trees used on POWER9 systems and has been seen on some ARM systems as well. So bump the buffer size from 32 bytes (31 + terminating NUL) to 64 bytes. Centrally define OFMAXPARAM to this value (in <dev/ofw/openfirm.h>) replacing the various OPROMMAXPARAM definition scattered around the tree to make sure the FDT implementation of OF_nextprop() uses the same buffer size as its consumers. Eliminate the static buffer in various openprom(4) implementations on FDT systems. Makes it possible to dump the full device tree on POWER9 systems using eeprom -p. ok deraadt@, visa@
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-07-04Remove no-op cn30xxgmx_reset_board().Visa Hankala
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-06-30Use <dev/clock_subr.h> in octrtc(4).Visa Hankala
OK pirofti@
2020-06-27TNF rescinded clauses 3 & 4 in 2008 in NetBSD.Jonathan Gray
2020-06-13Remove a dead store.Visa Hankala
2020-06-05cpu_rnd_messybits() for mips64Visa Hankala
Use CP0 Count as a basis. Also take noise from virtual memory activity by including BadVAddr. OK deraadt@ dlg@
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-29dev/rndvar.h no longer has statistical interfaces (removed during variousTheo de Raadt
conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
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-05-26Check outcome of loadrandom() on octeonVisa Hankala
If loadrandom() succeeds, set RB_GOODRANDOM in boothowto. To enable fchmod(), disk_open() has to mount the filesystem in writable mode. This is tricky because the filesystem might be unclean. Hence the code has to use MNT_FORCE. Input and OK deraadt@
2020-05-26Rework kernel loading with octboot(4)Visa Hankala
Load the kernel image from the filesystem upfront in rdboot and pass the loaded image to octboot(4)'s kexec call in a memory buffer. As a result, octboot(4) does not rely on a mounted filesystem. OK deraadt@
2020-05-25that dependency change breaks something else. sigh.Theo de Raadt
2020-05-25Pass boothowto from the bootloader to the kernel on octeon.Visa Hankala
OK deraadt@
2020-05-25Mix board information into the entropy pool.Visa Hankala
The data are static but they introduce differences between systems. OK deraadt@
2020-05-25The dependencies were insufficient.Theo de Raadt
2020-05-14The dwctwo(4) FDT glue is now identical on armv7 and arm64. Move it toMark Kettenis
/dev/fdt. ok patrick@, visa@
2020-04-14Fix some of the more esoteric bus_space functions. TheMark Kettenis
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@