2012-03-27
Materials
JOS
- http://pdos.csail.mit.edu/6.828/2011/lec/l-x86.pdf
- http://pdos.csail.mit.edu/6.828/2011/xv6/book-rev6.pdf
Highlight
- EIP modified by CALL, RET, JMP, and conditional JMP
Memory
Memory IO-mapped
- http://www.c-jump.com/CIS77/ASM/Memory/lecture.html
- http://en.wikipedia.org/wiki/Addressing_mode
PC emulator
- Emulation of Memory, CPU, Devices,
http://www.c-jump.com/CIS77/CIS77syllabus.htm
Emulation Model
- Register-based
ex: Dalvik VM
- Stack-based
Interpreter
- switch
- label op code
...
If your lab1 is going on
You could try to reference: http://hawxchen.blogspot.com/search/label/MIT-6.828_OSE
Update collection of git repositories
git clone https://github.com/benwei/MIT-OSE-Labs.git
git submodule init
git submodule update
Qestions
why warm reboot after kernel start?
movw $0x1234, 0x472
reboot_mode samples
void reboot_setup(char *str, int *ints)
{
while(1) {
switch (*str) {
case 'w': /* "warm" reboot (no memory testing etc) */
reboot_mode = 0x1234;
break;
case 'c': /* "cold" reboot (with memory testing etc) */
reboot_mode = 0x0;
break;
case 'b': /* "bios" reboot by jumping through the BIOS */
reboot_thru_bios = 1;
break;
case 'h': /* "hard" reboot by toggling RESET and/or crashing the CPU */
reboot_thru_bios = 0;
break;
}
if((str = strchr(str,',')) != NULL)
str++;
else
break;
}
}
http://www.cab.u-szeged.hu/linux/kernel/linux/arch/i386/kernel/process.c.html
Disk I/O JOS
read_sect(): i/o port to access hard disk
Boot Mode
Now, for those of you familiar with the PC architecture, there seem to be some missing, including the famous warm-reset (0x1234 anybody?) software jump to the reset vector and the CPU-only reset (used for core-logic bus adjustments). In general, these other reasons are coerced into one of the above values.
有趣的是,連寫Bios的人都不見得知道為什是0x1234?
http://wiki.phoenix.com/wiki/index.php/Boot_Mode
Jserv's Note
日本 UNIX v6 研討會 -> http://atnd.org/events/25533
基於新南威爾斯大學 (就是 OKL4 微核心的發源地) 課程教材: http://v6.cuzuco.com/v6.pdf
(UNIX OPERATING SYSTEM SOURCE CODE LEVEL SIX)
日期:2012/03/24
簡報已上線,推薦閱讀!
http://www.slideshare.net/magoroku15/v6-unix-in-okinawa
依據主持人的說法,似乎辦得很不錯:(「今日の勉強会は凄く良かったです」)
http://d.hatena.ne.jp/yamanetoshi/20120324
http://d.hatena.ne.jp/yamanetoshi/20120325
熱血圖解 UNIX internals -> http://d.hatena.ne.jp/takahirox/
AWK 也能寫 compiler ->
AASL: Parser Genrator in Awk
seL4 (OKLabs 的產學合作計畫) 使用Haskell 驗證microkernel
http://ertos.nicta.com.au/research/sel4/
Paper: Running the manual: An approach to high-assurance microkernel development
Others
python slower than javascript
http://blog.famzah.net/2010/07/01/cpp-vs-python-vs-perl-vs-php-performance-benchmark/