185 Commits

Author SHA1 Message Date
Travis Geiselbrecht
e47183725d [arch][arm64] move secondary cpu entry point to separate function
- Make the secondary entry point be logically separate function, though
  declared in the same file.
- Add a trick where the kernel base + 4 is the secondary entry point.
  Not really useful except makes it easy to compute the offset
  elsewhere.
- Changed the entry point to arm64_reset and move _start to the linker
  script, which is what most other arches do.
- While was in the linker script, make sure the text segment is aligned
  on MAXPAGESIZE, though doesn't make any real difference currently.
- Generally clean up the assembly in start.S with newer macros from
  Fuchsia, and avoid using ldr X, =value as much as possible.
- Fix and make sure arm64 can build and run with WITH_SMP set to false.
  Add a new no-smp project to test this.

Note this will likely break systems where all of the cpus enter the
kernel simultaneously, which we can fix if that becomes an issue.
Secondary code now completely assumes the cpu number is passed in x0.
This can be emulated with platform specific trampoline code if it needs
to that then just directs into the the secondary entry point, instead of
trying to make the arch code have to deal with all cases.
2025-10-12 19:47:33 -07:00
Travis Geiselbrecht
5016118509 [fpu] have the arch layers set WITH_NO_FPU based on the cpu
This will generally turn off more FPU codegen, even if its using
software fallback unless the project/target/platform selects a cpu that
has FPU support. This also turns off a few blocks of test code and the
upcoming floating point printf if it's not present on the arch.

This may break projects that were compiling for say cortex-m0 but
expected FPU code to be present. If so it should be pretty easy to
override it, but not going to add that yet unless it's necessary.
2025-10-08 23:50:53 -07:00
Travis Geiselbrecht
be07027fe1 [project][pc] add minip and all of the fses to all of the PC projects
Leave minip out of legacy PC right now since the registration scheme is
a bit broken and assumes e1000 is present.
2025-10-01 23:41:11 -07:00
Travis Geiselbrecht
c48cfcb5d0 [arch][arm64] add support for 64k pages
Already worked, just needed to set up the address space size and create
a new project.
2025-08-31 21:48:09 -07:00
Travis Geiselbrecht
fff0f2a740 [arch][arm64] add support for 16k pages 2025-08-31 21:47:32 -07:00
Mykola Hohsadze
a3660b8fb4 Add FVP Base platform 2025-05-04 20:58:02 +03:00
Travis Geiselbrecht
d1f4b4a546 [target][banana pi f3] quick n dirty port to the bananapi f3 board
A decent 8 core riscv64 board with dual ethernet and 2 or 4GB ram.

Fairly easy to bring up on, though not a lot of docs at the moment.
2024-06-19 16:43:16 -07:00
Kelvin Zhang
c750ed0fa3 Add basic UEFI loader to lk
Thids adds a uefi_load <block dev name> command, which will
parse the PE header and do some basic validation checks.

Bug: 294283461
Test: uefi_load virtio0
Change-Id: I97393652526bda5be1b995e59647e239c64d31d6
2024-06-14 15:26:15 -07:00
Travis Geiselbrecht
f99cc0f584 [project][fs] add partition sniffing code to the default fs virtual project 2024-05-25 16:22:12 -07:00
Travis Geiselbrecht
973a0ae466 [platform][qemu-virt-arm32] set the default cpu in one spot
The project file was setting cortex-a15, but the platform was also
setting it, so let the platform default stick.
2024-05-14 00:57:19 -07:00
Travis Geiselbrecht
2360f0fea1 [target][dartuino] properly mark files as needing float
Some routines inside the sensor bus code in dartuino need floating
point, so put those in MODULE_FLOAT_SRCS.

Also mark app/accellerometer as needing float.
2024-05-14 00:46:28 -07:00
Travis Geiselbrecht
c66ad44efa WIP [target][visionfive2] Add initial support for a VisionFive 2 RISC-V board
Still TODO:
-Set the timer rate properly
-Fix nonzero based hart secondary cpu boot
-Try to parse the device tree for some information
2023-03-06 01:06:27 -08:00
Travis Geiselbrecht
f6f43edc3c [fs][tests] break some fs tests into their own module
Include the test modules if the overal virtual/test module is included.
Also set a new global build system var along with a configuration
variable.
2022-04-25 23:17:55 -07:00
Travis Geiselbrecht
3229494b3b [fs][fat] rename from fat32 to simply fat
It also handles fat16 and (soon) fat12.
2022-04-21 21:37:34 -07:00
Travis Geiselbrecht
49644a2c39 [platform][rosco-m68k] Add port to the Rosco M68k board
Port to the really neat 68010 based board at https://rosco-m68k.com/

Port Features:
-10Mhz 68010
-1MB ram
-Dual UART + timer implemented as a 68c681 chip
-timer running at 1Khz, UART A for console
-interrupt driven RX support

Some amount of extending of the 68k exceptinon code was needed to
support the autovectored irqs that the 68681 uart uses. Added build
system support for 68010.
2022-04-12 00:25:12 -07:00
Travis Geiselbrecht
a2b41c11d2 [dev][pci] move the pci console commands into the pci bus driver
Remove app/pcitests since it was just the console commands.
2021-11-09 00:19:53 -08:00
Travis Geiselbrecht
12fee4b59a [arch][m68k] initial port to m68k
Uses the QEMU virt machine for 68k defined in qemu 6.0+.
Basic support that boots, prints to the console, takes input from
console, and context switches.

TODO: interrupt support, timer support.
2021-06-06 19:38:45 -07:00
Travis Geiselbrecht
a0b166c33b [platform][tms570] remove stale platform
Never fully worked.
2021-05-30 18:14:15 -07:00
Travis Geiselbrecht
3be4698671 [arch][test] add a new unittest for the arch mmu code
Just a skeleton at the moment, simply creates an arch aspace
and destroys it.
2021-03-30 02:48:59 -07:00
Travis Geiselbrecht
a0f34be4ec [project][pico-test] inherit all of the tests from the virtual test project 2021-02-15 21:06:05 -08:00
Brian Swetland
b142c6bdcd [rp20xx][pico] platform and target for rp20xx and pico board
- just a skeleton to get us started
- cpu feature config and irq names / vectab2 setup done
- pulled in the second stage for pico as a blob for now
- seems to be hard faulting out of systick setup in platform_init()
2021-02-05 19:25:19 -08:00
Travis Geiselbrecht
01f9a97dc1 [arch][openrisc] fix up and get the OpenRISC port working again
Previous to now it had always relied on a custom patched gcc
and a custom sim. In the interim since the initial port went in
some time in 2015 GCC and QEMU have both officially picked up support
for the architecture and the machine that was emulated in the previous
emultor.

Using gcc 10.2 fix up the build and get it basically working. Timers
seem to not be working right but it's probably fairly easy to fix.
2020-10-21 02:34:50 -07:00
Eric Holland
b720536fe6 Nordic nrfx usb driver integration 2020-09-09 20:24:10 -04:00
Eric Holland
0f36150464 [nordic] use nrfx platform libs 2020-08-31 11:52:37 -04:00
Travis Geiselbrecht
445283fd8c [lib][unittest] slight tidying of the unittest library
Added unittest lib to the test virtual project. Currently nothing uses
it.
2020-05-10 19:50:08 -07:00
Travis Geiselbrecht
9c71a0ec57 [platform][qemu-riscv] Fixup qemu-riscv target
-Fix plic driver to handle machine vs supervisor mode
-Add switch to scripts/do-qemuriscv to run in supervisor mode (with OpenSBI)
-Use the FDT to detect the number of cpus and size of memory
2020-01-19 14:48:25 -08:00
Elliot Berman
e137d70ccd [target][riscv] Add support for qemu-sifive-u virt machine
A copy/paste from sifive-unleashed but without PWM/LED.
2020-01-16 23:06:28 -08:00
Elliot Berman
d239adf839 [arch][riscv] Add basic support for SiFive HiFive Unleashed
Most of changes were moving around where macros were defined, plus the
following:
- Remove requirement for floating point on RV64 to support booting
  monitor core on U54 SoC.
- Add support for Debug LEDs on HiFive Unleashed Board
2020-01-16 23:06:28 -08:00
Venkatesh Srinivas
128890f8a8 [platform][tms570-launchpad] Skeleton of port to TI LaunchXL2-TMS57012
* Adds target tms570-launchpad, for TI TMS570 Launchpad Dev Kit
(https://www.ti.com/store/ti/en/p/product/?p=LAUNCHXL2-TMS57012)

* Adds CPU definitions for Cortex R4F (BE) CPU, implementing
  ARMv7-R ISA. Does not yet add definitions for ARMv7 arch entry
  functions.

* Board does not yet build - platform.c/uart.c are empty, no GIC
  entry points provided.
2019-11-18 15:36:28 -08:00
Travis Geiselbrecht
fdc08a8446 [arch][riscv] port to riscv64
Very little needed to port except to conditionalize some assembly in the
context switch and exception code. Mostly needed to move build system
stuff around and add a new project.
2019-11-02 17:21:13 -07:00
Travis Geiselbrecht
ae5200595c [platform][riscv-virt] added support for QEMU's riscv 'virt' machine
The virt machine is a generic target, much like the arm virt machine.
Intended to be simple to use and a good target to run large systems like
linux on. At the moment simply support booting and simple uart and timer
support.
2019-11-02 14:19:36 -07:00
Travis Geiselbrecht
ad246760ff [c++] remove WITH_CPP_SUPPORT flag
Just always build with it enabled.
2019-07-13 17:41:25 -07:00
Travis Geiselbrecht
d607a93b86 [project][arm] remove the project switches to disable linker gc 2019-07-13 17:37:25 -07:00
Travis Geiselbrecht
4aa556b837 [project][qemu-virt-arm32-minimal] add a new project that doesnt' enable as much
Useful for testing when the console is off.
2019-07-13 17:11:48 -07:00
Martin Foo
b66bd3e420 Add STM32F429I-DISCO1 support(default serial:USART1). 2019-06-19 18:18:52 -07:00
Travis Geiselbrecht
291bdce364 [project][qemu-virt-arm] rename to arm32 and arm64
Less confusing than a15 and a53
2019-03-30 20:11:22 -07:00
Travis Geiselbrecht
4148863969 [platform][qemu-virt] rename to qemu-virt-arm
Makes space for a new platform using the virt machine in qemu on another
architecture.
2019-03-30 19:46:30 -07:00
Travis Geiselbrecht
a0a6b10e0b [arch][riscv32] rename the qemu target sifive-e
The initial port is really a Sifive E platform. Call it what it is and
make space for bringing up the Sifive U and virt qemu target.
2019-02-17 20:29:50 -08:00
Travis Geiselbrecht
1fbb67228d [platform][pc] get working on legacy 386 PC
-Add support for x86 legacy mode, designed for 386+ instead of pentium+
-Fixup uart driver to support com2
-Stub out PCI driver properly
-Fixup IDE driver to detect legacy disks
2018-12-30 21:08:58 -08:00
Travis Geiselbrecht
8cf28bbdcf [arch][riscv] Initial port to a riscv32 sifive target
Currently targets qemu's sifive_e machine, which is a split flash/ram
machine, much like the Sifive HiFive1. Untested as of yet on a real
HiFive1.

Basic support including interrupts and architectural timers in place.
2018-12-16 16:44:23 -08:00
Macpaul Lin
65ebf5857d [project][mt6735] add common project mt6735
This common project was based on another project mt6797.
The target platform is mt6735.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
2018-05-22 00:05:46 -07:00
Eric Holland
31b8d1d217 [nrf] Support for NRF52840 DK 2018-05-02 14:50:41 -07:00
Payam
6e05388579 [vim2] Initial support for Khadas VIM2 boards 2018-03-16 15:05:10 -07:00
Erik Gilling
e84ad6e5c1 [nucleo-f072rb] Add usb support. 2017-10-20 17:11:47 -07:00
Eric Holland
b8f77ca483 [bcm][gfx] gfx driver for raspberry pi 2017-02-06 18:52:08 -08:00
Eric Holland
1164bc17bc [rpi3]64bit platform support 2016-08-23 12:28:13 -07:00
Minglun Tsai
919a925eca [platform][mediatek] support mediatek platform: mt6797 (#137)
Basic mt6797 platform S/W for lk.
2016-06-21 09:53:03 -07:00
Eric Holland
6388cde233 [nrf52] Platform and sample target support for Nordic NRF52 (cortex-M4) 2016-06-16 16:31:53 -07:00
Gurjant Kalsi
5a98fbd3b9 [dartuino] Move LCD defines to target level makefile 2016-04-05 13:31:41 -07:00
Gurjant Kalsi
44e74f0486 [dartuino][bootloader] Merge bootloader branch into master. 2016-03-28 12:05:20 -07:00