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

boards: nrf54h20dk: Make execution from RAM default for PPR #6

Closed
wants to merge 11 commits into from

Conversation

57300
Copy link

@57300 57300 commented Mar 14, 2024

No description provided.

anangl and others added 11 commits March 14, 2024 08:07
Add targets for the Application, Radio, and PPR cores in the nRF54H20
SoC on the nRF54H20 DK board.

Signed-off-by: Andrzej Głąbek <[email protected]>
nRF54H20 PDK is superseded by nRF54H20 DK and will no longer be
supported.

Signed-off-by: Andrzej Głąbek <[email protected]>
nRF54H20 PDK is superseded by nRF54H20 DK and will no longer be
supported.

Signed-off-by: Andrzej Głąbek <[email protected]>
nRF54H20 PDK is superseded by nRF54H20 DK and will no longer be
supported.

Signed-off-by: Andrzej Głąbek <[email protected]>
nRF54H20 PDK is superseded by nRF54H20 DK and will no longer be
supported.

The board was superseded by nRF54H20 DK.

Signed-off-by: Andrzej Głąbek <[email protected]>
This was a preview revision of the SoC that will no longer
be supported.

Signed-off-by: Andrzej Głąbek <[email protected]>
This was a preview revision of the SoC that will no longer
be supported.

Signed-off-by: Andrzej Głąbek <[email protected]>
This was a preview revision of the SoC that will no longer
be supported.

Signed-off-by: Andrzej Głąbek <[email protected]>
In practice, PPR is intended to be running code from RAM, so make this
the default choice for the `nrf54h20dk/nrf54h20/cpuppr` board target.
Keep the MRAM execution option as a `xip` variant of that target,
replacing the `ram` one.

Align the default `cpuapp` configuration for copying PPR's image to RAM
before it boots the child processor.

Signed-off-by: Grzegorz Swiderski <[email protected]>
The `nordic-ppr` snippet can now be used instead, since RAM execution is
default for PPR.

Signed-off-by: Grzegorz Swiderski <[email protected]>
This replacement for the `nordic-ppr-ram` snippet does the opposite:
enable PPR execution in place from MRAM.

Signed-off-by: Grzegorz Swiderski <[email protected]>
@57300
Copy link
Author

57300 commented Mar 14, 2024

cc @anangl @gmarull

Copy link
Owner

@anangl anangl left a comment

Choose a reason for hiding this comment

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

I think this makes sense.

Copy link

@gmarull gmarull left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@anangl
Copy link
Owner

anangl commented Mar 14, 2024

Commits have been cherry picked to the branch.

@anangl anangl closed this Mar 14, 2024
anangl pushed a commit that referenced this pull request Nov 4, 2024
hci_packet_complete(buf, buf_size) should check whether buf_size is
enough.
For instance, hci_packet_complete can receive buf with buf_size 1,
leading to the buffer overflow in cmd->param_len, which is buf[3].
This can happen when rx_thread() receives two frames in 512 bytes
and the first frame size is 511. Then, rx_thread() will call
hci_packet_complete() with 1.

==5==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000ad81c2 at pc 0x0000005279b3 bp 0x7fffe74f5b70 sp 0x7fffe74f5b68

READ of size 2 at 0x000000ad81c2 thread T6
    #0 0x5279b2  (/root/zephyr.exe+0x5279b2)
    #1 0x4d697d  (/root/zephyr.exe+0x4d697d)
    #2 0x7ffff60e5daa  (/lib/x86_64-linux-gnu/libc.so.6+0x89daa)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

0x000000ad81c2 is located 2 bytes to the right of global variable
'rx_thread.frame' defined in 'zephyr/drivers/bluetooth/hci/userchan.c'
(0xad7fc0) of size 512
SUMMARY: AddressSanitizer: global-buffer-overflow
(/root/zephyr.exe+0x5279b2)
Thread T6 created by T2 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T2 created by T1 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T1 created by T0 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x52f36c  (/root/zephyr.exe+0x52f36c)
    #2 0x5371dc  (/root/zephyr.exe+0x5371dc)
    #3 0x5312a6  (/root/zephyr.exe+0x5312a6)
    #4 0x52ed7b  (/root/zephyr.exe+0x52ed7b)
    #5 0x52eddd  (/root/zephyr.exe+0x52eddd)
    #6 0x7ffff6083c89  (/lib/x86_64-linux-gnu/libc.so.6+0x27c89)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

==5==ABORTING

Signed-off-by: Sungwoo Kim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants