summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dev/boot/modules/BootNet/BootNet.cc5
-rw-r--r--dev/kernel/FirmwareKit/CoreBoot/BootNet.h14
2 files changed, 12 insertions, 7 deletions
diff --git a/dev/boot/modules/BootNet/BootNet.cc b/dev/boot/modules/BootNet/BootNet.cc
index c91460cb..d4f8c1fc 100644
--- a/dev/boot/modules/BootNet/BootNet.cc
+++ b/dev/boot/modules/BootNet/BootNet.cc
@@ -44,6 +44,11 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover) {
return kEfiFail;
}
+ if (inet_out->Version != kBootNetVersion) {
+ writer.Write("BootNet: The version clashes, not good.\r");
+ return kEfiFail;
+ }
+
if (!inet_out->ImpliesProgram) {
Boot::BootThread thread(inet_out->Data);
diff --git a/dev/kernel/FirmwareKit/CoreBoot/BootNet.h b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
index b05f382e..c42c98db 100644
--- a/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
+++ b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
@@ -8,9 +8,9 @@
#include <NeKit/Defines.h>
-#define kBootNetINetMagic "NETB"
+#define kBootNetINetMagic "ONET"
#define kBootNetINetMagicLength (4)
-
+#define kBootNetVersion (0x001)
#define kBootNetNameLen (256U)
/// @brief Netboot Internet Header
@@ -18,11 +18,11 @@
/// sent (if m_preflight = 0)
/// @note Can be used to patch ROMs too (if ImpliesProgram = 1)
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 NB1; /// magic char 1 'O'
+ Kernel::Char NB2; /// magic char 2 'N'
+ Kernel::Char NB3; /// magic char 3 'E'
+ Kernel::Char NB4; /// magic char 4 'T'
+ Kernel::UInt16 Version;
Kernel::Char Name[kBootNetNameLen]; /// example: Modjo
Kernel::Int32 Length; /// the patch length.
Kernel::Char Target[kBootNetNameLen]; /// the target file.