-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zephyr v3.6.0 xt rpi5 dom0 wip #94
Zephyr v3.6.0 xt rpi5 dom0 wip #94
Conversation
lgtm |
Some checks failed on RPI5 initial patches as those patches ported as is from Zephyr ML. Those patches will need to be updated later any way when (if) they'll be merged in Zephyr ML. I have no intention to fix those CI warnings now. UPD: fixed |
293d630
to
0fce7ee
Compare
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix checkpatch warnings.
Also commits
dts: arm64: broadcom: bcm2712: add psci and compatible
- add proper explanation for thisdrivers: xen: add XEN_EVENTS Kconfig option
but thay might be not used.
- >but they might be not used.
boards: arm64: xenvm: reduce hypervisor node memory
- please, mark this as a "WA" in commit topic, I will provide a proper solution soon.
f05c1a3
to
99a0bdc
Compare
RPI5 commits went upstream, so cherry-picked and noted. |
@@ -69,7 +69,7 @@ | |||
|
|||
hypervisor: hypervisor@38000000 { | |||
compatible = "xen,xen"; | |||
reg = <0x00 0x38000000 0x00 0x1000000>; | |||
reg = <0x00 0x38000000 0x00 0x10000>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed after #96 will be merged
boards/arm64/rpi_5/doc/index.rst
Outdated
The Raspberry Pi 5 platform can be used to run as Xen Zephyr DomU with RPI 5 HW support. | ||
For such purposes the `rpi_5_xen_domd` can be used. | ||
|
||
Run below command as an example of RPI 5 Zephyr build as Dom0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run below command
-> Run the command below
example of RPI 5 Zephyr build as Dom0
- probably copy-paste issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
99a0bdc
to
fa8c762
Compare
|
||
static int gpio_brcmstb_pin_configure(const struct device *port, gpio_pin_t pin, gpio_flags_t flags) | ||
{ | ||
struct gpio_brcmstb_data *data = port->data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Null check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First it's not my patch and it's explicitly marked as back-ported (with "cherry picked from commit 31badda", so probably right place for comments is in Zephyr mainline zephyrproject-rtos#70538.
Second, those functions are not called directly, but through the gpio APIs and null is impossible here.
|
||
static int gpio_brcmstb_port_get_raw(const struct device *port, gpio_port_value_t *value) | ||
{ | ||
struct gpio_brcmstb_data *data = port->data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, please check all pointers for NULL value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as above
# SPDX-License-Identifier: Apache-2.0 | ||
zephyr_sources_ifdef(CONFIG_ARM_MMU mmu_regions.c) | ||
|
||
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm64/scripts/linker.ld CACHE INTERNAL "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some comments describing why is this needed pls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@@ -0,0 +1,17 @@ | |||
.. _rpi_5_xen_domd: | |||
|
|||
RPI 5 Xen DomD: snippet for XEN HW domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need separate snippets for DomD and DomUs? AFAIK there is no real difference between them, so what is the reason for explicitly specifying DomD here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you look at code ypu'll see DomD based on xenvm DT + passedthrough HW, Dom0 has different Xen specific DT and no HW for now. Those are NOT compatible.
Add GPIO driver for brcmstb, required by Raspberry Pi 5. Signed-off-by: Junho Lee <[email protected]> (cherry picked from commit 31badda) Signed-off-by: Grygorii Strashko <[email protected]>
Add support for BCM2712, SoC of Raspberry Pi 5. Signed-off-by: Junho Lee <[email protected]> (cherry picked from commit 76ec481) Signed-off-by: Grygorii Strashko <[email protected]>
Add support for Raspberry Pi 5. Currently only internal GPIO(gio_aon) is supported. 'Blinky' is the only sample that is working for now. Signed-off-by: Junho Lee <[email protected]> (cherry picked from commit 73f4102) Signed-off-by: Grygorii Strashko <[email protected]>
Enable serial communication through UART port between HDMI ports. Signed-off-by: Myeonghyeon Park <[email protected]> Signed-off-by: Junho Lee <[email protected]> (cherry picked from commit 63692c1) Signed-off-by: Grygorii Strashko <[email protected]>
Mainline zephyr is moved to HWM v2 which rearranged *soc* and *boards* which prevents usage of patches [1] as is. Hence backport bcm2712 to old HWM. Not for upstream. [1] zephyrproject-rtos#70538 Signed-off-by: Grygorii Strashko <[email protected]>
Mainline zephyr is moved to HWM v2 which rearranged *soc* and *boards* which prevents usage of patches [1] as is. Hence backport RPI5 board to old HWM. Not for upstream. [1] zephyrproject-rtos#70538 Signed-off-by: Grygorii Strashko <[email protected]>
The XEN events consume 72K of RAM, but they might be not used. Add XEN EVENTS Kconfig option so XEN events could be gracefully disabled if not needed. Signed-off-by: Grygorii Strashko <[email protected]>
The current "hypervisor" node defined to use 16M of MMIO memory, which is way too much. reduce it to 65K. Otherwise it's required to allocate bug number of grant frames for domain (max_grant_frames). As suggested by Dmytro Firsov. Signed-off-by: Grygorii Strashko <[email protected]>
The CONFIG_XEN_REGIONS is enabled by default, but second memory range is not defined for "hypervisor" node which causes build failure. Hence, disable CONFIG_XEN_REGIONS for xenvm platform. Signed-off-by: Grygorii Strashko <[email protected]>
Tmp adjust XEN_DOMCTL_INTERFACE_VERSION to start with XEN 4.19. See commit bdb1184d4f6bf4e0121fda34a6c1cb51fe270e7d ("domctl: bump interface version"), there were no Xen interface struct changes. Signed-off-by: Grygorii Strashko <[email protected]>
Add RPI5 board support. Signed-off-by: Grygorii Strashko <[email protected]>
Add rpi_5_xen_domd snippet to demonstrate enabling RPI 5 HW in Xen domain. Only GPIO LED is supported. Signed-off-by: Grygorii Strashko <[email protected]>
Add Xen specific documentation. Signed-off-by: Grygorii Strashko <[email protected]>
fa8c762
to
dd6cfaf
Compare
First iteration of enabling RPI 5 in Zephyr and adding Dom0 functionality