ladybird/Kernel/Arch/riscv64
Jesse Buhagiar a0dd6ec6b1 Kernel/USB: Add driver_init section
At any one given time, there can be an abitrary number of USB drivers in
the system. The way driver mapping works (i.e, a device is inserted, and
a potentially matching driver is probed) requires us to have
instantiated driver objects _before_ a device is inserted. This leaves
us with a slight "chicken and egg" problem. We cannot call the probe
function before the driver is initialised, but we need to know _what_
driver to initialise.

This section is designed to store pointers to functions that are called
during the last stage of the early `_init` sequence in the Kernel. The
accompanying macro in `USBDriver` emits a symbol, based on the driver
name, into this table that is then automatically called.

This way, we enforce a "common" driver model; driver developers are not
only required to write their driver and inherit from `USB::Driver`, but
are also required to have a free floating init function that registers
their driver with the USB Core.
2023-09-18 11:09:19 -06:00
..
boot.S Kernel: Add riscv64 assembly startup code 2023-08-29 11:07:06 +02:00
linker.ld Kernel/USB: Add driver_init section 2023-09-18 11:09:19 -06:00
mcontext.h Toolchain: Add (basic) support for riscv64 2023-08-11 09:20:08 +02:00
SBI.cpp Kernel/riscv64: Add basic SBI support 2023-09-07 11:56:34 -06:00
SBI.h Kernel/riscv64: Add basic SBI support 2023-09-07 11:56:34 -06:00