Skip to content
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

[nrf fromtree/fromlist] add dmm component #1817

Closed
wants to merge 504 commits into from

Conversation

nika-nordic
Copy link
Contributor

@nika-nordic nika-nordic commented Jun 14, 2024

Upstream PR: zephyrproject-rtos/zephyr#71278
manifest-pr-skip

@@ -26,8 +26,16 @@
reg = <0x800 DT_SIZE_K(2)>;
};

cpuapp_data: memory@1000 {
reg = <0x1000 DT_SIZE_K(256)>;
cpuapp_cpusec_misc_shm: memory@1000 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hubertmis should we disable this region by default?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this region is needed for IPC with SecDom. Let's keep it enabled by default, similarly to cpusec_cpuapp_ipc_shm.

Copy link
Contributor

@osaether osaether left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

sigvartmh and others added 13 commits July 1, 2024 10:58
Partition Manager (PM) is a component of the nRF Connect SDK (NCS)
which uses yaml files to resolve flash partition placement with a
holistic view of the entire device, including each firmware image
present on the flash device, and various subsystems, such as settings
and NFFS.

When this NCS extension is used, various source files which would use
partition information from devicetree in "vanilla" zephyr instead use
defines generated by PM instead.

This commit removes support for HEX_FILES_TO_MERGE, as it conflicts
with PM.

The settings subsystem pm.yml defines a partition 'settings_storage'.
The nffs subsystem pm.yml defines 'nffs_storage'.

Leverage label translation to avoid patching partition names.

Refer to the NCS documentation page for this feature for more details.

This is a long-running out of tree patch which has been worked on by
several people. The following sign-offs are in alphabetical order by
first name.

Signed-off-by: Andrzej Głąbek <[email protected]>
Signed-off-by: Andrzej Puzdrowski <[email protected]>
Signed-off-by: Håkon Øye Amundsen <[email protected]>
Signed-off-by: Ioannis Glaropoulos <[email protected]>
Signed-off-by: Joakim Andersson <[email protected]>
Signed-off-by: Johann Fischer <[email protected]>
Signed-off-by: Martí Bolívar <[email protected]>
Signed-off-by: Ole Sæther <[email protected]>
Signed-off-by: Robert Lubos <[email protected]>
Signed-off-by: Sebastian Bøe <[email protected]>
Signed-off-by: Sigvart Hovland <[email protected]>
Signed-off-by: Thomas Stenersen <[email protected]>
Signed-off-by: Torsten Rasmussen <[email protected]>
Signed-off-by: Øyvind Rønningstad <[email protected]>
Signed-off-by: Trond Einar Snekvik <[email protected]>
Signed-off-by: Gerard Marull-Paretas <[email protected]>
Signed-off-by: Tomasz Moń <[email protected]>
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit fbfb4df)
This commit adds the nRF54l15//nrf54l15/cpuapp/ns board variant to
sdk-zephyr. It allows to build nRF54l15pdk with TF-M in nRF Connect SDK.

This is done as a nrf noup patch as the out-of-tree board extension
feature is not available. When zephyrproject-rtos/zephyr#69548 is
completed, then this commit can be reverted and the variant be placed in
sdk-nrf repository.

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 8217fd3)
Zephyr's boot banner should not be used if NCS boot banner is enabled.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 67b7cca)
Complete rewrite of the 54l_ns DT board definition.

Now the secure board and non-secure board re-use a lot more code,
giving us a more maintainable solution.

Signed-off-by: Sebastian Bøe <[email protected]>
(cherry picked from commit 5e11b5f)
…eferences"

This reverts commit b876bd2.

That needs mbed TLS 3.6.0 to work, as pk_ecc.c was added in that
version.

To be reverted, when mbed TLS is updated to 3.6.0 in NCS.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 590a64a)
Removes explicit support for the legacy advertiser due
to incompatibility with SDC.

The legacy advertiser can be used (experimentally) with the
Zephyr Link Layer enabled, but is not recommended.

Signed-off-by: Håvard Reierstad <[email protected]>
(cherry picked from commit 60fce5e)
Disable processing of extended ADV packets by mesh scanner.
This is done to prevent loss of scan time due to reception
of pointer packets while scanning for mesh packets.

Signed-off-by: Ingar Kulbrandstad <[email protected]>
(cherry picked from commit 18285a0)
Changes the default MCUboot mode to update only for the thingy53,
to align with previous bootloader builds

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit 48cb4e7)
Align to changes in DTS:
  renamed: rram0 -> cpuapp_rram
  sized up cpauapp_rram region szie as part of it was reserved for
  cpuflpr_rram (which is not used by this config).

Signed-off-by: Andrzej Puzdrowski <[email protected]>
(cherry picked from commit c3898cc)
This will be replaced by a different solution upstream (NCSDK-27673).

Migrate the existing BICR bindings from NCS 2.4.99-cs3 to NCS 2.7.0.
They are updated to remove obsoleted values. Enable generating bicr.hex
for Application core by default.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit eb8e8ef)
Adjustment LFXO CLOAD value. New value is a resualt of DK's characterization.

Signed-off-by: Karol Lisak <[email protected]>
(cherry picked from commit fa10fde)
PM support is still required for nRF53 in the context of NCS.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit b42e02d)
Introduce NVS_LOOKUP_CACHE_FOR_SETTINGS Kconfig option that
enables a dedicated hash function for the NVS lookup cache
that takes advantage of the NVS ID allocation scheme used
by the NVS settings backend. As such, this option should
only be used if an application uses NVS via the settings
layer.

Signed-off-by: Damian Krolik <[email protected]>
(cherry picked from commit 3198700)
ekleezg and others added 24 commits August 1, 2024 09:30
Modified to check the length of the remaining data in buffer
before processing the next report. The length check is missing
in the cont routine.

Signed-off-by: Eunkyu Lee <[email protected]>
(cherry picked from commit e491f22)
…d warnings

This commit fixes compilation warnings that are present when compiling
with CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY as can be seen in this
compiler log:

"""
In file included from /zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/
include/string.h:215,
                 from /zephyr/subsys/bluetooth/host/smp.c:15:
In function '__memcpy_ichk',
    inlined from 'sc_send_public_key' at /zephyr/subsys/bluetooth/host/
smp.c:3006:2:
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
warning: argument 2 null where non-null expected [-Wnonnull]
   83 | __ssp_bos_icheck3_restrict(memcpy, void *, const void *)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
note: in a call to built-in function '__builtin_memcpy'
/zephyr/subsys/bluetooth/host/smp.c: In function 'smp_public_key':
/zephyr/subsys/bluetooth/host/smp.c:4214:21: warning: argument 2
null where non-null expected [-Wnonnull]
 4214 | memcmp(smp->pkey, sc_public_key, BT_PUB_KEY_COORD_LEN) == 0) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/string.h:62:10: note:
in a call to function 'memcmp' declared 'nonnull'
   62 | int memcmp (const void *, const void *, size_t);
      |     ^~~~~~
"""

The warning is caused by the potential use of NULL "sc_public_key"
global pointer that is not assigned a value in "smp_init()" if
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled. This commit
conditionally changes the behavior of function "smp_public_key()"
if CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is activated to simply return
and not use the "sc_public_key" variable. Other functions that are not
called anymore by "smp_public_key()" are also conditionally
deactivated when CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled

Signed-off-by: Sebastian Panceac <[email protected]>
(cherry picked from commit 9ce338d)
`bt_le_ext_adv_start` does not modify the `param` argument, which can
therefore be marked as `const`. This allows the struct to exist purely
in ROM.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit 40eeded)
The rationale behind that change is that the Application can use the
`bt_conn_le_param_update()` API to signal the controller to reschedule
the link.

Even if the new connection params are within the old ones, the
controller would be free to choose an e.g. smaller interval. The host
API should not prevent this usage.

Fixes zephyrproject-rtos/zephyr#74292

Co-authored-by: Knut Eldhuset <[email protected]>
Signed-off-by: Jonathan Rico <[email protected]>
(cherry picked from commit ac37d64)
When syncing to a PA using PAST then the sync_info.recv_enabled
was always just set to true, regardless of what mode was set
during the subscribe parameters.

The mode(s) are now stored in an array (with the default value
as well) so that we can retrieve that information when the PA
has synced via PAST.

It was considered to put the `mode` value into the `bt_conn`
struct, but that would require an API change as the `bt_conn`
parameter for the subcribe function uses `const`.

This commit also modifies the guard for PAST to be the more
correct value CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER instead
of just CONFIG_BT_CONN.

Signed-off-by: Emil Gydesen <[email protected]>
(cherry picked from commit 711b42a)
…_pool

`struct acl_data` is used even when Host flow control is not enabled.
It is written to through the `acl(buf)` accessor in `conn.c:hci_acl()`.

Hopefully no netbufs were harmed by that :/

Signed-off-by: Jonathan Rico <[email protected]>
(cherry picked from commit 792ae68)
…eset timeout

Some HCI drivers issue HCI reset when disabling, like the IPC HCI
driver. We need to keep the RX thread running to allow receiving
the command complete.

This commit postpones aborting the RX thread until this is done.
The issue happens started occuring after commit
d0e75ab87c4b53d66008c941c38709a2fca9dbea.

Fixes #76202.

Upstream PR: zephyrproject-rtos/zephyr#76203

Signed-off-by: Rubin Gerritsen <[email protected]>
By default, the BLE stack calls sent callback for ATT data when the data
is passed to BLE controller for transmission. Enabling this Kconfig
option delays calling the sent callback until data transmission is
finished by BLE controller (the callback is delayed until receiving the
num complete packets event).

Jira: NCSDK-27422

Signed-off-by: Marek Pieta <[email protected]>
(cherry picked from commit d74e0b5)
The function `bt_hci_le_past_received_v2()` is not compiled
in for this configuration, so the reference needs to be removed.

Fixes #76268.

Upstream PR: zephyrproject-rtos/zephyr#76269

Signed-off-by: Rubin Gerritsen <[email protected]>
Allow for an additional buffer reference if callback is provided. This
can be used to extend lifetime of the net buffer until the data
transmission is confirmed by ACK of the remote.

Signed-off-by: Marek Pieta <[email protected]>
k_sched* are not avaliable when there is CONFIG_MULTITHREADING=n

Upstream PR: zephyrproject-rtos/zephyr#76550

Signed-off-by: Piotr Kosycarz <[email protected]>
It was pointed out in a future PR that they should have
a corresponding experimental Kconfig entry.

See PR #73795.

This updates the APIs added in PR #73826 and PR #74295.

Signed-off-by: Rubin Gerritsen <[email protected]>
(cherry picked from commit 85eadcf)
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible.

Signed-off-by: Rubin Gerritsen <[email protected]>
(cherry picked from commit 5b14748)
…le()

When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible.

Signed-off-by: Rubin Gerritsen <[email protected]>
(cherry picked from commit e28207d)
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible

Signed-off-by: Rubin Gerritsen <[email protected]>
(cherry picked from commit 2967bd8)
… & RAM3x

This attribute denotes that DMA operation
can be performed from a given region.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit ea361f0)
DMM stands for Device Memory Management and its role is to streamline
the process of allocating DMA buffer in correct memory region
and managing the data cache.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit 37e511b)
Added tests verify output and input buffers allocation
using dmm component.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit d67abdd)
cpuppr can only use slow peripherals and uses RAM3 as RAM so
it does not need to use DMM.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 0825f24)
After changing dmm to not apply data cache line alignment for all
regions test needs to be aligned.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 7a6b355)
DMM was enforcing cache line alignment all memory regions, including
those which were not cacheable. Fixing it by using memory attribute
from the device tree to determine if alignment needs to be applied.

Because of that memory usage was significantly increased because
even 1 byte buffers (e.g. for uart_poll_out) was consuming 32 bytes
(cache line size).

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 5f32265)
Getting the required alignment size for memory region node
and device node needs to be handled by a separate macro.
Otherwise alignment of single byte is reported for any region.
Add a test that checks for this particular issue.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit c0d508a)
…em for cpusec

This is auxiliary shared memory needed for some of IPC communication.

Upstream PR: zephyrproject-rtos/zephyr#74302

Signed-off-by: Nikodem Kastelik <[email protected]>
…_dma reg bigger

This test needs more space for SPI transfer buffers.

Upstream PR: zephyrproject-rtos/zephyr#74302

Signed-off-by: Nikodem Kastelik <[email protected]>
@nika-nordic
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.