Merge pull request #36 from N00byEdge/patch-1

Stivale2: Add MMIO32 UART and Device tree blob tags
This commit is contained in:
mint 2020-09-27 19:21:58 +02:00 committed by GitHub
commit c3570f9fc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

View File

@ -442,3 +442,28 @@ struct stivale2_smp_info {
// struct describing the BSP (lapic_id == 0)
} __attribute__((packed));
```
#### MMIO32 UART tag
This tag reports that there is a memory mapped UART port and its address. To write to this port, write the character, zero extended to a 32 bit unsigned integer to the address provided.
```c
struct stivale2_struct_tag_mmio32_uart {
uint64_t identifier; // Identifier: 0xb813f9b8dbc78797
uint64_t next;
uint64_t addr; // The address of the UART port
} __attribute__((packed));
```
#### Device tree blob tag
This tag describes a device tree blob for the platform.
```c
struct stivale2_struct_tag_dtb {
uint64_t identifier; // Identifier: 0xabb29bd49a2833fa
uint64_t next;
uint64_t addr; // The address of the dtb
uint64_t size; // The size of the dtb
} __attribute__((packed));
```