summaryrefslogtreecommitdiffhomepage
path: root/dev/hpfs
diff options
context:
space:
mode:
Diffstat (limited to 'dev/hpfs')
-rw-r--r--dev/hpfs/ReadMe.md2
-rw-r--r--dev/hpfs/epm/blob.json4
-rw-r--r--dev/hpfs/epm/ebs.i2
-rw-r--r--dev/hpfs/hpfs_specs.hxx19
-rw-r--r--dev/hpfs/src/hpfs_main.cxx11
5 files changed, 30 insertions, 8 deletions
diff --git a/dev/hpfs/ReadMe.md b/dev/hpfs/ReadMe.md
index 21fcc961..53778988 100644
--- a/dev/hpfs/ReadMe.md
+++ b/dev/hpfs/ReadMe.md
@@ -1,4 +1,4 @@
-# High Performance File System
+# High Performance File System.
Filesystem driver for the HPFS specification.
diff --git a/dev/hpfs/epm/blob.json b/dev/hpfs/epm/blob.json
index 4ce4fc1c..4b1905b5 100644
--- a/dev/hpfs/epm/blob.json
+++ b/dev/hpfs/epm/blob.json
@@ -1,6 +1,6 @@
{
"compiler_path": "nasm",
- "sources_path": ["EPM.asm"],
- "output_name": "hpfs.bin",
+ "sources_path": ["epm.asm"],
+ "output_name": "bl.bin",
"compiler_flags": ["-f bin"]
}
diff --git a/dev/hpfs/epm/ebs.i b/dev/hpfs/epm/ebs.i
index c137b6f4..c486f463 100644
--- a/dev/hpfs/epm/ebs.i
+++ b/dev/hpfs/epm/ebs.i
@@ -7,7 +7,7 @@
;; DUMP THIS BLOB TO DISK, WHEN FORMATTING THE SSD.
HPFS_EBS_HEADER:
- db " HPFS" ;; MAGIC NUMBER OF FILESYSTEM
+ db " HPFS", 0 ;; MAGIC NUMBER OF FILESYSTEM
dw 8 ;; MAGIC NUMBER LENGTH.
dq 0 ;; RESERVED 4
dw 0x0100 ;; VERSION
diff --git a/dev/hpfs/hpfs_specs.hxx b/dev/hpfs/hpfs_specs.hxx
index f04ce63f..851623a4 100644
--- a/dev/hpfs/hpfs_specs.hxx
+++ b/dev/hpfs/hpfs_specs.hxx
@@ -9,4 +9,21 @@
#pragma once
-#define cHPFSVersion 0x0100
+#include <ddk/ddk.h>
+
+#define kHPFSVersion 0x01000
+#define kHPFSMagic " HPFS"
+#define kHPFSMagicLen 8
+
+/** @brief Drive type enum. */
+enum
+{
+ kHPFSInvalidDrive,
+ kHPFSCDROMDrive,
+ kHPFSHDDDrive,
+ kHPFSSSDDrive,
+ kHPFSUSBDrive,
+};
+
+/** @brief Explicit Boot Sector structure. */
+struct HPFS_EXPLICIT_BOOT_SECTOR;
diff --git a/dev/hpfs/src/hpfs_main.cxx b/dev/hpfs/src/hpfs_main.cxx
index 1ab6c653..ce712f2c 100644
--- a/dev/hpfs/src/hpfs_main.cxx
+++ b/dev/hpfs/src/hpfs_main.cxx
@@ -8,15 +8,20 @@
------------------------------------------- */
#include <hpfs/hpfs_specs.hxx>
-#include <ddk/ddk.h>
static DDK_OBJECT_MANIFEST* kIfsObject = nullptr;
/** @brief HPFS IFS main module function. */
-int32_t ModuleMain(void)
+DK_EXTERN int32_t ModuleMain(void)
{
auto ifs_handle = KernelGetObject(0, "IFS_OBJECT");
- // TODO: Register this IFS with necessary I/O functions...
+
+ if (ifs_handle == nil)
+ {
+ return 1;
+ }
+
+ /// TODO: Register this IFS with necessary I/O functions...
kIfsObject = ifs_handle;