feat: a pseudo shell environment for basic interacting and testing purpose
[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 1.1 (WIP)
33 + Serial ATA AHCI (WIP)
34
35 ## Project Structure
36
37 | | |
38 |-----|------|
39 | [lunaix-os](../lunaix-os/) | LunaixOS source code |
40 | [slides](../slides/) | Slides used in my videos |
41 | [reference-material](../reference-material/)| References |
42
43 ## Referenced Tutorial
44
45 **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.
46
47 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".
48
49 You can find most of aforementioned materials in [reference-material](../reference-material/).
50
51 The following list also enumerated such materials the author has used:
52
53 #### Manuals, Technical References and Standards
54 + [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)
55 + [ACPI Specification (version 6.4)](https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf)
56 + IBM PC/AT Technical Reference
57 + IBM VGA/XGA Technical Reference
58 + 82093AA I/O Advanced Programmable Controller (IOAPIC) (Datasheet)
59 + MC146818A (Datasheet)
60 + Intel 500 Series Chipset Family Platform Controller Hub (Datasheet - Volume 2)
61 + PCI Local Bus Specification, Revision 3.0
62 + PCI Express Base Specification, Revision 1.1
63 + PCI Firmware Specification, Revision 3.0
64 + Serial ATA - Advanced Host Controller Interface (AHCI), Revision 1.3.1
65 + Serial ATA: HIgh Speed Serialized AT Attachment, Revision 3.2
66
67 **DISCLAIMER: All rights of PCI-related specification is reserved by PCI-SIG. It is provided ONLY for learning purpose. Any commercial use should purchase a copy from PCI-SIG**
68
69 #### Textbook
70 + *Computer System - A Programmer's Perspective Third Edition* (Bryant, R & O'Hallaron, D), a.k.a. CS:APP
71 + *Modern Operating System* (Tanenbaum, A)
72
73
74 #### Website 
75 + [OSDev](https://wiki.osdev.org/Main_Page) - For material gathering.
76 + [FreeVGA](http://www.osdever.net/FreeVGA/home.htm) - For VGA references.
77 + GNU CC & LD online documentation.
78 + [PCI Lookup](https://www.pcilookup.com/) - For device look up
79
80 #### Others
81 + Linux Manual - For learning the system call behavior on real machine.
82
83
84 ## Appendix 1: Supported System Call<a id="appendix1"></a>
85
86 ### Unix/Linux/POSIX
87 1. `sleep(3)`
88 1. `wait(2)`
89 1. `waitpid(2)`
90 1. `fork(2)`
91 1. `getpid(2)`
92 1. `getppid(2)`
93 1. `getpgid(2)`
94 1. `setpgid(2)`
95 1. `brk(2)`
96 1. `sbrk(2)`
97 1. `_exit(2)`
98 1. `sigreturn(2)`
99 1. `sigprocmask(2)`
100 1. `signal(2)`
101 1. `kill(2)`
102 1. `sigpending(2)`
103 1. `sigsuspend(2)`
104
105 ### Unique to LunaixOS
106
107 1. `yield`