summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
AgeCommit message (Collapse)Author
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@
2020-04-06Update my email address.Paul Irofti
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-20Convert various boolean_t/TRUE/FALSE to int/1/0 in mips64 memory code.Visa Hankala
OK mpi@
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-12-01this hexdump tie-in is incorrect, disable for nowTheo de Raadt
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-09Retguard will start using sections named ".openbsd.randomdata.retguard.*"Philip Guenther
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@
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-11-04Add ogx(4), a driver for the OCTEON III network processor.Visa Hankala
This network driver covers higher-end models of the OCTEON III family. They have a modified design whose interface is not compatible with the lower-end models or earlier chip generations. The code is still a work in progress. However, it is capable enough to make the SGMII port functional on the CN7360. No objection from deraadt@
2019-11-01Reduce BOOTRANDOM_MAX to 256. naddy pointed out there's no point havingTheo de Raadt
it larger than RC4STATE. A long discussion ensued. In conclusion all entropy inputs are either satisfactory enough, or just as shitty at 512.
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
2019-10-07octmmc(4): msleep(9) -> msleep_nsec(9); ok visa@ kn@cheloha
2019-09-29Configure USB port power control if the power GPIO is defined in fdt.Visa Hankala
2019-09-29Add option to configure GPIO output select.Visa Hankala
2019-09-28rename the 'cn30xx' drivers to just 'oct', because digits inside devicesTheo de Raadt
drivers is gross. discussed with visa.
2019-09-24Enable eephy(4) on octeon.Visa Hankala
OK deraadt@
2019-09-22Remove unused register dump lists.Visa Hankala
2019-09-22Simplify stat register access.Visa Hankala
2019-09-22Ignore non-host ports silently.Visa Hankala
2019-09-20Remove an unused function.Visa Hankala
2019-09-20Pass interface number as an explicit parameter to avoid decoding.Visa Hankala
2019-09-15Attach packet interfaces to octpip to use fdt.Visa Hankala
2019-09-15Add a driver for the packet input processing unit. For now, the purposeVisa Hankala
of this piece of code is to facilitate the use of fdt.
2019-09-15Add the pip unit into the fdt blob.Visa Hankala
2019-09-07Enable nvme(4) on octeon.Visa Hankala
2019-09-07Add a driver for the PCIe controller found on OCTEON II and OCTEON III.Visa Hankala
2019-09-05Implement splassert() on mips64.Visa Hankala
2019-09-05Adjust interrupt priority levels on mips64 so that prioritiesVisa Hankala
of soft interrupts are lower than priorities of hard interrupts. This allows the delivery of hard interrupts while soft interrupts are masked.
2019-09-04Remove DST/TIMEZONE options(4) from kernel configs; ok jca@ deraadt@cheloha
2019-09-01Make it clearer where message "spurious interrupt" comes from.Visa Hankala
2019-08-04Ensure that a posted write completes when re-enabling interruptsVisa Hankala
or sending an IPI.
2019-08-04Remove the old, unfinished octeon bootloader.Visa Hankala
2019-08-04Revise the way how the octeon bootloader is built. The originalVisa Hankala
approach was not right, and there is still room for improvement. OK deraadt@
2019-08-01Fix fd leak that broke disk_close().Visa Hankala
2019-07-31Fix kmem access on octeon. Currently, mem_layout lists segments thatVisa Hankala
were free after the kernel was loaded. The memory occupied by the kernel image is not included. To let libkvm access the image through /dev/kmem, return true from is_memory_range() if the physical address is within the kernel.
2019-07-28Link octeon bootloader to the build.Visa Hankala
OK deraadt@
2019-07-28Add a dedicated ramdisk entry for the octeon bootloader to reduceVisa Hankala
the size of the "boot" file. OK deraadt@
2019-07-28With the DWC2 reset in place, dwctwo(4) should be safe to useVisa Hankala
in the bootloader.
2019-07-28Put DWC2 controller into reset mode on (pseudo-)shutdown to makeVisa Hankala
kernel handover safer.
2019-07-28Fix trimming of newline.Visa Hankala
2019-07-17Disable for now.Visa Hankala
2019-07-17Adjust search of symbol table pointers to match with the bootloader.Visa Hankala
2019-07-17Add a bootloader for octeon.Visa Hankala
The firmware on OCTEON machines usually does not provide an interface for accessing devices, which has made it tricky to implement an OpenBSD bootloader. To solve this device access problem, this new loader has been built on top of a small kernel. The kernel provides all the necessary devices drivers, while most of the usual bootloader logic is in a userspace program in a ramdisk. The loader program is accompanied by a special device, octboot(4). The main purpose of this device is to implement a mechanism for loading and launching kernels. The mechanism has been inspired by Linux' kexec(2) system call. The bootloader will be enabled later when it is ready for general use. Discussed with deraadt@
2019-07-12Remove unnecessary extern declarations.Visa Hankala