mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-04-02 06:15:08 +01:00
29 lines
605 B
HolyC
Executable file
29 lines
605 B
HolyC
Executable file
U0 Auto()
|
|
{
|
|
I64 i, ata_port = -1;
|
|
CAHCIPort *port;
|
|
U8 *in_str;
|
|
|
|
for (i = 0; i < AHCI_MAX_PORTS; i++)
|
|
|
|
{
|
|
if (Bt(&blkdev.ahci_hba->ports_implemented, i))
|
|
{
|
|
port = &blkdev.ahci_hba->ports[i];
|
|
if (port->signature == AHCI_PxSIG_ATA)
|
|
{
|
|
ata_port = i;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
BootMHDIns('C');
|
|
in_str = MStrPrint("Sleep(700);In(\"CC\\n%d\\n\\n\\n\\n\");", ata_port);
|
|
OnceDrive('C', in_str);
|
|
Free(in_str);
|
|
in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"#include \\\"/Misc/Auto/AutoFullDistro00\\\";;Auto;\");OutU8(0x501,0x31);");
|
|
OnceDrive('C', in_str);
|
|
OutU8(0x501,0x31);
|
|
}
|
|
Auto;
|