HLeOs

所属分类:操作系统开发
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2023-09-20 08:04:01
上 传 者sh-1993
说明:  HLeOs,一种由Trust编程的教育操作系统。,
(HLeOs, a educational operating system programed by rust.,)

文件列表:
HLeOs/ (0, 2023-09-23)
HLeOs/Cargo.lock (790, 2023-09-23)
HLeOs/Cargo.toml (433, 2023-09-23)
HLeOs/Makefile (1761, 2023-09-23)
HLeOs/build.rs (173, 2023-09-23)
HLeOs/c_src/ (0, 2023-09-23)
HLeOs/c_src/dummy_c.c (388, 2023-09-23)
HLeOs/c_src/mem.c (101, 2023-09-23)
HLeOs/gdb_init_real_mode.txt (11211, 2023-09-23)
HLeOs/i386-32bit.xml (7562, 2023-09-23)
HLeOs/paging.png (43923, 2023-09-23)
HLeOs/src/ (0, 2023-09-23)
HLeOs/src/etc.rs (3247, 2023-09-23)
HLeOs/src/hleos.rs (111, 2023-09-23)
HLeOs/src/hleos/ (0, 2023-09-23)
HLeOs/src/hleos/asm.rs (3319, 2023-09-23)
HLeOs/src/hleos/interrupt.rs (9181, 2023-09-23)
HLeOs/src/hleos/interrupt/ (0, 2023-09-23)
HLeOs/src/hleos/interrupt/handler.rs (4501, 2023-09-23)
HLeOs/src/hleos/iostream.rs (2938, 2023-09-23)
HLeOs/src/hleos/kmalloc.rs (2258, 2023-09-23)
HLeOs/src/hleos/thread.rs (7184, 2023-09-23)
HLeOs/src/hleos/thread/ (0, 2023-09-23)
HLeOs/src/hleos/thread/jobs.rs (1120, 2023-09-23)
HLeOs/src/hleos/timer.rs (1548, 2023-09-23)
HLeOs/src/hleos/vga.rs (6927, 2023-09-23)
HLeOs/src/main.rs (4649, 2023-09-23)
HLeOs/src/std.rs (44, 2023-09-23)
HLeOs/src/std/ (0, 2023-09-23)
HLeOs/src/std/bit_map.rs (1710, 2023-09-23)
HLeOs/src/std/io.rs (2994, 2023-09-23)
HLeOs/src/std/queue.rs (1898, 2023-09-23)
HLeOs/target.xml (164, 2023-09-23)
HLeOs/x86_64-HLeos.json (425, 2023-09-23)
LICENSE (18092, 2023-09-23)

# HLeOs ## Description. **HLeOs** is an toy operating system programed by Rust language, on amd64 system. \ made by HLe4s, a system programmer and a student in [sslab](https://sslab.ajou.ac.kr/), Ajou Univ. ## Environment. **HLeOs** can be run on qemu-system-x86_64, and on amd64 PC. \ but, It's code have some randomness.. (see init kmalloc,in src/main.c) \ so An amd64 PC may not run **HLeOs** If you want running **HLeOs** on your PC. you can use "Win32 disk imager" program. ## Prerequisite **HLeOs** is programed by Rust language. so you should prepare rust cargo. (nightly version) ## Files HLeOs\ ├── Cargo.lock\ ├── Cargo.toml\ ├── Makefile\ ├── gdb_init_real_mode.txt\ ├── i386-32bit.xml\ ├── paging.png\ ├── src\ │ ├── etc.rs\ │ ├── hleos\ │ │ ├── asm.rs\ │ │ ├── interrupt\ │ │ │ └── handler.rs\ │ │ ├── interrupt.rs\ │ │ ├── iostream.rs\ │ │ ├── kmalloc.rs\ │ │ ├── thread\ │ │ │ └── jobs.rs\ │ │ ├── thread.rs\ │ │ ├── timer.rs\ │ │ └── vga.rs\ │ ├── hleos.rs\ │ ├── main.rs\ │ ├── std\ │ │ ├── bit_map.rs\ │ │ ├── io.rs\ │ │ └── queue.rs\ │ └── std.rs\ ├── target.xml\ └── x86_64-HLeos.json - paging.png : paging state when kernel started. (before init_stack(), in main.rs) ![paging](https://github.com/HLe4s/HLeOs/blob/main/HLeOs/paging.png?raw=true) - src : a directory, have source files of **HLeOs** - src/main.rs : **HLeOs**'s kernel main - src/etc.rs : **HLeOs**'s etc functions.. - src/hleos : a module about **HLeOs**'s kernel function. - src/hleos/asm.rs : rust inline asm code blocks - src/hleos/interrupt.rs : funcs about interrupt, GDT, IDT, TSS .. etc - src/hleos/interrupt/handler.rs : interrupt and exception handlers - src/hleos/iostream.rs : keyboard service. (very limited, waiting based while loop) - src/hleos/kmalloc.rs : kernel memory allocate service. (bit_map **must be** cleared to zero) - src/hleos/thread.rs : kernel thread api - src/hleos/thread/jobs.rs : for kernel thread jobs - src/hleos/timer.rs : incompleted module. about timer - src/hleos/vga.rs : **HLeOs**'s vga text print api - src/std : a module for a user famililar layer of **HLeOs**'s functions. - src/std/bit_map.rs : usable bitmap module. - src/std/io.rs : for _println!_, _print!_ macro - src/std/queue.rs : usable queue module. ## Usage please refer to Makefile file. make - build **HLeOs** \ make run - run **HLeOs** on qemu-system-x86_64 \ make gdb - run **HLeOs** on qemu-system-x86_64 and remote debug. on tcp:1234 \ make debug - debug **HLeOs** on qemu, (pair to make gdb) \ make dump - make disasmbled dump file. and other PHONY are in Makefile. good luck ! ## Reference 64 OS \ very thanks to writer of this book, for writting good book \ also refered to [AMD64 Architecture Programmer’s Manual Volume 2: System Programming](https://www.amd.com/system/files/TechDocs/24593.pdf) \ and, [https://os.phil-opp.com/freestanding-rust-binary/](https://os.phil-opp.com/freestanding-rust-binary/) => Thanks for good quality of docs. Deprecated README.md ( ~ 2022.05.13 ) ---------------------------------------------- # HLeOs HLeOs, a educational operating system programed by rust. ----------------------------------------------------- show some descriptions about this project. in my blog, .. it 's in korean [myblog](https://hacking-yi.kro.kr "my blog") ### 01. how to debug boot loader in real mode debugging [ko] Makefile , gdb-i386 debug-loader . boot loader . qemu-system-i386 , gdb realmode , x86_64 . , realmode . . 1. . 2. "make ; make gdb-i386" . 3. "make debug-loader" . 4. . , file ;; ++ symbol . [en] you can find two rules in Makefile, 'gdb-i386', 'debug-loader' this two rules are used to debug the boot loader in real mode. I made 'gdb-i386' because, when I debug boot loader in realmode, It makes an error to use 'qemu-system-x86_64' so I made restrictly the two rules. How to debug loader 1. open two terminal 2. in one, type "make ; make gdb-i386" 3. in another, type "make debug-loader" 4. debug ! # file command makes error :( ++ you can make symbol by using 'symbol' command

近期下载者

相关文件


收藏者