From 30ba1aab88bd8138a6b3b3e1dbb464e4e67af698 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 3 Feb 2026 19:06:45 +0100 Subject: chore: {DDK, KernelKit}: Improvements and release schedule. Signed-off-by: Amlal El Mahrouss --- src/boot/BootKit/BootKit.h | 16 ++++++++-------- src/boot/modules/BootNet/BootNet.cc | 4 ++-- src/boot/src/HEL/AMD64/BootATA.cc | 13 +++++-------- src/boot/src/HEL/ARM64/BootPlatform.cc | 3 +-- src/boot/src/New+Delete.cc | 3 +-- 5 files changed, 17 insertions(+), 22 deletions(-) (limited to 'src/boot') diff --git a/src/boot/BootKit/BootKit.h b/src/boot/BootKit/BootKit.h index fa10e6cf..4296ebcb 100644 --- a/src/boot/BootKit/BootKit.h +++ b/src/boot/BootKit/BootKit.h @@ -290,16 +290,16 @@ inline Boolean BDiskFormatFactory::Format(const Char* part_name) { CopyMem(gpt_part->Signature, reinterpret_cast(const_cast(kMagicGPT)), StrLen(kMagicGPT)); - gpt_part->Revision = 0x00010000; + gpt_part->Revision = 0x00010000; gpt_part->HeaderSize = sizeof(GPT_PARTITION_TABLE); gpt_part->CRC32 = 0x00000000; - gpt_part->Reserved1 = 0x00000000; - gpt_part->LBAHeader = 0x00000000; - gpt_part->LBAAltHeader = 0x00000000; + gpt_part->Reserved1 = 0x00000000; + gpt_part->LBAHeader = 0x00000000; + gpt_part->LBAAltHeader = 0x00000000; gpt_part->FirstGPTEntry = 0x00000000; - gpt_part->LastGPTEntry = 0x00000000; + gpt_part->LastGPTEntry = 0x00000000; gpt_part->Guid.Data1 = 0x00000000; gpt_part->Guid.Data2 = 0x0000; @@ -309,10 +309,10 @@ inline Boolean BDiskFormatFactory::Format(const Char* part_name) { gpt_part->Revision = 0x00010000; - gpt_part->StartingLBA = 0x00000000; + gpt_part->StartingLBA = 0x00000000; gpt_part->NumPartitionEntries = 0x00000000; - gpt_part->SizeOfEntries = 0x00000000; - gpt_part->CRC32PartEntry = 0x00000000; + gpt_part->SizeOfEntries = 0x00000000; + gpt_part->CRC32PartEntry = 0x00000000; SetMem(gpt_part->Reserved2, 0, kSectorAlignGPT_PartTbl); diff --git a/src/boot/modules/BootNet/BootNet.cc b/src/boot/modules/BootNet/BootNet.cc index 4a08cb51..8b0112c5 100644 --- a/src/boot/modules/BootNet/BootNet.cc +++ b/src/boot/modules/BootNet/BootNet.cc @@ -7,8 +7,8 @@ #include #include -STATIC EFI_GUID kEfiSimpleProtoGUID = EFI_SIMPLE_NETWORK_PROTOCOL_GUID; -STATIC EFI_SIMPLE_NETWORK_PROTOCOL* kEfiProtocol = nullptr; +STATIC EFI_GUID kEfiSimpleProtoGUID = EFI_SIMPLE_NETWORK_PROTOCOL_GUID; +STATIC EFI_SIMPLE_NETWORK_PROTOCOL* kEfiProtocol = nullptr; STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER inet, BOOTNET_INTERNET_HEADER** inet_out); diff --git a/src/boot/src/HEL/AMD64/BootATA.cc b/src/boot/src/HEL/AMD64/BootATA.cc index 3826ea41..423f4437 100644 --- a/src/boot/src/HEL/AMD64/BootATA.cc +++ b/src/boot/src/HEL/AMD64/BootATA.cc @@ -75,8 +75,7 @@ ATAInit_Retry: /// fetch serial info /// model, speed, number of sectors... - while (!(rt_in8(IO + ATA_REG_STATUS) & ATA_SR_DRQ)) - ; + while (!(rt_in8(IO + ATA_REG_STATUS) & ATA_SR_DRQ)); for (SizeT indexData = 0ul; indexData < kATADataLen; ++indexData) { kATAData[indexData] = rt_in16(IO + ATA_REG_DATA); @@ -102,15 +101,14 @@ Void boot_ata_read(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeASCII* Buf, rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) &0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_READ_PIO); - while (!(rt_in8(IO + ATA_REG_STATUS) & ATA_SR_DRQ)) - ; + while (!(rt_in8(IO + ATA_REG_STATUS) & ATA_SR_DRQ)); for (SizeT IndexOff = 0; IndexOff < Size; IndexOff += 2) { boot_ata_wait_io(IO); @@ -136,15 +134,14 @@ Void boot_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeASCII* Buf rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) &0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_WRITE_PIO); - while (!(rt_in8(IO + ATA_REG_STATUS) & ATA_SR_DRQ)) - ; + while (!(rt_in8(IO + ATA_REG_STATUS) & ATA_SR_DRQ)); for (SizeT IndexOff = 0; IndexOff < Size; IndexOff += 2) { boot_ata_wait_io(IO); diff --git a/src/boot/src/HEL/ARM64/BootPlatform.cc b/src/boot/src/HEL/ARM64/BootPlatform.cc index 612fe62c..8e45fa60 100644 --- a/src/boot/src/HEL/ARM64/BootPlatform.cc +++ b/src/boot/src/HEL/ARM64/BootPlatform.cc @@ -11,8 +11,7 @@ using namespace Boot; EXTERN_C void rt_halt() { - while (Yes) - ; + while (Yes); } EXTERN_C void rt_cli() {} diff --git a/src/boot/src/New+Delete.cc b/src/boot/src/New+Delete.cc index 99a31166..20965cbe 100644 --- a/src/boot/src/New+Delete.cc +++ b/src/boot/src/New+Delete.cc @@ -15,8 +15,7 @@ void* operator new(size_t sz) { void* buf = nullptr; - while (BS->AllocatePool(EfiMemoryType::EfiLoaderData, sz, &buf) != kEfiOk) - ; + while (BS->AllocatePool(EfiMemoryType::EfiLoaderData, sz, &buf) != kEfiOk); return buf; } -- cgit v1.2.3