mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 15:26:43 +00:00
Restore install-drive functionality, remove legacy IDE fields and padding from CBlkDev
and CBlkDevGlobals
, add ins_port
AHCI member and use it to replace IDE fields.
This commit is contained in:
parent
b6496c9378
commit
1b2144c451
11 changed files with 25 additions and 63 deletions
BIN
build/AUTO.ISO
BIN
build/AUTO.ISO
Binary file not shown.
|
@ -1,4 +1,9 @@
|
|||
$WW,1$$FG,5$$TX+CX,"ChangeLog"$$FG$
|
||||
$IV,1$----12/04/21 04:16:45----$IV,0$
|
||||
* Raised version number to 1.06.
|
||||
* Removed IDE members and padding from CBlkDev and CBlkDevGlobals, added $MA-X+PU,"ins_port",LM="Find(\"ins_port\",\"/*\");View;"$ to return install-drive recognition functionality.
|
||||
* Implemented $LK+PU,"BlkDevRep",A="MN:BlkDevRep"$, removed BlkDevRep demo file.
|
||||
|
||||
$IV,1$----11/30/21 13:40:29----$IV,0$
|
||||
* Raised version number to 1.05.
|
||||
* $LK,"R",A="MN:R"$("DocDump", "$LK+PU,"DocDumpLines",A="MN:DocDumpLines"$");
|
||||
|
|
|
@ -1065,7 +1065,7 @@ U0 AHCIInit()
|
|||
CAHCIPort *port;
|
||||
I64 i, bdf;
|
||||
|
||||
"トトトトトトトトトトトトトトトトトトトトトト\n";
|
||||
"______________________\n";
|
||||
|
||||
bdf = PCIClassFind(PCIC_STORAGE << 16 | PCISC_AHCI << 8 + 1, 0); //0x010601, last byte prog_if, AHCI version 1.0
|
||||
|
||||
|
@ -1125,7 +1125,7 @@ U0 AHCIInit()
|
|||
"Unknown\n";
|
||||
}
|
||||
}
|
||||
"トトトトトトトトトトトトトトトトトトトトトト\n\n";
|
||||
"______________________\n\n";
|
||||
}
|
||||
|
||||
Bool AHCIBootDVDProbeAll(CBlkDev *bd)
|
||||
|
@ -1135,7 +1135,7 @@ Bool AHCIBootDVDProbeAll(CBlkDev *bd)
|
|||
U8 *buf = CAlloc(DVD_BLK_SIZE);
|
||||
CKernel *kernel;
|
||||
|
||||
"トトトトトトトトトトトトトトトトトトトトトト\n";
|
||||
"______________________\n";
|
||||
|
||||
for (i = 0; i < AHCI_MAX_PORTS; i++)
|
||||
{
|
||||
|
@ -1165,7 +1165,7 @@ Bool AHCIBootDVDProbeAll(CBlkDev *bd)
|
|||
if (kernel->compile_time == sys_compile_time)
|
||||
{
|
||||
"AHCI: Found sys_compile_time at BLK %d on Port %d\n", sys_boot_blk, i;
|
||||
"トトトトトトトトトトトトトトトトトトトトトト\n";
|
||||
"______________________\n";
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,38 +1,3 @@
|
|||
/* // TODO: use this for reference in SATARep when fixing AHCI's lack of blkdev.ins_unit, etc
|
||||
U0 ATARepEntry(I64 base0, I64 base1, I64 unit, U8 *message, CATARep **_head, I64 *num_hints)
|
||||
{
|
||||
I64 type;
|
||||
base0 &= -8;
|
||||
base1 &= -4;
|
||||
CATARep *tmpha;
|
||||
|
||||
if (type = IDEATAProbe(base0,base1,unit))
|
||||
{
|
||||
*num_hints += 1;
|
||||
"\n$$PURPLE$$ $$BT+X,\"%d\",LM=\"%d\\n\"$$$$FG$$$$LM,4$$", *num_hints, *num_hints;
|
||||
if (type == BDT_ATA)
|
||||
"$$RED$$Hard Drive $$LTBLUE$$ATA ";
|
||||
else
|
||||
"$$RED$$CD/DVD Drive $$LTBLUE$$ATAPI ";
|
||||
"%s$$FG$$\n", message;
|
||||
if (base0 == blkdev.ins_base0 && unit == blkdev.ins_unit)
|
||||
"$$PURPLE$$(Drive originally installed from.)$$FG$$\n";
|
||||
"Base0:0x%04X Base1:0x%04X Unit:%d$$LM,0$$\n", base0, base1, unit;
|
||||
if (_head)
|
||||
{
|
||||
tmpha = CAlloc(sizeof(CATARep));
|
||||
tmpha->next = *_head;
|
||||
*_head = tmpha;
|
||||
tmpha->num = *num_hints;
|
||||
tmpha->type = type;
|
||||
tmpha->base0 = base0;
|
||||
tmpha->base1 = base1;
|
||||
tmpha->unit = unit;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
CBlkDev *ATAMount(U8 first_drive_let, I64 type, I64 port_num)
|
||||
{
|
||||
CBlkDev *res;
|
||||
|
|
|
@ -20,7 +20,7 @@ U0 BlkDevLockFwdingSet(CBlkDev *bd)
|
|||
bd1 = &blkdev.blkdevs[i];
|
||||
if (bd1->bd_signature == BD_SIGNATURE_VAL && bd != bd1 &&
|
||||
(bd1->type == BDT_ATAPI || bd1->type == BDT_ATA) &&
|
||||
bd1->base0 == bd->base0)
|
||||
bd1->port_num == bd->port_num)
|
||||
{
|
||||
bd->lock_fwding = bd1;
|
||||
break;
|
||||
|
|
|
@ -722,7 +722,7 @@ U0 Fault2(I64 fault_num, I64 fault_err_code)
|
|||
was_mouse_enabled = CallExtStr("MouseHardEnable", FALSE);
|
||||
was_raw = Raw(ON);
|
||||
was_silent = Silent(OFF);
|
||||
text.raw_flags |= RAWF_SHOW_DOLLAR|RAWF_SCROLL;
|
||||
text.raw_flags |= RAWF_SHOW_DOLLAR | RAWF_SCROLL;
|
||||
|
||||
"Task \"";
|
||||
"%s", Fs->task_title;
|
||||
|
|
|
@ -13,7 +13,7 @@ CTask *sys_winmgr_task,
|
|||
U8 *rev_bits_table; //Table with U8 bits reversed
|
||||
CDate local_time_offset;
|
||||
F64 *pow10_I64,
|
||||
sys_os_version = 1.05;
|
||||
sys_os_version = 1.06;
|
||||
|
||||
CAutoCompleteDictGlobals acd;
|
||||
CAutoCompleteGlobals ac;
|
||||
|
|
|
@ -167,7 +167,7 @@ U0 KMain()
|
|||
//to debug. After this point, use $LK,"RawPrint",A="MN:RawPrint"$()
|
||||
LBts(&sys_run_level, RLf_RAW);
|
||||
"\nZealOS V%0.2f\t%D %T\n", sys_os_version, sys_compile_time, sys_compile_time;
|
||||
"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ\n\n";
|
||||
"_________________________________\n\n";
|
||||
|
||||
"TimerInit;\n";
|
||||
TimerInit;
|
||||
|
@ -194,11 +194,9 @@ U0 KMain()
|
|||
#exe
|
||||
{
|
||||
StreamPrint("HomeSet(\"%s\");\n"
|
||||
"blkdev.ins_base0 = %d;"
|
||||
"blkdev.ins_base1 = %d;"
|
||||
"blkdev.ins_unit = %d;\n",
|
||||
"blkdev.ins_port = %d;",
|
||||
kernel_config->home_dir,
|
||||
blkdev.ins_base0, blkdev.ins_base1, blkdev.ins_unit);
|
||||
blkdev.ins_port);
|
||||
}
|
||||
|
||||
Gs->idle_task->cur_dv = blkdev.let_to_drive[*blkdev.home_dir - 'A'];
|
||||
|
@ -206,11 +204,8 @@ U0 KMain()
|
|||
if (blkdev.dvd_boot_is_good)
|
||||
{
|
||||
bd = Letter2BlkDev(':');
|
||||
if (bd->type == BDT_ATAPI) {
|
||||
blkdev.ins_base0 = bd->base0;
|
||||
blkdev.ins_base1 = bd->base1;
|
||||
blkdev.ins_unit = bd->unit;
|
||||
}
|
||||
if (bd->type == BDT_ATAPI)
|
||||
blkdev.ins_port = bd->port_num;
|
||||
}
|
||||
LBts(&sys_run_level, RLf_BLKDEV);
|
||||
|
||||
|
|
|
@ -3317,16 +3317,12 @@ public class CBlkDev
|
|||
CAHCIPort *ahci_port;
|
||||
U8 *prd_buf,
|
||||
first_drive_let,
|
||||
unit,
|
||||
pad[2],
|
||||
*RAM_disk,
|
||||
*file_disk_name;
|
||||
CFile *file_disk;
|
||||
U32 bd_signature,
|
||||
type,
|
||||
flags,
|
||||
base0,
|
||||
base1,
|
||||
blk_size,
|
||||
max_reads,
|
||||
max_writes;
|
||||
|
@ -3439,12 +3435,9 @@ public class CBlkDevGlobals
|
|||
write_count,
|
||||
mount_ide_auto_count,
|
||||
cmd_slot_count,
|
||||
ins_base0,
|
||||
ins_base1; //Install cd/dvd controller.
|
||||
ins_port;// Installed-from CD/DVD controller.
|
||||
Bool dvd_boot_is_good,
|
||||
ahci64,
|
||||
ins_unit,
|
||||
pad[2];
|
||||
ahci64;
|
||||
};
|
||||
|
||||
#help_index "File/Internal"
|
||||
|
|
|
@ -104,6 +104,10 @@ public I64 SATARep(I64 bd_type=BDT_NULL)
|
|||
Fs->catch_except = TRUE;
|
||||
"Error at SATA Port %d", i;
|
||||
}
|
||||
|
||||
if (i == blkdev.ins_port)
|
||||
"\t(Drive originally installed from.)\n";
|
||||
|
||||
"\n\t";
|
||||
|
||||
if (temp_blkdev->dev_id_record)
|
||||
|
|
|
@ -15,8 +15,8 @@ U0 LoadDocDefines()
|
|||
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/System/Boot/BootDVD.CC,DD_BOOT_HIGH_LOC_DVD"$
|
||||
|
||||
$TR,"LineRep"$
|
||||
$ID,2$DefinePrint("DD_ZEALOS_LOC","95,267");
|
||||
$ID,-2$
|
||||
$ID,2$DefinePrint("DD_ZEALOS_LOC","95,255");
|
||||
$ID,-2$
|
||||
DefinePrint("DD_MP_VECT", "%08X", MP_VECT_ADDR);
|
||||
DefinePrint("DD_MP_VECT_END", "%08X", MP_VECT_ADDR + COREAP_16BIT_INIT_END - COREAP_16BIT_INIT - 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue