From 0cfb40b58a7fa2315ee097a159cd73eae37de172 Mon Sep 17 00:00:00 2001 From: N00byEdge Date: Sun, 27 Sep 2020 18:42:01 +0200 Subject: [PATCH 1/2] Stivale2: Add MMIO32 UART and Device tree blob tags --- STIVALE2.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/STIVALE2.md b/STIVALE2.md index 5db165fa..2616612c 100644 --- a/STIVALE2.md +++ b/STIVALE2.md @@ -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_firmware { + 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_firmware { + 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)); +``` From 3888b1ce8186940b7561505b8594e2f2ca5a2a40 Mon Sep 17 00:00:00 2001 From: N00byEdge Date: Sun, 27 Sep 2020 18:43:03 +0200 Subject: [PATCH 2/2] Fix struct names --- STIVALE2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/STIVALE2.md b/STIVALE2.md index 2616612c..afd1df0a 100644 --- a/STIVALE2.md +++ b/STIVALE2.md @@ -448,7 +448,7 @@ struct stivale2_smp_info { 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_firmware { +struct stivale2_struct_tag_mmio32_uart { uint64_t identifier; // Identifier: 0xb813f9b8dbc78797 uint64_t next; uint64_t addr; // The address of the UART port @@ -460,7 +460,7 @@ struct stivale2_struct_tag_firmware { This tag describes a device tree blob for the platform. ```c -struct stivale2_struct_tag_firmware { +struct stivale2_struct_tag_dtb { uint64_t identifier; // Identifier: 0xabb29bd49a2833fa uint64_t next; uint64_t addr; // The address of the dtb