xv6

FPGAにbootcodeやkernelをどう転送するか(SDRAMやUFMとやりとりするには)

いま使用しているDE−10 Liteは残念ながらSRAMを装備しておらず [方法1]Qsys & System Consoleを使う Qsys > SDRAM Controller bit幅を16にする 「wire」を右クリックして「Exported」にする メニューの Generate > Show Instantiation Templateの結果をコ…

Soc周辺機器

xv6

UART (8250, RS-232規格を満たしていればよい) 説明 https://en.wikibooks.org/wiki/Serial_Programming/8250_UART_Programming 実装例 https://github.com/varmil/uart-verilog https://www.nandland.com/vhdl/modules/module-uart-serial-port-rs232.html …

MIPS Interruptのハードウェア実装(CP0)

xv6

CPU受付完了時にassertするIACKピンの実装 We also want to have to ability to service external interrupts. This is useful if a device external to the processor needs attention. To do this, we'll add 2 pins to the processor. The first pin, cal…

xv6 bootmain

xv6

0x7c00 はx86のBIOSがMBRを読み取って、物理メモリに展開するときの位置(仕様) 0x10000 はプログラム側でディスク読み取って、物理メモリに展開する際のdstアドレス。これはリンカスクリプトの設定と一致させればよい。 つまり、自作する際はリセットベク…

xv6-mipsリンカスクリプトとentry

xv6

リンカスクリプトの OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips") OUTPUT_ARCH(mips) ENTRY(_start) この _start はentry.Sに定義されている。 # By convention, the _start symbol specifies the ELF entry poi…

xv6のI/O, PIC, IRQ, uart

xv6

プロセッサ側とポートを合わせなきゃいけないものと、kernel(ソフト側)で好き勝手に決めればいいものの境界線を探っている。xv6-mipsで定義している mips.h static int io_port_base = 0xb4000000; これはなぜこのアドレスなのかわからない。inb outb で u…