summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/FirmwareKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-03-31 22:14:55 +0200
committerGitHub <noreply@github.com>2025-03-31 22:14:55 +0200
commit6849e75f2e95e88b43e2f8804abf1b862e3981cb (patch)
tree2f517be98baf5b782c8f3718dc0beb4dc460d3ce /dev/kernel/FirmwareKit
parent33a94b84237afa61d2f15fa158664137724d60a4 (diff)
parentfd288fed29eff48503abf842676085701e04c38d (diff)
Merge pull request #3 from amlel-el-mahrouss/dev
pr/general: a set of patches to be pushed into master.
Diffstat (limited to 'dev/kernel/FirmwareKit')
-rw-r--r--dev/kernel/FirmwareKit/CoreBoot/BootNet.h30
-rw-r--r--dev/kernel/FirmwareKit/CoreBoot/NetBoot.h25
-rw-r--r--dev/kernel/FirmwareKit/EFI/EFI.h14
3 files changed, 33 insertions, 36 deletions
diff --git a/dev/kernel/FirmwareKit/CoreBoot/BootNet.h b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
new file mode 100644
index 00000000..a86ea81a
--- /dev/null
+++ b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
@@ -0,0 +1,30 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define kBootNetINetMagic "NETB"
+#define kBootNetINetMagicLength (4)
+
+#define kBootNetNameLen (256U)
+
+/// @brief the internet header is used to download updates OTA.
+typedef struct BOOTNET_INTERNET_HEADER
+{
+ Kernel::Char NB1; /// magic char 1 'N'
+ Kernel::Char NB2; /// magic char 2 'E'
+ Kernel::Char NB3; /// magic char 3 'T'
+ Kernel::Char NB4; /// magic char 4 'B'
+
+ Kernel::Char Name[kBootNetNameLen]; /// example: Modjo
+ Kernel::Int32 Length; /// the patch length.
+ Kernel::Char Target[kBootNetNameLen]; /// the target file.
+ Kernel::Boolean ImpliesEEPROM : 1; /// does it imply an EEPROM reprogram?
+ Kernel::Boolean Preflight : 1; /// is it a preflight packet.
+ Kernel::Char Data[]; /// non preflight packet has a patch blob for a **PatchTarget**
+} ATTRIBUTE(packed) BOOTNET_INTERNET_HEADER;
diff --git a/dev/kernel/FirmwareKit/CoreBoot/NetBoot.h b/dev/kernel/FirmwareKit/CoreBoot/NetBoot.h
deleted file mode 100644
index b1e9313c..00000000
--- a/dev/kernel/FirmwareKit/CoreBoot/NetBoot.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <NewKit/Defines.h>
-
-/// @brief the internet header is used to download updates OTA.
-typedef struct BOOTNET_INTERNET_HEADER
-{
- Kernel::Char NB1; /// magic char 1 'N'
- Kernel::Char NB2; /// magic char 2 'E'
- Kernel::Char NB3; /// magic char 3 'T'
- Kernel::Char NB4; /// magic char 4 'B'
-
- Kernel::Char PatchName[256U]; /// example: ColdChoco
- Kernel::Int32 PatchLength; /// the patch length.
- Kernel::Char PatchTarget[256U]; /// the target file.
- Kernel::Boolean ImpliesROM; /// does it imply an EEPROM reprogram?
- Kernel::Boolean Preflight; /// is it a preflight packet.
- Kernel::Char Patch[]; /// non preflight packet has a patch blob for a **PatchTarget**
-} BOOTNET_INTERNET_HEADER;
diff --git a/dev/kernel/FirmwareKit/EFI/EFI.h b/dev/kernel/FirmwareKit/EFI/EFI.h
index 3c3ffa09..1e6de42c 100644
--- a/dev/kernel/FirmwareKit/EFI/EFI.h
+++ b/dev/kernel/FirmwareKit/EFI/EFI.h
@@ -201,18 +201,10 @@ typedef enum EfiAllocateType
typedef struct EfiMemoryDescriptor
{
- ///
- /// Kind of the memory region.
- /// Kind EFI_MEMORY_TYPE is defined in the
- /// AllocatePages() function description.
- ///
+ /// @brief Kind of the memory region.
UInt32 Kind;
- ///
- /// Physical address of the first byte in the memory region. PhysicalStart
- /// must be aligned on a 4 KiB boundary, and must not be above
- /// 0xfffffffffffff000. Kind EFI_PHYSICAL_ADDRESS is defined in the
- /// AllocatePages() function description
- ///
+
+ /// @brief Physical address of the first byte in the memory region. PhysicalStart
EfiPhysicalAddress PhysicalStart;
///
/// Virtual address of the first byte in the memory region.