History log of /openbsd-current/sys/arch/riscv64/conf/files.riscv64
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.29 27-Jan-2024 kettenis

On Allwinner D1, the SBI call to schedule timer interrupts doesn't work.
Instead we have to use one of the timers integerated on the SoC that
triggers an external interrupt. Add the appropriate driver and change
the MD clock code to hook it up.

ok cheloha@, jca@


# 1.28 01-Jan-2024 kettenis

Move fdt attachment into sys/conf/files.conf instead of duplicating it on
an MD basis.

ok patrick@


Revision tags: OPENBSD_7_4_BASE
# 1.27 23-Sep-2023 kettenis

Add stfrng(4), a driver for the random number generator on the JH7110 SoC.

ok joel@, jca@


# 1.26 21-Aug-2023 miod

Remove dead code.


# 1.25 08-Jul-2023 kettenis

Add support for the PCIe controller on the JH7110 SoC.

MSIs don't work reliably so these are disabled for now. The stfpcie(4)
driver is based on preliminary device tree bindings that might still
change.

ok patrick@


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.24 12-Jun-2022 kettenis

Add stftemp(4), a driver for the temperature sensor integrated on the
StarFive JH7100 SoC.

ok jsg@


# 1.23 08-Jun-2022 kettenis

Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.28 01-Jan-2024 kettenis

Move fdt attachment into sys/conf/files.conf instead of duplicating it on
an MD basis.

ok patrick@


Revision tags: OPENBSD_7_4_BASE
# 1.27 23-Sep-2023 kettenis

Add stfrng(4), a driver for the random number generator on the JH7110 SoC.

ok joel@, jca@


# 1.26 21-Aug-2023 miod

Remove dead code.


# 1.25 08-Jul-2023 kettenis

Add support for the PCIe controller on the JH7110 SoC.

MSIs don't work reliably so these are disabled for now. The stfpcie(4)
driver is based on preliminary device tree bindings that might still
change.

ok patrick@


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.24 12-Jun-2022 kettenis

Add stftemp(4), a driver for the temperature sensor integrated on the
StarFive JH7100 SoC.

ok jsg@


# 1.23 08-Jun-2022 kettenis

Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.27 23-Sep-2023 kettenis

Add stfrng(4), a driver for the random number generator on the JH7110 SoC.

ok joel@, jca@


# 1.26 21-Aug-2023 miod

Remove dead code.


# 1.25 08-Jul-2023 kettenis

Add support for the PCIe controller on the JH7110 SoC.

MSIs don't work reliably so these are disabled for now. The stfpcie(4)
driver is based on preliminary device tree bindings that might still
change.

ok patrick@


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.24 12-Jun-2022 kettenis

Add stftemp(4), a driver for the temperature sensor integrated on the
StarFive JH7100 SoC.

ok jsg@


# 1.23 08-Jun-2022 kettenis

Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.26 21-Aug-2023 miod

Remove dead code.


# 1.25 08-Jul-2023 kettenis

Add support for the PCIe controller on the JH7110 SoC.

MSIs don't work reliably so these are disabled for now. The stfpcie(4)
driver is based on preliminary device tree bindings that might still
change.

ok patrick@


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.24 12-Jun-2022 kettenis

Add stftemp(4), a driver for the temperature sensor integrated on the
StarFive JH7100 SoC.

ok jsg@


# 1.23 08-Jun-2022 kettenis

Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.25 08-Jul-2023 kettenis

Add support for the PCIe controller on the JH7110 SoC.

MSIs don't work reliably so these are disabled for now. The stfpcie(4)
driver is based on preliminary device tree bindings that might still
change.

ok patrick@


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.24 12-Jun-2022 kettenis

Add stftemp(4), a driver for the temperature sensor integrated on the
StarFive JH7100 SoC.

ok jsg@


# 1.23 08-Jun-2022 kettenis

Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.24 12-Jun-2022 kettenis

Add stftemp(4), a driver for the temperature sensor integrated on the
StarFive JH7100 SoC.

ok jsg@


# 1.23 08-Jun-2022 kettenis

Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.23 08-Jun-2022 kettenis

Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.22 06-Jun-2022 kettenis

Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.

ok jsg@


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.21 30-May-2022 kettenis

Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@


Revision tags: OPENBSD_7_1_BASE
# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.20 18-Feb-2022 visa

Add mpfgpio(4), a driver for the PolarFire SoC MSS GPIO controller.

Feedback and OK kettenis@


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.19 16-Feb-2022 visa

Add mpfiic(4), a driver for the PolarFire SoC MSS I2C controller.

OK kettenis@


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.18 05-Jan-2022 visa

Add mpfclock(4), a driver for the PolarFire SoC MSS clock controller.

OK kettenis@


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.17 05-Oct-2021 deraadt

cleanup conf.c, and bring in wd(4) support
ok kettenis


Revision tags: OPENBSD_7_0_BASE
# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.16 29-Jun-2021 matthieu

sync maxusers with other 64bits architectures. ok kettenis@, deraadt@.


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.15 25-Jun-2021 matthieu

basic radeondrm / X support for riscv64. Ok kettenis@

- add wscons devices
- build radeondrm and add MD uvm bits to support it.


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.14 17-Jun-2021 kettenis

Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) block
of the SiFive FU740 SoC.

ok deraadt@


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.13 14-Jun-2021 deraadt

Add a few more drivers that people might need.
ok drahn


# 1.12 14-Jun-2021 drahn

enable nvme, a few pci devices and a bunch of usb stuff.
will cleanup later, enabling additional systems.


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.11 12-Jun-2021 drahn

Serial driver for SiFive Unmatched (U74) based on dev/fdt/amluart.c
console input and output working, userland input and output at least
partially working.
'commit that driver, further improvements can happen in-tree' deraadt@


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.10 19-May-2021 kettenis

Add PCI support.

ok deraadt@


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.9 12-May-2021 jsg

add OpenBSD rcs ids


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.8 06-May-2021 jsg

enable dwmmc(4)


# 1.7 05-May-2021 kettenis

The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.

ok drahn@


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.6 05-May-2021 jsg

rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@


# 1.5 04-May-2021 kettenis

The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.

Fixes hangs seen on real hardware.

ok jsg@, drahn@


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.4 01-May-2021 kettenis

Implement early console functionality based on available SBI calls.

While these calls are part of the legacy extensions and deprecated, they
are really useful for debugging purposes.

ok jsg@


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.3 25-Apr-2021 jsg

cleanup riscv64 config glue

ok kettenis@ visa@


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>


# 1.2 23-Apr-2021 jsg

reuse arm64 openprom(4) on riscv64
ok kettenis@


# 1.1 23-Apr-2021 drahn

Initial import of OpenBSD/riscv64

This work is based on the effort:
https://www.openbsd.org/papers/Porting_OpenBSD_to_RISCV_FinalReport.pdf
"Porting OpenBSD to RISC-V ISA"
by
Brian Bamsch <bbamsch@google.com>
Wenyan He <wenyan.he@sjsu.edu>
Mars Li <mengshi.li.mars@gmail.com>
Shivam Waghela <shivamwaghela@gmail.com>

With additional work by Dale Rahn <drahn@openbsd.org>