build self os in riscv
build self os in riscv 很久沒更新,最近看到TempleOS, 今天早上無聊來將之前的專案進行合併,新增了lwip wget 下載檔案,預計想要再將這個os再多一個vga的瀏覽器,感覺用NetSurf 渲染都Ok,應該可以在目前的os進行上網,新增了檔案系統,和鍵盤滑鼠硬碟vga驅動 修掉了context switch bug , 使用vga去繪製os的圖…
LABEL / RISC-V
8 posts
build self os in riscv 很久沒更新,最近看到TempleOS, 今天早上無聊來將之前的專案進行合併,新增了lwip wget 下載檔案,預計想要再將這個os再多一個vga的瀏覽器,感覺用NetSurf 渲染都Ok,應該可以在目前的os進行上網,新增了檔案系統,和鍵盤滑鼠硬碟vga驅動 修掉了context switch bug , 使用vga去繪製os的圖…
elf diff tool 最近在想可不可以將分析的路徑在減少一點,這樣在分析code size 會更省事 python Copy import subprocess import re from graphviz import Digraph def generate_objdump_output ( elf_file , output_file ): cmd = [ 'ri…
Try to find the redundant area with the Python gdb (riscv) 大概想統計出某個區域內的pc address所使用的 register 的使用次數與alias的register,和記錄所有regiser 在某個區域內的所有regiser的 狀態,先假設相同compiler來說在編譯加了某些option 導致某段code做不好…
Compare compiler versions python Copy """ Module containing main building blocks to parse assembly and draw CFGs. """ # from goto import with_goto import itertools from goto import with_goto…
walk asm call graph 改動後的asm2cfg大概可以直接接受objdump 直接輸出相對應的call graph 新增了svg的向量圖,增加了顏色判斷與no jump 和 jump 的顏色標記,增加了模糊搜尋走訪dfs 改動最多的地方還是能夠呈現asm 的 source code的部分,原理大概就是把comment當作inst,並給予address bash…
riscv-probe code Copy extern char _rodata_end; extern char _data_start; extern char _bss_end; #define KB (0x1 << 10) static uintptr_t uart_keys[] = { SIFIVE_UART0_CTRL_ADDR,…
run riscv_emulator in webassembly 之前看到gameboy 模擬器run在 瀏覽器上蠻新奇的,之前有寫過重新編譯ffmpeg 到 網頁這次也來編譯一下 https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm 這邊有簡單起始 install emcc bash Copy git…
https://michaeljclark.github.io/isa.html https://github.com/x213212/riscv_emulator riscv_emulator 研讀一下riscv 架構的指令,找了一個模擬器來看實際要執行risc v指令內部會經過哪一些細節 create riscv 架構的 binary code Copy test.bin…