History log of /openbsd/sys/arch/octeon/octeon/machdep.c (Results 1 – 25 of 137)
Revision Date Author Comments
# bb00e811 24-Oct-2023 claudio <claudio@openbsd.org>

Normally context switches happen in mi_switch() but there are 3 cases
where a switch happens outside. Cleanup these code paths and make the
machine independent.

- when a process forks (fork, tfork,

Normally context switches happen in mi_switch() but there are 3 cases
where a switch happens outside. Cleanup these code paths and make the
machine independent.

- when a process forks (fork, tfork, kthread), the new proc needs to
somehow be scheduled for the first time. This is done by proc_trampoline.
Since proc_trampoline is machine dependent assembler code change
the MP specific proc_trampoline_mp() to proc_trampoline_mi() and make
sure it is now always called.
- cpu_hatch: when booting APs the code needs to jump to the first proc
running on that CPU. This should be the idle thread for that CPU.
- sched_exit: when a proc exits it needs to switch away from itself and
then instruct the reaper to clean up the rest. This is done by switching
to the idle loop.

Since the last two cases require a context switch to the idle proc factor
out the common code to sched_toidle() and use it in those places.

Tested by many on all archs.
OK miod@ mpi@ cheloha@

show more ...


# 24ee467d 04-Feb-2023 cheloha <cheloha@openbsd.org>

timecounting: remove incomplete PPS support

The timecounting code has had stubs for pulse-per-second (PPS) polling
since it was imported in 2004. At this point it seems unlikely that
anyone is goin

timecounting: remove incomplete PPS support

The timecounting code has had stubs for pulse-per-second (PPS) polling
since it was imported in 2004. At this point it seems unlikely that
anyone is going to finish adding PPS support, so let's remove the stubs:

- Delete the dead tc_poll_pps() call from tc_windup().
- Remove all tc_poll_pps symbols from the kernel.

Link: https://marc.info/?l=openbsd-tech&m=167519035723210&w=2

ok miod@

show more ...


# 57919513 11-Jan-2023 visa <visa@openbsd.org>

Enable TLB read inhibit on OCTEON Plus and newer SoCs.

OK deraadt@


# f016eb63 24-Jul-2021 visa <visa@openbsd.org>

Replace cpus_running with CPU_IS_RUNNING().


# 5c29d161 12-Jul-2021 visa <visa@openbsd.org>

Remember to set CPUF_RUNNING on secondary CPUs.


# f4728271 12-Jul-2021 visa <visa@openbsd.org>

Make hw_cpu_hatch() more similar on loongson and octeon.


# f6d8fcae 16-May-2021 deraadt <deraadt@openbsd.org>

panic does not require a \n at the end. When one is provided, it looks wrong.


# 4d62617a 09-Mar-2021 visa <visa@openbsd.org>

Add initial bits for Check Point UTM-1 EDGE N.

From Thaison Nguyen


# 133fffba 04-Feb-2021 visa <visa@openbsd.org>

Handle Netgear ProSecure UTM25

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 t

Handle Netgear ProSecure UTM25

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!

show more ...


# 2bbf581c 30-Jan-2021 visa <visa@openbsd.org>

Abstract octeon board handling a little

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 man

Abstract octeon board handling a little

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.

show more ...


# 757e7193 18-Jul-2020 visa <visa@openbsd.org>

Userland timecounter implementation for octeon

OK naddy@; no objections from kettenis@


# 9e8849fb 11-Jul-2020 visa <visa@openbsd.org>

Synchronize each core's CP0 cycle counter using the IO clock counter.
This makes the cycle counter usable as timecounter on multiprocessor
machines.

Idea from Linux.

Tested on CN5020, CN6120, CN713

Synchronize each core's CP0 cycle counter using the IO clock counter.
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@

show more ...


# d82e6535 06-Jul-2020 pirofti <pirofti@openbsd.org>

Add support for timeconting in userland.

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

Add support for timeconting in userland.

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@

show more ...


# 3af74596 05-Jun-2020 visa <visa@openbsd.org>

cpu_rnd_messybits() for mips64

Use CP0 Count as a basis. Also take noise from virtual memory activity
by including BadVAddr.

OK deraadt@ dlg@


# 01802d2c 31-May-2020 dlg <dlg@openbsd.org>

introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.

rnd.c uses nanotime to get access to some bits that change quickly
between events that it can mix into the entropy pool. it do

introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.

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.

show more ...


# c8f27247 29-May-2020 deraadt <deraadt@openbsd.org>

dev/rndvar.h no longer has statistical interfaces (removed during various
conversion steps). it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, whi

dev/rndvar.h no longer has statistical interfaces (removed during various
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.

show more ...


# a084a2f8 25-May-2020 visa <visa@openbsd.org>

Pass boothowto from the bootloader to the kernel on octeon.

OK deraadt@


# 11a38f5d 25-May-2020 visa <visa@openbsd.org>

Mix board information into the entropy pool.

The data are static but they introduce differences between systems.

OK deraadt@


# 94483548 20-Dec-2019 visa <visa@openbsd.org>

Convert various boolean_t/TRUE/FALSE to int/1/0 in mips64 memory code.

OK mpi@


# 874cea07 28-Sep-2019 deraadt <deraadt@openbsd.org>

rename the 'cn30xx' drivers to just 'oct', because digits inside devices
drivers is gross. discussed with visa.


# 0b81d999 31-Jul-2019 visa <visa@openbsd.org>

Fix kmem access on octeon. Currently, mem_layout lists segments that
were free after the kernel was loaded. The memory occupied by the kernel
image is not included. To let libkvm access the image thr

Fix kmem access on octeon. Currently, mem_layout lists segments that
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.

show more ...


# aec35e2f 17-Jul-2019 visa <visa@openbsd.org>

Adjust search of symbol table pointers to match with the bootloader.


# 3a62b615 17-Jul-2019 visa <visa@openbsd.org>

Add a bootloader for octeon.

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 d

Add a bootloader for octeon.

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@

show more ...


# 2128b5b2 12-Jul-2019 visa <visa@openbsd.org>

Remove unnecessary extern declarations.


# 70c43862 12-Jul-2019 visa <visa@openbsd.org>

Make rootdev parsing a little saner. The "rootdev=" prefix can be
removed already in process_bootargs(). Pass the value as a parameter
to parse_uboot_root(). Set uboot_rootdev only if parsing succeed

Make rootdev parsing a little saner. The "rootdev=" prefix can be
removed already in process_bootargs(). Pass the value as a parameter
to parse_uboot_root(). Set uboot_rootdev only if parsing succeeds.

show more ...


123456