summaryrefslogtreecommitdiff
path: root/sys/arch/octeon/include
AgeCommit message (Collapse)Author
2022-01-08Adjust debug printfs after pcitag_t type change.Visa Hankala
2022-01-06Use a 64-bit integer for pcitag_t and define PCITAG_NODE and PCITAG_OFFSETTheo de Raadt
macros to make kernel build again, same diff as armv7. ok kettenis visa
2021-03-11spellingJonathan Gray
2021-03-09Add initial bits for Check Point UTM-1 EDGE N.Visa Hankala
From Thaison Nguyen
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.
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-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-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-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-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-27TNF rescinded clauses 3 & 4 in 2008 in NetBSD.Jonathan Gray
2020-05-27Retire <machine/varargs.h>.Visa Hankala
Nothing uses the header anymore. OK deraadt@ mpi@
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-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@
2019-09-29Add option to configure GPIO output select.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-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-12Make rootdev parsing a little saner. The "rootdev=" prefix can beVisa Hankala
removed already in process_bootargs(). Pass the value as a parameter to parse_uboot_root(). Set uboot_rootdev only if parsing succeeds.
2019-03-21Remove struct intrhand. It is no longer used on octeon.Visa Hankala
2019-03-17Let each interrupt controller driver choose how to implementVisa Hankala
intr_barrier(9). With this change, the barrier should finally work properly with cnmac(4) interrupts that have been assigned to secondary cores.
2018-12-18Figure out the number of available CPUs using system fuse registers.Visa Hankala
This makes `ncpusfound' independent of kernel boot parameters. The kernel still needs the help of the firmware to spin up secondary CPUs, so the `coremask' or `numcores' boot parameter is still needed for multicore operation. Tested on CN5020, CN6120, CN7130 and CN7360.
2018-12-04Add processor IDs for several OCTEON II and III SoCs.Visa Hankala
2018-08-20Remove unused spllock().Visa Hankala
OK deraadt@ mpi@
2018-08-09Define __HAVE_ACPI on arm64 and __HAVE_FDT on arm64, armv7 and octeonPatrick Wildt
so that we can include firmware-dependant code in generic drivers to be able to extract metadata information like MAC addresses and out-of-band interrupts from the ACPI/FDT tables. ok kettenis@
2018-08-06Give the FDT interrupt API a more generic naming by replacing thePatrick Wildt
arm_intr_* prefix with fdt_intr_*. ok kettenis@
2018-06-18Improve indentation and variable naming.Visa Hankala
2018-06-18Fix build with DEBUG_PCI_CONF.Visa Hankala
From jj@
2018-04-09Add a driver for the OCTEON cryptographic unit. It providesVisa Hankala
a hardware-accelerated implementation of several encryption and authentication algorithms for ipsec(4): AES-CBC AES-CTR AES-GCM AES-GMAC HMAC-MD5 HMAC-SHA1 HMAC-SHA2-256 HMAC-SHA2-384 HMAC-SHA2-512 Please note that the driver is currently disabled. OK deraadt@
2018-02-18Inline hw_{get,set}curcpu() to streamline the machine code.Visa Hankala
2018-01-22Include <sys/mutex.h> instead of <machine/mutex.h>Martin Pieuchot
required by upcoming MI mutex change.
2018-01-18Fix the computation of `ncpusfound' on !MULTIPROCESSOR kernels so thatVisa Hankala
the value matches with the number of cores that GENERIC.MP uses. OK deraadt@, krw@, pirofti@
2018-01-08Override membar_producer() for octeon.Visa Hankala
OK dlg@
2017-11-20Add the board ID of the Unifi Security Gateway PRO-4.Visa Hankala
Not tested with the hardware.
2017-11-20Fix the product code of the Unifi Security Gateway.Visa Hankala
Prompted by Justin Hibbits
2017-11-18Add the board ID for the Ubiquiti Unifi Security Gateway.Visa Hankala
From Justin Hibbits, thanks!
2017-11-05Add a function for getting the current core's hardware identifier.Visa Hankala
For now, the kernel does enforce one-to-one mapping between logical cpuids and hardware coreids, but the reliance on that should be removed eventually.
2017-11-02Assign each cnmac(4) port its own input work group, and assignVisa Hankala
the interrupt processing of each work group to one of the available CPUs. This enables some parallelism in the early stages of packet Rx.
2017-11-01Add readiness to utilize LMTDMA operations.Visa Hankala
2017-11-01Fix the addressing of CVMSEG. The base address already points toVisa Hankala
the correct address space for direct referencing. Previous code has worked because the address conversion has only set bits that are already on.
2017-08-12Add a dummy (for now) <machine/reloc.h> for mips64 to fix build.Visa Hankala
OK guenther@
2017-07-31Replace OCTEON_MAXCPUS with MAXCPUS to avoid redundancy.Visa Hankala
2017-07-30Bump VM_PHYSSEG_MAX.Visa Hankala
2017-07-30Bump MAXCPUS on octeon.Visa Hankala
2017-07-30Define MAXCPUS per mips64 port.Visa Hankala
2017-07-29There is no RTC on the E300 boards.Visa Hankala
2017-07-28Add a workaround that allows the use of sys/dev/fdt code on octeon.Visa Hankala
OK kettenis@