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

memcpy stuck #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

0xWilliamWang
Copy link

(I found I coludn't open issue, so created this PR.)

  1. I was planning to run keystone v1 on hifive unleashed development board and got stuck on a memcpy call.
  2. The 358 line memcpy call does not have an infinite loop, it just executes many times and finally gets stuck.
  3. After about a minute, it got stuck and didn't execute 359 line
  4. Below is the log running on hifive unleashed development board. The associated commit id is 1ed04b4
    SiFive FSBL:       2021-08-27-1ed04b4
    Using FSBL DTB
    first enter memcpy
    in memcpy
    in memcpy
    ...
    
  5. I changed the memcpy param and it can work. The associated commit id is e229e99
    SiFive FSBL:       2021-08-27-e229e99
    Using FSBL DTB
    first enter memcpy
    first exit memcpy
    HiFive-U serial #: 0000032e
    Loading boot payload................................
    
    
    OpenSBI v0.8
    ____                    _____ ____ _____
    / __ \                  / ____|  _ \_   _|
    | |  | |_ __   ___ _ __ | (___ | |_) || |
    | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
    | |__| | |_) |  __/ | | |____) | |_) || |_
    \____/| .__/ \___|_| |_|_____/|____/_____|
          | |
          |_|
    
    Platform Name             : sifive,hifive-unleashed-a00
    Platform Features         : timer,mfdeleg
    ...
    
  6. I am not very familiar with fsbl dev, is there a better solution? (I think there might be dtb_target, dtb pointers overlap)
  7. My build env:
    ➜  freedom-u540-c000-bootloader-keystone git:(probe-memcpy) ✗ riscv64-unknown-elf-gcc --version
    riscv64-unknown-elf-gcc (GCC) 10.2.0
    Copyright (C) 2020 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    ➜  freedom-u540-c000-bootloader-keystone git:(probe-memcpy) ✗ uname -a
    Linux ToolMan 5.4.0-80-generic #90~18.04.1-Ubuntu SMP Tue Jul 13 19:40:02 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    ➜  freedom-u540-c000-bootloader-keystone git:(probe-memcpy) ✗ git log -1 --oneline 
    e229e99 (HEAD -> probe-memcpy, github/probe-memcpy) modify memcpy param type
    ➜  freedom-u540-c000-bootloader-keystone git:(probe-memcpy) ✗ 

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.

1 participant