mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 15:26:43 +00:00
Make another non-functional limine hdd install test file.
:^)
This commit is contained in:
parent
7a109d8162
commit
415294c209
1 changed files with 40 additions and 0 deletions
40
src/Home/LimineHDD2.ZC
Executable file
40
src/Home/LimineHDD2.ZC
Executable file
|
@ -0,0 +1,40 @@
|
|||
|
||||
#include "/Boot/Limine-HDD.HH"
|
||||
|
||||
class CLimineStage2Header
|
||||
{
|
||||
U16 size_a;
|
||||
U16 size_b;
|
||||
U32 location_a;
|
||||
U32 location_b;
|
||||
}
|
||||
|
||||
DocMax;
|
||||
|
||||
Dump(binary_limine_hdd_bin_data + 0x1A4);
|
||||
|
||||
CLimineStage2Header *limine_stage2 = binary_limine_hdd_bin_data + 0x1A4;
|
||||
|
||||
ClassRep(limine_stage2);
|
||||
|
||||
U16 limine_stage2_size_bytes = sizeof(binary_limine_hdd_bin_data) - BLK_SIZE;
|
||||
U16 limine_stage2_size_remainder = (BLK_SIZE - (limine_stage2_size_bytes % BLK_SIZE));
|
||||
U16 limine_stage2_size_aligned = limine_stage2_size_bytes + limine_stage2_size_remainder;
|
||||
|
||||
U16 limine_stage2_size_a = (limine_stage2_size_aligned / 2) + (BLK_SIZE - ((limine_stage2_size_aligned / 2) % BLK_SIZE));
|
||||
|
||||
limine_stage2->location_a = 512;
|
||||
limine_stage2->size_a = limine_stage2_size_a;
|
||||
limine_stage2->location_b = limine_stage2->location_a + limine_stage2->size_a;
|
||||
limine_stage2->size_b = limine_stage2_size_bytes - limine_stage2->location_b;
|
||||
|
||||
Dump(binary_limine_hdd_bin_data + 0x1A4);
|
||||
ClassRep(limine_stage2);
|
||||
|
||||
//CBlkDev *bd = Letter2BlkDev('c');
|
||||
|
||||
U8 buffer[2000*16];
|
||||
MemSet(buffer, 0, 2000*16);
|
||||
MemCopy(buffer, binary_limine_hdd_bin_data, sizeof(binary_limine_hdd_bin_data));
|
||||
|
||||
AHCIAtaBlksWrite(bd, buffer, 0, limine_stage2_size_aligned / BLK_SIZE);
|
Loading…
Reference in a new issue