noxos (docs): merged 'boot' and 'drivers/acpi' docs from .wiki

This commit is contained in:
antifallobst 2023-03-15 18:28:15 +01:00
parent a4d2b59329
commit 9a2bef569b
6 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,16 @@
---
title: "boot_info.h"
summary: "information that was requested from the bootloader"
---
The goal of this file is to provide a universal struct of information needed by the kernel at start time.
At the moment this information is very limine specific, but the goal is to make it easy to add support for other boot protocols.
# `boot_info_T` - struct
| Name | Description |
|-------------|---------------------------------------------------|
| framebuffer | struct with information about the graphics buffer |
| terminal | bootloader terminal / graphical log |
| memory_map | information about the memory layout / regions |
| kernel_file | The unparsed kernel ELF file |
| rsdp | _Root System Description Pointer_ |

View File

@ -0,0 +1,7 @@
---
title: "limine.h"
summary: "communication with the limine bootloader"
---
This header provides the API to "communicate" with the limine bootloader.
More information can be found on the limine project's [GitHub](https://github.com/limine-bootloader/limine/blob/trunk/PROTOCOL.md).

View File

@ -0,0 +1,4 @@
---
title: "acpi"
summary: "The noxos implementation of the ACPI standard"
---

View File

@ -0,0 +1,7 @@
---
title: "acpi"
---
This directory holds everything, that is needed to talk to the ACPI (_Advanced Configuration and Power Interface_).
OSDev Wiki: [ACPI](https://wiki.osdev.org/ACPI)

View File

@ -0,0 +1,8 @@
---
title: "acpi.h"
summary: "The basic infrastructure to talk to the ACPI"
---
# `acpi_init(boot_info)` - function (void)
Initializes the ACPI implementation.
This function needs to be called once during the kernel initialization.

View File

@ -0,0 +1,28 @@
---
title: "rsdp.h"
summary: "The infrastructure to parse the _Root System Description Pointer_ Table"
---
OSDev Wiki: [RSDP](https://wiki.osdev.org/RSDP)
# `rsdp_descriptor_v1_T` - struct [packed]
The RSDP Table used in ACPI v1.0
| Name | Type | Description |
|--------------|----------|-----------------------------------------------------------|
| signature | char[8] | Needs to be `"RSD PTR "` (with the withespace at the end) |
| checksum | uint8_t | Used to validate the table |
| oem_id | char[6] | This string identifies the OEM |
| revision | uint8_t | Tells whether the RSDP is version 1 or 2+ |
| rsdt_address | uint32_t | The Physical Address of the RSDT |
# `rsdp_descriptor_v2_T` - struct [packed]
The RSDP Table used in ACPI v2.0 or higher
| Name | Type | Description |
|-------------------|-------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
| descriptor_v1 | [rsdp_descriptor_v1_T](https://nerdcult.net/projects/noxos/docs/codebase/drivers/acpi/rsdp.h/#rsdp_descriptor_v1_t---struct-packed) | A table in the format of the ACPI 1.0 specification |
| length | uint32_t | The size of the whole table |
| xsdt_address | uint64_t | The Address of the XSDT (when available this should be used instead of the RSDT) |
| checksum_extended | uint8_t | Used to calculate the checksum of the whole table |
| reserved | uint8_t[3] | Can be ignored |