dannyj
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Work Note 2 (2021-Oct-5 ~ Present) ## Works to do - RainierS3 - Stress run - ? 8kdu+pi (raw) - ? 8kdu+pi+h4k (ram) - ROM boot + firmware (**purpose: A0 ROM boot up FTK**) - * secure boot porting on DC - *? ftk run using loader - ? X2 nand card - RainierB0 - * NVME - L1.2 validation - Tacoma12 - * ROM development - ? ramdisk/rawdisk/ftk run ## RainierS3 ### SATA ``` created a branch for rainiers3 sata fw tacoma HEAD:refs/for/rainiers3_a0_fpga_dv patches: http://10.20.0.16:8000/38048 http://10.20.0.16:8000/38049 http://10.20.0.16:8000/38050 patch only for AMD platform http://10.20.0.16:8000/38051 ``` ### NVME ``` ``` ## Tacoma12 ### branch, tacoma12_bringup ``` # ramdisk 2 core ./mpc-ramdisk.sh 2 RV32 # ramdisk 4 core ./mpc-ramdisk.sh 4 RV32 # rawdisk 2 core, not validated # ./mpc-rawdisk.sh 2 tsb ``` ### generic, tacoma12_bringup, tacoma12_fpga, tacoma12_bringup_rv32 ### 13578 Tacoma12 R5/RV32 Performance From #10780 Tacoma12 R5/RV32 Performance - RISC-V, RV32 - ramdisk only, ``` cmake ../ -DDISABLE_HS_CRC_SUPPORT=1 -DENABLE_SOUT=1 -DFPGA=1 -DRAMDISK=1 -DCPU_RV32=1 ``` - ramdisk ddr, ``` cmake ../ -DDISABLE_HS_CRC_SUPPORT=1 -DENABLE_SOUT=1 -DFPGA=1 -DRAMDISK=1 -DDDR=1 -DCPU_RV32=1 ``` - rawdisk only, can't run now ``` cmake ../ -DUSE_TSB_NAND=1 -DDISABLE_HS_CRC_SUPPORT=1 -DENABLE_SOUT=1 -DFPGA=1 -DRAWDISK=1 -DCPU_RV32=1 ``` - programmer ``` cmake ../ -DUSE_TSB_NAND=1 -DDISABLE_HS_CRC_SUPPORT=1 -DENABLE_SOUT=1 -DFPGA=1 -DPROGRAMMER=1 -DCPU_RV32=1 ``` - ARM, R5 - ramdisk only, ``` cmake ../ -DDISABLE_HS_CRC_SUPPORT=1 -DENABLE_SOUT=1 -DFPGA=1 -DRAMDISK=1 -DCPU_R5=1 ``` - ramdisk ddr, ``` cmake ../ -DDISABLE_HS_CRC_SUPPORT=1 -DENABLE_SOUT=1 -DFPGA=1 -DRAMDISK=1 -DDDR=1 -DCPU_R5=1 ``` - rawdisk only, can't run now ``` cmake ../ -DUSE_MU_NAND=1 -DDISABLE_HS_CRC_SUPPORT=1 -DENABLE_SOUT=1 -DFPGA=1 -DRAWDISK=1 -DCPU_R5=1 ``` ## Ticket ### Regression - 2021-10-13 - bitfile: - fw: ─ [x] rs3.a0.fpga.programmer ─ [ ] rs3.rawdisk.4kdu.h4k.nopi.aes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ─ [x] rs3.rawdisk.4kdu.h4k.nopi.noaes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ─ [ ] rs3.rawdisk.4kdu.h4k.pi.aes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ─ [ ] rs3.rawdisk.4kdu.h4k.pi.noaes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ─ [ ] rs3.rawdisk.4kdu.h512.nopi.aes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ─ [.] rs3.rawdisk.4kdu.h512.nopi.noaes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ─ [ ] rs3.rawdisk.4kdu.h512.pi.aes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ─ [ ] rs3.rawdisk.4kdu.h512.pi.noaes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf - ... wip - [-] rs3.rawdisk.4kdu.h512.nopi.noaes.hcrc.rainiers3_a0_fpga_dv.8ae727ee6.elf ### 13965 tacoma12 riscv atomic ops ### [RS3] ROM usb2sata bridge issue ```graphviz digraph G { subgraph cluster_0 { style=filled; color=lightgrey; node [style=filled,color=white]; a0 [] a0 -> a1 -> a2 -> a3; label = "test #1"; } subgraph cluster_1 { node [style=filled]; b0 -> b1 -> b2 -> b3; label = "test #2"; color=blue } subgraph cluster_2 { style=filled; color=lightblue; node [style=filled,color=white]; c0 -> c1 -> c2 -> c3; label = "test #3"; } start -> a0; start -> b0; start -> c0; # a1 -> b3; # b2 -> a3; # a3 -> a0; a3 -> end; b3 -> end; c3 -> end; start [shape=Mdiamond]; end [shape=Msquare]; } ``` ## MISC ### Containier with gdb-multiarch - use docker to do cdump ``` $ docker start 88f5f36ebfea $ docker attach 88f5f36ebfea $ gdb-multiarch <riscv-elf> gdb > source <path-to-gef>/gef.py gef >>> cdump ``` - log ``` # install tools in container $$ sudo apt update $$ scp djiang@10.110.27.245:~/github/training/setup/dj.setenv.sh . $$ sh dj.setenv.sh $$ sudo apt install gdb-multiarch ## $$ export LANG=en_US.utf8 $$ gdb-multiarch $$ scp djiang@10.110.27.245:~/igt/t12.fpga/tmp/main . $$ gdb-multiarch main.elf # install docker $ sudo apt-get remove docker docker-engine docker.io containerd runc $ sudo apt-get update $ sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null $ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" $ apt-cache madison docker-ce $ docker --version $ sudo systemctl status docker $ sudo apt install apt-transport-https ca-certificates curl software-properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" $ sudo usermod -aG docker abhilash $ groups # pull images $ docker search ubuntu20 $ docker pull homebrew/ubuntu20.04 $ docker images $ docker run -it homebrew/ubuntu20.04 $ docker ps -a $ docker start 88f5f36ebfea $ docker attach 88f5f36ebfea ``` ## install docker on ubuntu 17.10 [How to install docker on buntu 17.10](https://gist.github.com/levsthings/0a49bfe20b25eeadd61ff0e204f50088) ## Installing Docker CE on Ubuntu 17.10 Artful Aardvark As of 20/10/2017, a release file for Ubuntu 17.10 Artful Aardvark is not available on [Download Docker](https://download.docker.com/linux/ubuntu/dists/). If you are used to installing Docker to your development machine with `get-docker` [script](https://get.docker.com/), that won't work either. So the solution is to install Docker CE from the `zesty` package. ```terminal sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable" sudo apt-get update sudo apt-get install docker-ce ``` ## ROM ```graphviz digraph G { } ``` ```shell= # dump elf2.bin binary file to hex output to std out $ hexdump -v -e '16/1 "%02X " "\n"' elf2.bin ``` # Gerrit Repos ``` 10.20.0.16:8000: Tacoma (All projects) 10.20.0.64:8000: DC (RainierS) ``` Server -> Repo -> Branch ## Tacoma Server - tacoma - rainier_a0 - rainier_b0 - rainier3 - rainier_S - tacoma12 - ... - mu - shared_tool - srb_header - ... ## DC Server - RainierS - rainier_S_DC - rainierS_FPGA - shared_tool - srb_header ## Start to work with package build - download repo - `git clone repo` - update submodules - `git submodule init` - `git submodule update` - shared_tool - srb_header - `img_builder.py` is changed to `img_builder_20.py` according to crc32c applied. Original tool uses crc32. ```graphviz digraph G { rankdir=LR Server[shape=box] Repo[shape=box] Branch[shape=box] ToBeUpdated[shape=note fontcolor=red] Server -> Repo -> Branch Tacoma -> tacoma tacoma -> rainier_a0 tacoma -> rainier_b0 tacoma -> rainier3 tacoma -> rainier_S Tacoma -> mu Tacoma -> shared_tool Tacoma -> srb_header DC -> RainierS RainierS -> rainier_S_DC RainierS -> rainierS_FPGA DC -> shared_tool_1 DC -> srb_header_1 ToBeUpdated -> shared_tool_1 [style=dotted] ToBeUpdated -> srb_header_1 [style=dotted] shared_tool -> ToBeUpdated [style=dotted] srb_header -> ToBeUpdated [style=dotted] {rank=same; Server; Tacoma; DC} {rank=same; tacoma; RainierS; Repo; shared_tool_1; srb_header_1} {rank=same; ToBeUpdated; Branch} } ``` ## ticket 14143 and ticket 14308 ```graphviz digraph G { rankdir=LR img_builder_20 sign encrypt } ``` ## Rainier B0 ZNS ### NVME ``` Program received signal SIGTRAP, Trace/breakpoint trap. 0x2000338e in writel (addr=0xc003c004, val=0) at /home/djiang/igt/rb0.1/rtos/armv7r/io.h:18 18 /home/djiang/igt/rb0.1/rtos/armv7r/io.h: No such file or directory. (gdb) bt #0 0x2000338e in writel (addr=0xc003c004, val=0) at /home/djiang/igt/rb0.1/rtos/armv7r/io.h:18 #1 cmd_proc_writel (reg=4, val=0) at /home/djiang/igt/rb0.1/nvme/src/nvme_cmd_proc/nvme_cmd_proc.c:287 #2 cmd_proc_resume (abort=abort@entry=0) at /home/djiang/igt/rb0.1/nvme/src/nvme_cmd_proc/nvme_cmd_proc.c:1998 #3 0x200c8f2c in cmd_proc_init () at /home/djiang/igt/rb0.1/nvme/src/nvme_cmd_proc/nvme_cmd_proc.c:2071 #4 0x200c8a24 in nvmet_init () at /home/djiang/igt/rb0.1/nvme/src/nvme_ctrl/nvme_ctrl.c:4644 #5 0x200c804c in fw_init () at /home/djiang/igt/rb0.1/main.c:113 #6 main () at /home/djiang/igt/rb0.1/main.c:195 ``` #### tracking nvme identify ``` 2134 typedef union { 2135 u32 all; 2136 struct { 2137 u32 cc_en_set:1; 2138 u32 cc_en_clear:1; 2139 u32 cc_shn_2000:1; 2140 u32 nssr:1; 2141 u32 adm_sq_tail_updt:1; 2142 u32 io_sq_tail_updt:1; 2143 u32 adm_cmd_fetched:1; 2144 u32 io_cmd_fetched:1; 2145 u32 nvm_cmd_fetch_done:1; 2146 u32 nvm_cq_send_done:1; 2147 u32 dma_queue0_xfer_done:1; 2148 u32 dma_queue1_xfer_done:1; 2149 u32 ntbl_auto_lkup_done:1; 2150 u32 fw_ntbl_access_done:1; 2151 u32 fw_cq_req_done:1; 2152 u32 boot_partition_read_op:1; 2153 u32 nvm_cmd_fetch_error:1; 2154 u32 dma_read_cmpl_error:1; 2155 u32 dma_queue_xfer_error:1; 2156 u32 rsvd_19:1; 2157 u32 que_ptr_update_err:1; 2158 u32 sram_parity_errs:1; 2159 u32 axi_bus_parity_errs:1; 2160 u32 hw_cq_buf_empty_not:1; 2161 u32 hw_sram_init_done:1; 2162 u32 fw_cq_err:1; 2163 u32 any_vf_cc_en_set:1; 2164 u32 any_vf_adm_cmd_fetched:1; 2165 u32 rsvd_28:1; 2166 u32 any_flr_active:1; 2167 u32 rsvd_30:1; 2168 u32 cc_en_status:1; 2169 } b; 2170 } nvme_unmasked_int_status_t; ``` ### BTN ``` Program received signal SIGTRAP, Trace/breakpoint trap. 0x0000383e in writel (addr=0xc0010294, val=45536) at /home/djiang/igt/rb0.1/rtos/armv7r/io.h:18 18 /home/djiang/igt/rb0.1/rtos/armv7r/io.h: No such file or directory. (gdb) bt #0 0x0000383e in writel (addr=0xc0010294, val=45536) at /home/djiang/igt/rb0.1/rtos/armv7r/io.h:18 #1 btn_writel (reg=660, val=45536) at /home/djiang/igt/rb0.1/btn/dpe/../inc/btn.h:136 #2 sync_dpe_init () at /home/djiang/igt/rb0.1/btn/dpe/sync_dpe.c:110 #3 sync_dpe_reset () at /home/djiang/igt/rb0.1/btn/dpe/sync_dpe.c:135 #4 0x2000307c in dpe_init () at /home/djiang/igt/rb0.1/btn/dpe/dpe.c:1065 #5 0x20002d12 in btn_core_resume_phase1 () at /home/djiang/igt/rb0.1/btn/btn_core.c:1199 #6 0x20001ba2 in btn_resume_phase1 () at /home/djiang/igt/rb0.1/btn/btn.c:166 #7 0x200c8734 in btn_init () at /home/djiang/igt/rb0.1/btn/btn.c:223 #8 0x200c804c in fw_init () at /home/djiang/igt/rb0.1/main.c:113 #9 main () at /home/djiang/igt/rb0.1/main.c:195 ``` ### irq ``` (gdb) p poll_isr_tbl $3 = {0x64ed <nvmet_isr>, 0x0 <atcm_base>, 0x7d2d <btn_nrd_cmd_in>, 0x7d4d <btn_prd_cmd_in>, 0x7d6d <btn_w_cmd_in>, 0x0 <atcm_base>, 0x8285 <btn_data_in_isr>, 0x8285 <btn_data_in_isr>, 0x8285 <btn_data_in_isr>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x84b1 <bm_isr_com_free>, 0x7165 <bm_isr_slow>, 0x7a65 <btn_rcmd_rls_isr>, 0x7d8d <btn_wcmd_rls_isr>, 0x0 <atcm_base>, 0x7165 <bm_isr_slow>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0xa9d5 <cmd_proc_isr>, 0xa9d5 <cmd_proc_isr>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x0 <atcm_base>, 0x1771 <timer_isr>, 0x17f5 <poll_sys_misc_isr>} ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully