Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ class KernelPath:
"KernelCustomDTSOverlay": Path("custom_dts/overlay-zynqmp-kria-k26.dts"),
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
),
BoardInfo(
name="stm32mp2",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a35",
loader_link_address=0x88000000,
smp_cores=2,
kernel_options={
"KernelPlatform": "stm32mp2",
"KernelARMPlatform": "stm32mp257f-ev1",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
),
BoardInfo(
name="tqma8xqp1gb",
arch=KernelArch.AARCH64,
Expand Down
25 changes: 25 additions & 0 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,7 @@ The currently supported platforms are:
* rpi4b_8gb
* serengeti
* star64
* stm32mp25_ev1
* tqma8xqp1gb
* ultra96v2
* x86_64_generic
Expand Down Expand Up @@ -1556,6 +1557,30 @@ ZynqMP> tftpboot 0x40000000 loader.img
ZynqMP> go 0x40000000
```

## STM32MP25 evaluation board {#stm32mp25_ev1}

A newly flashed card will autoboot to Linux. You will need to break (Ctrl+c) or disable autoboot. When entering the U-Boot console, load the Microkit binary image at address 0x88000000:

For initial SD card file system flashing using the initial first-stage boot loader TF-A,
please see the instructions on the
[seL4 website](https://docs.sel4.systems/Hardware/MP25EV1.html).

For example, to load the image via the current SD/MMC, identify the partition
containing the image to be loaded. Assuming it is labelized "bootfs" on the partition 8:

```
STM32MP> mmc part
...
8 0x00002242 0x00034241 "bootfs"
...
STM32MP> ext2ls mmc 0:8
...
2759776 loader.img
...
STM32MP> ext2load mmc 0:8 0x88000000 loader.img
STM32MP> go 0x88000000
```

## x86-64 generic {#x86_64_generic}

This board supports x86-64 platforms with generic microarchitecture and no virtualisation.
Expand Down
2 changes: 2 additions & 0 deletions loader/src/aarch64/cpus.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
#elif defined(CONFIG_PLAT_ROCKPRO64)
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
#elif defined(CONFIG_PLAT_STM32MP2)
static const size_t psci_target_cpus[2] = {0x00, 0x01};
#elif defined(CONFIG_PLAT_QEMU_ARM_VIRT)
/* QEMU is special and can have arbitrary numbers of cores */
// TODO.
Expand Down
14 changes: 14 additions & 0 deletions loader/src/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,20 @@ void putc(uint8_t ch)
while ((*UART_REG(ULSR) & ULSR_THRE) == 0);
*UART_REG(UTHR) = ch;
}
#elif defined(CONFIG_PLAT_STM32MP2)

#define UART_BASE 0x400e0000
#define USART_ISR 0x1c
#define USART_TDR 0x28
#define USART_ISR_TXE 0x80

void uart_init(void) {}

void putc(uint8_t ch)
{
while (!(*UART_REG(USART_ISR) & USART_ISR_TXE));
*UART_REG(USART_TDR) = ch;
}
#elif defined(CONFIG_ARCH_RISCV64)

#include "riscv/sbi.h"
Expand Down
3 changes: 3 additions & 0 deletions platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@ platforms:
- name: zcu102
cmake_plat: zcu102
since: 1.3.0
- name: stm32mp2
cmake_plat: stm32mp257f-ev1
since: dev
Loading