aboutsummaryrefslogtreecommitdiff
path: root/README.md
Commit message (Collapse)AuthorAgeFilesLines
* Write down the requirement for the Zaamo extensionMiquel Sabaté Solà2024-12-031-0/+2
| | | | | | | | | Since 2eead36f97fa ("Run a hart lottery on SMP") the kernel is making use of the 'amoadd.w' instruction, which requires the Zaamo extension (included in the base A extension). This is notable and is worth a mention on the list of requirements. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Simplify the qemu target by removing QEMU_BIOSMiquel Sabaté Solà2024-11-301-19/+3
| | | | | | | | | | | | | | The QEMU_BIOS parameter was meant to help on old QEMU installations which did not support the proper fw_dynamic workflow. That being said, old QEMU versions might also not implement the proper SBI specification, or it may have other unexpected issues. Hence, just remove the option and force people to have a sufficiently recent QEMU version. Finally, I have updated the SVG showing off a QEMU run. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Organize the credits betterMiquel Sabaté Solà2024-11-291-10/+12
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Allow the kernel to run as a Linux imageMiquel Sabaté Solà2024-11-291-7/+37
| | | | | | | | | | | | | | | | | | In order to run on real hardware, it's actually easier to re-use workflows from existing bootloaders than loading things in memory manually. In order to achieve this two things had to be settled: 1. The image has to have a Linux header as defined in the RISC-V port. This header will be taken into consideration by bootloaders in order to know where to jump, the image offset, the endianness of the image, etc. 2. The image cannot just be an ELF executable. Rather, we must translate it into binary form via `objcopy`. With all of this at hand, I was able to make the kernel run on a Starfive VisionFive 2 board, and I have recorded an example so it's available as documentation. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add a video example running on QEMUMiquel Sabaté Solà2024-11-251-0/+2
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add a note on requirement a little-endian systemMiquel Sabaté Solà2024-11-201-0/+2
| | | | | | | | | The dt parsing algorithm assumes that a little-endian system is in place and hence most numbers on the DTB blob have to be converted from big-endian to little-endian. I am not planning on changing that any time soon, so let's add this as a requirement. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Setup the stack for an init taskMiquel Sabaté Solà2024-11-191-0/+13
| | | | | | | | | | | | | | | | | Bootstrap an init task which holds at least the initial stack that is to be used when setting up the registers (such as `sp` and `tp`). In order to guarantee that the stack and the rest of the registers are set up correctly, this commit also provides a raw implementation of a `printk` function. Moreover, this commit also adds an argument that must be passed to `start_kernel`, which is the pointer to the embedded `fdt` blob. This argument will be used by later work so to fetch, at least, the base address for the initial ram disk. This was also used to test that the stack was working as expected. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* usr: Bootstrap the initramfs for the kernelMiquel Sabaté Solà2024-11-181-2/+3
| | | | | | | | | Introduce a sample `foo` program which already calls the `write_and_block` system call which is yet to be implemented by this kernel. Moreover, the same CPIO format is used for the initramfs as with Linux, so we can pass it with QEMU without worries. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Load debug symbols on the gdb targetMiquel Sabaté Solà2024-09-241-9/+25
| | | | | | | | | | | Load the debug symbols into the gdb session by simply passing the executable file into gdb directly. Moreover, allow users of the gdb target to provide an extra variable so to pass extra flags to gdb. Moreover, this commit comes with other small cleanups on the Makefile, like a proper ABI specifier, Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add CI jobMiquel Sabaté Solà2024-09-241-2/+2
| | | | | | | This will ensure that the code style is preserved and that commits being pushed at least build successfully. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Bootstrap the projectMiquel Sabaté Solà2024-08-241-0/+101
For now the base layout has been defined and we have a binary that is properly reached through openSBI. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>