-
Notifications
You must be signed in to change notification settings - Fork 7k
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
modules: hal_nordic: nrfs: DVFS cleanup #82341
Closed
ppelikan-nordic
wants to merge
4,042
commits into
zephyrproject-rtos:main
from
ppelikan-nordic:nrfs-cleanup
Closed
modules: hal_nordic: nrfs: DVFS cleanup #82341
ppelikan-nordic
wants to merge
4,042
commits into
zephyrproject-rtos:main
from
ppelikan-nordic:nrfs-cleanup
Conversation
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
4ecbf3b
to
5ddf950
Compare
Rafal-Nordic
approved these changes
Dec 3, 2024
meijemac
approved these changes
Dec 3, 2024
4d7be6b
to
323803c
Compare
please rebase :) |
Grant references are allocated via simple O(1) allocator - idx of first free gref is always stored in the "0" list entry (e.g. list[0] == "A"). Next free gref (e.g. B) will be stored inside list entry with the index of previous (list[A] == B) and so on. This allows to find free gref instantly if available. However, current implementation allows a user to perform a double-free of some taken grefs since it doesn't store any information about entries being currently claimed. This may cause gref_list to break. Add GNTTAB_GREF_USED value and mark all taken grefs with it to prevent double free in put_grant_entry(). These changes also required updates for allocator and semaphore init sequences, since we can not use put_free_entry() during driver initialization anymore. Signed-off-by: Dmytro Firsov <[email protected]>
Xen allocates a region that should be used as a place for grant table mapping and passes it via the device tree. By design, this region may be quite large (up to 4096+ frames/pages), but the number of frames is usually limited by the max_grant_frames domain parameter (usually 32 or 64). Linux maps these frames on demand and when reaches mentioned limit it just stops expanding. At the same time, previous implementation of Zephyr gnttab driver calculated the number of grant frames by dividing whole region by page size and tried to map it during init. If the region specified in the device tree was larger than the max_grant_frames set by Xen, it would fail on ASSERT, since Xen would return an error. To address these issues CONFIG_NR_GRANT_FRAMES was introduced. It allows to limit size of grant table and map only required number of pages. Additionally, a check for max_grant_frames Xen limit was introduced to initialization - if this value will be less than CONFIG_NR_GRANT_FRAMES, k_panic() will be called. Signed-off-by: Dmytro Firsov <[email protected]>
Initially this driver was a port from mini-os. Michal Orzel (@orzelmichal) pointed that it contains incorrect grant table initialization sequence and redundant calls. Driver mapped grant table frames via loop of XENMEM_add_to_physmap calls and then tried to do the same but via GNTTABOP_setup_table operation. After completion of latter it did not even use provided frames list. This did not cause any major issues, since XENMEM_add_to_physmap correctly map gnttab frames that were used. Remove redundant GNTTABOP_setup_table call from grant table driver to clean up its initialization sequence. Signed-off-by: Dmytro Firsov <[email protected]>
The Xen extends domain grant tables every time domain requests gnttab basing on gnttab idx. If idx > xen_current_max_gnttab_idx the Xen extends grant table so that idx <= xen_current_max_gnttab_idx. The growing grant tables on every hypercall is a bit costly operation and it also results in the bunch of log messages: (XEN) xen-source/xen/common/grant_table.c:1909:d0v0 Expanding d0 \ grant table from 1 to 2 frames This patch changes gnttab processing from gnttab max_idx to low_idx, so the first hypercall has the largest index, ensuring that the grant table will grow only once. It also reduces number of log messages. Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Dmytro Firsov <[email protected]>
Add OTGFS peripheral to the stm32h7rs soc series, and enable it on the Discovery board STM32H7S78-DK, where it is wired to USB Type-C port 2. Signed-off-by: Titouan Christophe <[email protected]>
Added STM32H562xG dts file Signed-off-by: Kacper Brzostowski <[email protected]>
Low cost STM32H5 series development board with bare minimum to run the MCU Signed-off-by: Kacper Brzostowski <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
DNM (manifest)
This PR should not be merged (controlled by action-manifest)
manifest
manifest-babblesim_base
manifest-babblesim_ext_libCryptov1
manifest-bsim
manifest-cmsis
manifest-cmsis_6
manifest-cmsis-nn
manifest-fatfs
manifest-hal_adi
manifest-hal_atmel
manifest-hal_espressif
manifest-hal_ethos_u
manifest-hal_infineon
manifest-hal_intel
manifest-hal_microchip
manifest-hal_nordic
manifest-hal_nxp
manifest-hal_renesas
manifest-hal_rpi_pico
manifest-hal_silabs
manifest-hal_st
manifest-hal_stm32
manifest-hal_tdk
manifest-hal_ti
manifest-hostap
manifest-liblc3
manifest-libmctp
manifest-libmetal
manifest-littlefs
manifest-lvgl
manifest-mcuboot
manifest-mipi-sys-t
manifest-nanopb
manifest-nrf_hw_models
manifest-nrf_wifi
manifest-open-amp
manifest-openthread
manifest-percepio
manifest-picolibc
manifest-segger
manifest-sof
manifest-tflite-micro
manifest-trusted-firmware-m
manifest-uoscore-uedhoc
manifest-zephyr-lang-rust
platform: nRF
Nordic nRFx
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removing unnecessary logging from DVFS reg operations in lib NRFS.
Update manifest to include latest updates from NRFS.