feat: partial PCIe support (MCFG table parsing)
[lunaix-os.git] / docs / README_en.md
1 <p align="center">
2   <img width="auto" src="img/lunaix-os-logo.png">
3 </p>
4
5 <p align="center">
6   <a href="../README.md"><b>简体中文</b></a> | <span><b>English</b></span>
7 </p>
8
9 # The LunaixOS Project 
10 LunaixOS - A simple (yet naive), POSIX-complaint (hopefully!), operating system from scratch. This is started for educational & learning purpose, for my online video tutorial on OS development **in Chinese**:[*Do It Yourself an Operating System*](https://space.bilibili.com/12995787/channel/collectiondetail?sid=196337).
11
12 ## Features
13
14 This operating system is a macro-kernel, has its root in Intel's x86 platform and its ecosystem. It runs in protected mode and uses 4GiB addressing with two-level paging mechanism. It does not have x86_64 variant and does not support multi-core machine. 
15
16 The virtual address space is divided into two parts, that is, 3GiB for user space (0x400000 ~ 0xBFFFFFFF) and 1GiB for kernel space (0xC0000000 ~ 0xFFFFFFFF). Such paradigm is a common practicing found in major operating systems, for example x86_32 version of Linux and Windows. For a more detailed arrangement of memory in LunaixOS, please refer to [LunaixOS Virtual Memory Mappings](img/lunaix-os-mem.png).
17
18
19 The following list presents all features it does have in current stage.
20
21 + Multiboot for bootstrapping
22 + APIC/IOAPIC as interrupt controller and programmable timer.
23 + ACPI table parsing.
24 + Virtual memory & paging
25 + Memory management & demand paging
26 + PS/2 Keyboard support
27 + Muti-tasking and task management
28 + 17 commonly used POSIX syscall([See Appendix 1](#appendix1))
29 + User Space
30 + Signal
31 + PCI 3.0
32 + PCIe 2.0 (WIP)
33
34 ## Project Structure
35
36 | | |
37 |-----|------|
38 | [lunaix-os](../lunaix-os/) | LunaixOS source code |
39 | [slides](../slides/) | Slides used in my videos |
40 | [reference-material](../reference-material/)| References |
41
42 ## Referenced Tutorial
43
44 **THERE IS NONE !** The project is based solely on my understanding on operating system concepts and relevant research. And has referenced no third party tutorial nor open source project like the Linux or other hobbyist project.
45
46 Thus, the author has devoted large amount of time to go through any related materials such as technical references, manuals, textbooks, and industrial standards. To further ensure the technology used and knowledge taught is up-to-date and is coming "straight from the factory".
47
48 You can find most of aforementioned materials in [reference-material](../reference-material/).
49
50 The following list also enumerated such materials the author has used:
51
52 #### Manuals, Technical References and Standards
53 + [Intel 64 and IA-32 Architecture Software Developer's Manual (Full Volume Bundle)](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html)
54 + [ACPI Specification (version 6.4)](https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf)
55 + IBM PC/AT Technical Reference
56 + IBM VGA/XGA Technical Reference
57 + 82093AA I/O Advanced Programmable Controller (IOAPIC) (Datasheet)
58 + MC146818A (Datasheet)
59 + Intel 500 Series Chipset Family Platform Controller Hub (Datasheet - Volume 2)
60 + PCI Local Bus Specification, Revision 3.0
61
62 #### Textbook
63 + *Computer System - A Programmer's Perspective Third Edition* (Bryant, R & O'Hallaron, D), a.k.a. CS:APP
64 + *Modern Operating System* (Tanenbaum, A)
65
66
67 #### Website 
68 + [OSDev](https://wiki.osdev.org/Main_Page) - For material gathering.
69 + [FreeVGA](http://www.osdever.net/FreeVGA/home.htm) - For VGA references.
70 + GNU CC & LD online documentation.
71 + [PCI Lookup](https://www.pcilookup.com/) - For device look up
72
73 #### Others
74 + Linux Manual - For learning the system call behavior on real machine.
75
76
77 ## Appendix 1: Supported System Call<a id="appendix1"></a>
78
79 ### Unix/Linux/POSIX
80 1. `sleep(3)`
81 1. `wait(2)`
82 1. `waitpid(2)`
83 1. `fork(2)`
84 1. `getpid(2)`
85 1. `getppid(2)`
86 1. `getpgid(2)`
87 1. `setpgid(2)`
88 1. `brk(2)`
89 1. `sbrk(2)`
90 1. `_exit(2)`
91 1. `sigreturn(2)`
92 1. `sigprocmask(2)`
93 1. `signal(2)`
94 1. `kill(2)`
95 1. `sigpending(2)`
96 1. `sigsuspend(2)`
97
98 ### Unique to LunaixOS
99
100 1. `yield`