forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: arm64: rpi_5: add rpi_5_xen_dom0 build target
Add board rpi_5_xen_dom0 to build RPI5 with Xen Dom0 support: west build -b rpi_5_xen_dom0 -p always samples/hello_world/ Signed-off-by: Grygorii Strashko <[email protected]>
- Loading branch information
Grygorii Strashko
committed
Apr 18, 2024
1 parent
a821b6e
commit 0fce7ee
Showing
6 changed files
with
142 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
# Copyright 2023 honglin leng <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_RPI_5 | ||
|
||
config BOARD | ||
default "Raspberry Pi 5" | ||
depends on BOARD_RPI_5 | ||
|
||
endif # BOARD_RPI_5 | ||
|
||
if BOARD_RPI_5_XEN_DOM0 | ||
|
||
config BOARD | ||
default "Raspberry Pi 5 Xen Dom0" | ||
|
||
config XEN_DOM0 | ||
default y | ||
|
||
endif # BOARD_RPI_5_XEN_DOM0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright 2024 Junho Lee <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <broadcom/bcm2712.dtsi> | ||
#include <mem.h> | ||
|
||
/delete-node/ &sram0; | ||
|
||
/ { | ||
compatible = "raspberrypi,5-model-b-dom0", "raspberrypi,5-model-b", "brcm,bcm2712"; | ||
model = "Raspberry Pi 5 Xen Dom0"; | ||
#address-cells = <2>; | ||
#size-cells = <2>; | ||
|
||
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,console = &xen_consoleio_hvc; | ||
zephyr,shell-uart = &xen_consoleio_hvc; | ||
}; | ||
|
||
psci { | ||
method = "hvc"; | ||
}; | ||
|
||
xen_consoleio_hvc: hvc { | ||
compatible = "xen,hvc-consoleio"; | ||
status = "okay"; | ||
}; | ||
|
||
/* | ||
* This node may differs on different setups, please check | ||
* following line in Xen boot log to set it right: | ||
* (XEN) Grant table range: 0x00000002800000-0x00000002840000 | ||
* Also, add extended region 0 or 1: | ||
* (XEN) d0: extended region 0: 0x2a00000->0x7e00000 | ||
* (XEN) d0: extended region 1: 0x10000000->0x3fa00000 | ||
* | ||
* Xen passes actual values for setup in domain device tree, but Zephyr | ||
* is not capable to parse and handle it in runtime. | ||
* | ||
* Extended regions should not overlap kernel Virtual Memory region | ||
* (CONFIG_KERNEL_VM_SIZE, CONFIG_KERNEL_VM_BASE) | ||
*/ | ||
hypervisor: hypervisor@2800000 { | ||
compatible = "xen,xen"; | ||
reg = <0x0 0x2800000 0x0 0x40000>, <0x0 0x2a00000 0x0 0x5400000>; | ||
interrupts = <GIC_PPI 0x0 IRQ_TYPE_EDGE IRQ_DEFAULT_PRIORITY>; | ||
interrupt-parent = <&gic>; | ||
status = "okay"; | ||
}; | ||
|
||
/* | ||
* This node may differs on different setups, because Xen picks | ||
* region for Domain-0 for every specific configuration. You can | ||
* start Xen for your platform and check following log: | ||
* (XEN) Allocating 1:1 mappings totalling 128MB for dom0: | ||
* (XEN) BANK[0] 0x00000008000000-0x00000010000000 (128MB) | ||
* (XEN) Loading zImage from 0000000000080000 to 0000000008000000-000000000831f004 | ||
* | ||
* Xen passes actual values for setup in domain device tree, but Zephyr | ||
* is not capable to parse and handle it in runtime. | ||
*/ | ||
sram0: memory@8000000 { | ||
compatible = "mmio-sram"; | ||
reg = <0x00 0x8000000 0x0 DT_SIZE_M(128)>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
identifier: rpi_5_xen_dom0 | ||
name: Raspberry Pi 5 Xen Dom0 | ||
type: mcu | ||
arch: arm64 | ||
toolchain: | ||
- zephyr | ||
- cross-compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (C) 2024 EPAM Systems. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_SOC_BCM2712=y | ||
CONFIG_BOARD_RPI_5_XEN_DOM0=y | ||
CONFIG_ARM64_VA_BITS_40=y | ||
CONFIG_ARM64_PA_BITS_40=y | ||
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME=y | ||
|
||
# Enable serial console. | ||
CONFIG_SERIAL=y | ||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_UART_INTERRUPT_DRIVEN=n | ||
|
||
CONFIG_XEN_REGIONS=y | ||
CONFIG_XEN_GRANT_TABLE=y | ||
CONFIG_COMMON_LIBC_MALLOC=y | ||
CONFIG_XEN_EVENTS=y |