summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-31 14:30:39 +0200
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-31 14:30:39 +0200
commit21b5569ce53892167fb44867b4319ad528602e1e (patch)
treeb63fdf4184b47f72bf0ff1160dafce9e53dc238c /Private/NewBoot/Source
parent48ed22614592c30bd1dc1f98f3988d05454e6c3b (diff)
Kernel:FSKit: Worked on filesystem indexing and new fs_ calls.
- Document fs_newfs_write, fs_newfs_read. - Add fs_index_file. - Remove custom partition, EPM now says that it must be zeroed out. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/NewBoot/Source')
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootCustomPart.cxx40
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx10
2 files changed, 4 insertions, 46 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootCustomPart.cxx b/Private/NewBoot/Source/HEL/AMD64/BootCustomPart.cxx
deleted file mode 100644
index d3022339..00000000
--- a/Private/NewBoot/Source/HEL/AMD64/BootCustomPart.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -------------------------------------------
-
- Copyright Mahrouss Logic
-
-------------------------------------------- */
-
-#include <BootKit/BootKit.hxx>
-#include <FSKit/NewFS.hxx>
-
-/// @brief Writes a NewOS partition on top of EPM
-/// @param ataInterface The ATA interface.
-/// @return
-EXTERN_C Boolean boot_write_newos_partition(BootDeviceATA* ataInterface) {
- if (!ataInterface) return No;
-
- ataInterface->Leak().mBase = 0;
- ataInterface->Leak().mSize = kATASectorSize;
-
- Char newOSHeader[kATASectorSize] = {
- /// signature of our system partition.
- 'N', 'e', 'w', 'O', 'S',
- /// version of our os partition
- (Char)0x10,
- /// to retrieve the header size add these two fileds. (divided into parts.)
- /// header size (pt 1)
- (Char)0x100,
- /// header size (pt 2)
- (Char)0x100,
- /// Reserved
- (Char)0x00,
- /// Current LBA.
- (Char)0x00,
- /// First usable LBA.
- (Char)kEPMStartPartitionBlk,
- };
-
- ataInterface->Write(newOSHeader, 1);
-
- return Yes;
-} \ No newline at end of file
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx b/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx
index 244736c7..52c6a001 100644
--- a/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx
@@ -16,11 +16,11 @@ STATIC const BlockGUID kEPMGuid = {
0x425d,
{0xbe, 0x7b, 0x75, 0xa3, 0x7c, 0xc6, 0x79, 0xbc}};
-/// @brief External reference, write a NewOS Reserved Partition.
-/// @param ataInterface ATA interface
+/// @brief Write epm partition to disk.
+/// @param namePart partition name
+/// @param namePartLength length of name
+/// @param ataInterface disk interface, here ATA.
/// @return
-EXTERN_C Boolean boot_write_newos_partition(BootDeviceATA* ataInterface);
-
EXTERN_C Boolean boot_write_epm_partition(const Char* namePart, SizeT namePartLength,
BootDeviceATA* ataInterface) {
if (namePartLength > kEPMNameLength || !namePart) return No;
@@ -108,8 +108,6 @@ EXTERN_C Boolean boot_write_epm_partition(const Char* namePart, SizeT namePartLe
ataInterface->Write(buf, 1);
- boot_write_newos_partition(ataInterface);
-
return No;
}
}