From b1b065536cb2a9f3d67da787789190f557ceee5d Mon Sep 17 00:00:00 2001 From: The Tinkerer Date: Mon, 29 Jul 2024 05:28:37 +0000 Subject: [PATCH] TinkerOS 5.16 --- Adam/ABlkDev/AHCIMount.HC | 2 +- Adam/Device/Comm.HC | 71 +++++++------- Adam/Device/LPT.HC | 3 +- Adam/Gr/GrScrn.HC | 13 ++- Adam/Net/Http.HC | 2 +- Adam/Opt/Boot/BootHDIns.HC | 20 +++- Adam/Opt/Utils/SysRep.HC | 11 +-- Adam/Opt/Utils/SysSurvey.HC | 55 +++++++++-- Demo/Snd/OPL2.HC | 84 +++++++++------- Demo/VM/VBoxAdd.HC | 4 - Doc/Baremetal/Baremetal.DD | 27 ++++-- .../Desktop/Dell/OptiPlex_7010_SFF/Survey.DD | 88 +++++++++++++++++ .../Desktop/Dell/OptiPlex_7050/Survey.DD | 79 +++++++++++++++ .../Desktop/Dell/OptiPlex_7050_MFF/Survey.DD | 79 +++++++++++++++ .../Desktop/Dell/OptiPlex_7050_SFF/Survey.DD | 80 ++++++++++++++++ .../Desktop/Dell/OptiPlex_9010_SFF/Survey.DD | 87 +++++++++++++++++ .../HP/Compaq_Elite_8300_SFF/Survey.DD | 82 ++++++++++++++++ .../Desktop/Lenovo/ThinkCentre_M79/Survey.DD | 87 +++++++++++++++++ .../Laptop/Dell/Latitude_D630/Survey.DD | 95 +++++++++++++++++++ .../Laptop/HP/HP_ProBook_655_G1/Survey.DD | 84 ++++++++++++++++ .../Lenovo/Lenovo_IdeaPad_Yoga_11S/Survey.DD | 84 ++++++++++++++++ .../Laptop/Lenovo/ThinkPad_T420/Survey.DD | 91 ++++++++++++++++++ .../Laptop/Lenovo/ThinkPad_T430/Survey.DD | 84 ++++++++++++++++ .../Laptop/Lenovo/ThinkPad_T440p/Survey.DD | 84 ++++++++++++++++ Doc/Start.DD | 2 +- Doc/Web.DD | 2 +- Kernel/BlkDev/DskAHCI.HC | 1 + Kernel/BlkDev/DskATAId.HC | 9 +- Kernel/BlkDev/DskAddDev.HC | 7 +- Kernel/KGlbls.HC | 2 +- Kernel/KernelC.HH | 10 +- Kernel/Mem/MemPhysical.HC | 25 +++++ Kernel/PCIEACPI.HC | 13 +-- Misc/OSInstall.HC | 40 +++++++- Once.HC | 2 + 35 files changed, 1378 insertions(+), 131 deletions(-) create mode 100644 Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7010_SFF/Survey.DD create mode 100644 Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050/Survey.DD create mode 100644 Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_MFF/Survey.DD create mode 100644 Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_SFF/Survey.DD create mode 100644 Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_9010_SFF/Survey.DD create mode 100644 Doc/Baremetal/Machines/Desktop/HP/Compaq_Elite_8300_SFF/Survey.DD create mode 100644 Doc/Baremetal/Machines/Desktop/Lenovo/ThinkCentre_M79/Survey.DD create mode 100644 Doc/Baremetal/Machines/Laptop/Dell/Latitude_D630/Survey.DD create mode 100644 Doc/Baremetal/Machines/Laptop/HP/HP_ProBook_655_G1/Survey.DD create mode 100644 Doc/Baremetal/Machines/Laptop/Lenovo/Lenovo_IdeaPad_Yoga_11S/Survey.DD create mode 100644 Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T420/Survey.DD create mode 100644 Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T430/Survey.DD create mode 100644 Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T440p/Survey.DD diff --git a/Adam/ABlkDev/AHCIMount.HC b/Adam/ABlkDev/AHCIMount.HC index fd54bff..43d7c9d 100644 --- a/Adam/ABlkDev/AHCIMount.HC +++ b/Adam/ABlkDev/AHCIMount.HC @@ -32,7 +32,7 @@ public I64 SATARep(I64 bd_type=BDT_NULL, I64 *first_hdd=NULL) "\n"; for (i = 0; i < AHCI_MAX_PORTS; i++) { - if (Bt(&blkdev.ahci_hba->ports_implemented, i)) + if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) { port = &blkdev.ahci_hba->ports[i]; if (port->signature == AHCI_PxSIG_ATAPI && show_atapi || diff --git a/Adam/Device/Comm.HC b/Adam/Device/Comm.HC index bfde8c0..a3bf5da 100644 --- a/Adam/Device/Comm.HC +++ b/Adam/Device/Comm.HC @@ -32,7 +32,8 @@ class CComm device, flags, poll, - type; + type, + mmio; CFifoU8 *RX_fifo; }; @@ -53,10 +54,10 @@ public U0 CommHndlr(I64 port) free_size-=f->in_ptr-f->out_ptr; while (free_size>0) { - stat=InU8(c->base+UART_IIR); + stat=MixedInU8(c->mmio,c->base+UART_IIR); if (stat & 4) //RX { - FifoU8Ins(c->RX_fifo,InU8(c->base+UART_RDR)); + FifoU8Ins(c->RX_fifo,MixedInU8(c->mmio,c->base+UART_RDR)); free_size--; } else @@ -80,10 +81,10 @@ public U0 PollCommHndlr(I64 port) free_size-=f->in_ptr-f->out_ptr; while (free_size>0) { - stat=InU8(c->base+UART_LSR); + stat=MixedInU8(c->mmio,c->base+UART_LSR); if (stat & 1) //RX { - FifoU8Ins(c->RX_fifo,InU8(c->base+UART_RDR)); + FifoU8Ins(c->RX_fifo,MixedInU8(c->mmio,c->base+UART_RDR)); free_size--; } else @@ -157,23 +158,23 @@ public CComm *CommInit7n1(I64 port,I64 baud) CLI if (!c->RX_fifo) c->RX_fifo=FifoU8New(COMM_RX_FIFO_SIZE); - OutU8(c->base+UART_LCR,0); //Set for IER - OutU8(c->base+UART_IER,0); //Disable all IRQ - OutU8(c->base+UART_LCR,0x80); //Enable baud rate control - OutU8(c->base+UART_BRDL,0x180/(baud/300) & 0xFF); //LSB - OutU8(c->base+UART_BRDH,0x180/(baud/300) / 256); //MSB - OutU8(c->base+UART_LCR,2); //7-none-1 - InU8(c->base+UART_RDR); //read garbage - InU8(c->base+UART_LSR); - OutU8(c->base+UART_MCR,4); - OutU8(c->base+UART_IER,0); //Disable all IRQ - OutU8(c->base+UART_MCR,0xA); //out2 and rts + MixedOutU8(c->mmio,c->base+UART_LCR,0); //Set for IER + MixedOutU8(c->mmio,c->base+UART_IER,0); //Disable all IRQ + MixedOutU8(c->mmio,c->base+UART_LCR,0x80); //Enable baud rate control + MixedOutU8(c->mmio,c->base+UART_BRDL,0x180/(baud/300) & 0xFF); //LSB + MixedOutU8(c->mmio,c->base+UART_BRDH,0x180/(baud/300) / 256); //MSB + MixedOutU8(c->mmio,c->base+UART_LCR,2); //7-none-1 + MixedInU8(c->mmio,c->base+UART_RDR); //read garbage + MixedInU8(c->mmio,c->base+UART_LSR); + MixedOutU8(c->mmio,c->base+UART_MCR,4); + MixedOutU8(c->mmio,c->base+UART_IER,0); //Disable all IRQ + MixedOutU8(c->mmio,c->base+UART_MCR,0xA); //out2 and rts if (!c->poll) { OutU8(0x21,InU8(0x21) & (0xFF-0x18)); //Enable 8259 IRQ 3 & 4 - OutU8(c->base+UART_IER,1); //RX but no THR empty + MixedOutU8(c->mmio,c->base+UART_IER,1); //RX but no THR empty } else - OutU8(c->base+UART_IIR,0xC7); + MixedOutU8(c->mmio,c->base+UART_IIR,0xC7); LBts(&c->flags,COMf_ENABLED); POPFD return c; @@ -186,23 +187,23 @@ public CComm *CommInit8n1(I64 port,I64 baud) CLI if (!c->RX_fifo) c->RX_fifo=FifoU8New(COMM_RX_FIFO_SIZE); - OutU8(c->base+UART_LCR,0); //Set for IER - OutU8(c->base+UART_IER,0); //Disable all IRQ - OutU8(c->base+UART_LCR,0x80); //Enable baud rate control - OutU8(c->base+UART_BRDL,0x180/(baud/300) & 0xFF); //LSB - OutU8(c->base+UART_BRDH,0x180/(baud/300) / 256); //MSB - OutU8(c->base+UART_LCR,3); //8-none-1 - InU8(c->base+UART_RDR); //read garbage - InU8(c->base+UART_LSR); - OutU8(c->base+UART_MCR,4); - OutU8(c->base+UART_IER,0); //Disable all IRQ - OutU8(c->base+UART_MCR,0xA); //out2 and rts + MixedOutU8(c->mmio,c->base+UART_LCR,0); //Set for IER + MixedOutU8(c->mmio,c->base+UART_IER,0); //Disable all IRQ + MixedOutU8(c->mmio,c->base+UART_LCR,0x80); //Enable baud rate control + MixedOutU8(c->mmio,c->base+UART_BRDL,0x180/(baud/300) & 0xFF); //LSB + MixedOutU8(c->mmio,c->base+UART_BRDH,0x180/(baud/300) / 256); //MSB + MixedOutU8(c->mmio,c->base+UART_LCR,3); //8-none-1 + MixedInU8(c->mmio,c->base+UART_RDR); //read garbage + MixedInU8(c->mmio,c->base+UART_LSR); + MixedOutU8(c->mmio,c->base+UART_MCR,4); + MixedOutU8(c->mmio,c->base+UART_IER,0); //Disable all IRQ + MixedOutU8(c->mmio,c->base+UART_MCR,0xA); //out2 and rts if (!c->poll) { OutU8(0x21,InU8(0x21) & (0xFF-0x18)); //Enable 8259 IRQ 3 & 4 - OutU8(c->base+UART_IER,1); //RX but no THR empty + MixedOutU8(c->mmio,c->base+UART_IER,1); //RX but no THR empty } else - OutU8(c->base+UART_IIR,0xC7); + MixedOutU8(c->mmio,c->base+UART_IIR,0xC7); LBts(&c->flags,COMf_ENABLED); POPFD return c; @@ -218,15 +219,15 @@ public U0 PollComm(U8 *data) public U0 CommPutChar(I64 port,U8 b, I64 timeout_ms=500) {// Write 1 byte to com port - I64 base=comm_ports[port].base; + CComm *c=&comm_ports[port]; F64 timeout_time=tS+ToF64(timeout_ms)/1000.0; - while (!(InU8(base+UART_LSR) & 0x20)) + while (!(MixedInU8(c->mmio,c->base+UART_LSR) & 0x20)) { if (tS>timeout_time) throw('ComErr'); Yield; } - OutU8(base+UART_THR,b); - while (!(InU8(base+UART_LSR) & 0x20)) + MixedOutU8(c->mmio,c->base+UART_THR,b); + while (!(MixedInU8(c->mmio,c->base+UART_LSR) & 0x20)) { if (tS>timeout_time) throw('ComErr'); Yield; diff --git a/Adam/Device/LPT.HC b/Adam/Device/LPT.HC index 00715c2..410c011 100644 --- a/Adam/Device/LPT.HC +++ b/Adam/Device/LPT.HC @@ -102,9 +102,10 @@ LptInit; U0 LptRep() { I64 i; + "LPT 1-3 are standard IO ports, the actual ports themselves may or may not exist.\n"; + for (i=1; i<=MAX_LPT_NUM; i++) { - "LPT 1-3 are standard IO ports, the actual ports themselves may or may not exist.\n"; if (lpt_ports[i].base) { "LPT %d - base 0x%08x\n",i,lpt_ports[i].base; diff --git a/Adam/Gr/GrScrn.HC b/Adam/Gr/GrScrn.HC index 76f8318..a551136 100644 --- a/Adam/Gr/GrScrn.HC +++ b/Adam/Gr/GrScrn.HC @@ -5,8 +5,13 @@ // because QEMU will have graphics glitches without it. // // You might get a decent speedup setting this to FALSE for -// VirtualBox, VMware, and some hardware! -Bool use_slower_safe_gfx=TRUE; +// VirtualBox, VMware, and some hardware! Set this to +// TRUE if you experience graphics glitches such as +// artifacts when moving the mouse. +// +// The default is FALSE = fast for real hardware. + +Bool use_slower_safe_gfx=IsHypervisorPresent; #define I_UPDATE_CACHE 0xfd #define I_BLOT 0xfe @@ -505,7 +510,7 @@ U0 GrDoLetterBox() src=text.raw_scrn_image; for (i=0; ihash_table,HTT_DEFINE_STR)) { - if (width>0 && height>0 && !CheckVidMode(width, height, scale)) { "This resolution is not supported!\n"; return; } - if (FB_WIDTH!=GR_WIDTH || FB_HEIGHT!=GR_HEIGHT || DO_SCALING - || LETTER_BOX || WIDTH_SCALE>1 || HEIGHT_SCALE>1) + if (scale!=1 &&(FB_WIDTH!=GR_WIDTH || FB_HEIGHT!=GR_HEIGHT || DO_SCALING + || LETTER_BOX || WIDTH_SCALE>1 || HEIGHT_SCALE>1)) res_ok=FALSE; if (AHCIMode) @@ -155,11 +154,22 @@ public U0 MakeAllDef(Bool install=FALSE, I64 width=-1, I64 height=-1, I64 do_mbr return; } } - "Cannot make default config, from this kernel, use MakeAll and set options manually!\n"; + "Can not make default config, from this kernel, use MakeAll and set options manually!\n"; } public U0 MakeAllIns(I64 width=-1, I64 height=-1) {//Try to automatically recompile both compiler and kernel and install MakeAllDef(TRUE,width,height); } -#help_index "" \ No newline at end of file + +public U0 Do640x480() +{//Try to recompile kernel with standard 640x480 resolution + MakeAllDef(TRUE,640,480,1); +} + +public U0 Do800x600() +{//Try to recompile kernel with standard 800x600 resolution + MakeAllDef(TRUE,800,600,1); +} + +#help_index "" diff --git a/Adam/Opt/Utils/SysRep.HC b/Adam/Opt/Utils/SysRep.HC index ce54d21..f2ee65f 100644 --- a/Adam/Opt/Utils/SysRep.HC +++ b/Adam/Opt/Utils/SysRep.HC @@ -1050,7 +1050,7 @@ start: , SMBIOSStr(header, sys_info->product_name); "Version:$$BLACK$$%s$$FG$$\n" , SMBIOSStr(header, sys_info->version); - if (!verbose) + if (verbose<2) { "$$ID,-3$$"; break; @@ -1071,7 +1071,6 @@ start: "$$ID,-3$$"; break; case SMBIOSt_ENCLOSURE: - if (!verbose) break; if (verbose<2) break; CSMBIOSEnclosureInfo *info = header; "$$TR-C,\"Enclosure\"$$\n"; @@ -1354,7 +1353,7 @@ start: } else "Unknown$$FG$$\n"; - if (!verbose) + if (verbose==2) { "Serial Number:$$BLACK$$%s$$FG$$\n" , SMBIOSStr(header, mem_info->serial_number); @@ -1387,7 +1386,7 @@ start: , SMBIOSStr(header, b_info->product); "Version:$$BLACK$$%s$$FG$$\n" , SMBIOSStr(header, b_info->version); - if (!verbose) + if (verbose==2) { "Type:$$BLACK$$%Z$$FG$$\n" , b_info->board_type, "ST_SMBIOS_BASEBOARD_TYPES"; @@ -1471,7 +1470,7 @@ start: "%d$$FG$$\n", bat_info->max_battery_data_error; else "Unknown$$FG$$\n"; - if (!verbose) + if (verbose==2) { "Serial Number:$$BLACK$$"; if (bat_info->serial_number) @@ -1579,5 +1578,5 @@ public U0 BIOSRep() public U0 SysRepSurvey() {//Display system info excluding sensative info - SysRep(,,,, TRUE); + SysRep(,,,,1); } diff --git a/Adam/Opt/Utils/SysSurvey.HC b/Adam/Opt/Utils/SysSurvey.HC index 6daca4c..d38d1de 100644 --- a/Adam/Opt/Utils/SysSurvey.HC +++ b/Adam/Opt/Utils/SysSurvey.HC @@ -1,4 +1,27 @@ #help_index "OtherTinkerOSFuncs" + +public U0 GetBootDrvPortInfo() +{ + CDrv *dv; + CBlkDev *bd; + I64 boot_let=blkdev.boot_drv_let; + if ('C'<=boot_let<'F') + { + dv=Let2Drv(boot_let); + if (dv && dv->bd) + { + bd=dv->bd; + if(bd->base0) + { + "Boot drive %C IO port info:\n\n",boot_let; + "Base 0: 0x%04x\n",bd->base0; + "Base 1: 0x%04x\n",bd->base1; + "Unit : %d\n\n",bd->unit; + } + } + } +} + public I64 YNorU(I64 enter_default=0) {//Wait for user to answer Y or N. I64 ch; @@ -48,19 +71,20 @@ static U8 *ins_questions[NUM_INS_SURVEY_QUESTIONS]= "Did you manually have to enter IO port numbers\0u", }; -#define NUM_STD_SURVEY_QUESTIONS 9 +#define NUM_STD_SURVEY_QUESTIONS 10 static U8 *std_questions[NUM_STD_SURVEY_QUESTIONS]= { "Is AHCI mode supported in BIOS\0u", "Is Legacy/IDE mode supported in BIOS\0u", - "Does PS/2 emulation of a USB keyboard work\0u", - "Does PS/2 emulation of a USB mouse work\0u", + "Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS\0u", "Does your system have a PS/2 mouse or combo port\0u", "Does your system have a serial port\0u", "Does your system have a parallel port\0u", - "Can you install and run TempleOS bare metal\0u", "Can you install and run TinkerOS bare metal\0u", + "Can you install and run TempleOS bare metal\0u", + "Does PS/2 emulation of USB both keyboard and mouse work in TempleOS\0u", + "Is this a custom built PC / motherboard you installed\0u", }; @@ -74,7 +98,7 @@ public U0 RunSysSurvey() { U8 *notes=NULL, *survey_file; Bool is_laptop,extra_notes,installed,sysrep; - I64 have_dock,i,resp[NUM_STD_SURVEY_QUESTIONS], resp_ins[NUM_INS_SURVEY_QUESTIONS]; + I64 have_kbd_ms,have_expresscard,have_dock,i,resp[NUM_STD_SURVEY_QUESTIONS], resp_ins[NUM_INS_SURVEY_QUESTIONS]; DocClear; WinMax; @@ -92,6 +116,7 @@ public U0 RunSysSurvey() for (i=0; iput_doc); "\nWrote %s, please transfer to an internet connected PC\n",survey_file; - "and make a github pull request to add your system! This\n"; - "will help others know what systems are TOS compatible!\n\n"; + "and rename it appropriately and make a github pull\n"; + "request to add your system! This will help others\n"; + "know what systems are TOS compatible!\n\n"; if (SNAIL_COM>0) { diff --git a/Demo/Snd/OPL2.HC b/Demo/Snd/OPL2.HC index cb47ab6..eb39be9 100644 --- a/Demo/Snd/OPL2.HC +++ b/Demo/Snd/OPL2.HC @@ -3,7 +3,7 @@ Cd(__DIR__); // Pick one, then configure below -// QEMU / Real ISA Adlib card +// QEMU / Real ISA Adlib or compatible card #define ISA_OPL // OPT2LPT or OPL3LPT connected via a parallel port //#define OPL2LPT @@ -22,7 +22,9 @@ Cd(__DIR__); #define ISA_IOPORT_OPL_BASE 0x388 #endif +// Run LptRep and try ports below #define LPT_IOPORT_OPL_BASE 0x378 + #define SERIAL_OPL_PORT 2 /* @@ -56,41 +58,21 @@ public U0 WriteOPL(I64 r, U8 data, I64 port=ISA_IOPORT_OPL_BASE) OutU8(port+1,data); for (i=0; i<23; i++) PortNop; } - -public Bool DetectOPL(I64 port=ISA_IOPORT_OPL_BASE) -{//Detects OPL chip - I64 x1=0,x2=0; - WriteOPL(4,0x60,port); - WriteOPL(4,0x80,port); - x1=InU8(port)&0xe0; - WriteOPL(2,0xff,port); - WriteOPL(4,0x21,port); - x2=InU8(port)&0xe0; - WriteOPL(4,0x60,port); - WriteOPL(4,0x80,port); - if (x1==0 && x2==0xc0) { - if (InU8(port)&0x06) - "Found OPL2, enabling premium sound!\n"; - else "Found OPL3, enabling premium sound!\n"; - return TRUE; - } - return FALSE; -} #endif #ifdef OPL2LPT -public U0 WriteOPL(I64 r, U8 data) +public U0 WriteOPL(I64 r, U8 data, I64 port=LPT_IOPORT_OPL_BASE) {//Writes data to OPL registers I64 i; - OutU8(LPT_IOPORT_OPL_BASE,r); - OutU8(LPT_IOPORT_OPL_BASE+2,0x0d); - OutU8(LPT_IOPORT_OPL_BASE+2,0x09); - OutU8(LPT_IOPORT_OPL_BASE+2,0x0d); + OutU8(port,r); + OutU8(port+2,0x0d); + OutU8(port+2,0x09); + OutU8(port+2,0x0d); for (i=0; i<4; i++) PortNop; - OutU8(LPT_IOPORT_OPL_BASE,data); - OutU8(LPT_IOPORT_OPL_BASE+2,0x0c); - OutU8(LPT_IOPORT_OPL_BASE+2,0x08); - OutU8(LPT_IOPORT_OPL_BASE+2,0x0c); + OutU8(port,data); + OutU8(port+2,0x0c); + OutU8(port+2,0x08); + OutU8(port+2,0x0c); for (i=0; i<23; i++) PortNop; } #endif @@ -141,6 +123,26 @@ U0 OPLReplay() } #endif +public Bool DetectOPL(I64 port=ISA_IOPORT_OPL_BASE) +{ + I64 x1=0,x2=0; + WriteOPL(4,0x60,port); + WriteOPL(4,0x80,port); + x1=InU8(port)&0xe0; + WriteOPL(2,0xff,port); + WriteOPL(4,0x21,port); + x2=InU8(port)&0xe0; + WriteOPL(4,0x60,port); + WriteOPL(4,0x80,port); + if (x1==0 && x2==0xc0) { + if (InU8(port)&0x06) + "Found OPL2, enabling premium sound!\n"; + else "Found OPL3, enabling premium sound!\n"; + return TRUE; + } + return FALSE; +} + public U0 OPLReset() {// Reset OPL chip I64 i; @@ -289,7 +291,7 @@ static U8 opl_inst_mod2[11]= {1, 1, 1, 1, 1, 1,1, 1, 1, 32, 1}; // * 1* 1* 1* 1* 1*1* 1* 1* 1* 32*1 public U0 U64Inst(U64 inst) -{//Setup an instrument registers from a 64-bit number +{//Setup instrument registers from a 64-bit number I64 i; U8 opl2inst[12]; opl2inst[0]=0; @@ -389,8 +391,7 @@ U0 EnableISAOPL() Mute(1); LBts(&sys_semas[SEMA_SND],0); Yield; - *(&Snd(U8*))=0xe9; - *((&Snd+1)(U32*))=&OPLSnd-&Snd-5; + HijackFunc(&Snd,&OPLSnd); LBtr(&sys_semas[SEMA_SND],0); Mute(0); } @@ -398,4 +399,19 @@ U0 EnableISAOPL() EnableISAOPL; #endif -#help_index "" \ No newline at end of file + + +#ifdef OPL2LPT +AdamLog("Assuming OPL2/3LPT is connected and parallel port base is 0x%08x\n",LPT_IOPORT_OPL_BASE); +OPLInit; +// Patch hook into sound system +Snd(0); +Mute(1); +LBts(&sys_semas[SEMA_SND],0); +Yield; +HijackFunc(&Snd,&OPLSnd); +LBtr(&sys_semas[SEMA_SND],0); +Mute(0); +#endif + +#help_index "" diff --git a/Demo/VM/VBoxAdd.HC b/Demo/VM/VBoxAdd.HC index 123fc52..5dfef16 100644 --- a/Demo/VM/VBoxAdd.HC +++ b/Demo/VM/VBoxAdd.HC @@ -549,10 +549,6 @@ U0 VBInitAll() */ VBLog("Initialized TinkerOS guest additions!\n"); } - else - { - "Failed to find VirtualBox!\n"; - } } U0 DumpCBMsg() diff --git a/Doc/Baremetal/Baremetal.DD b/Doc/Baremetal/Baremetal.DD index 10b112a..c074187 100644 --- a/Doc/Baremetal/Baremetal.DD +++ b/Doc/Baremetal/Baremetal.DD @@ -1,13 +1,24 @@ $WW,1$$FG,5$$TX+CX,"Baremetal Installs"$$FG$ -TODO Baremetal install tips. +Machines marked with a * are also potentially good for TempleOS installs -Successful baremetal installs: +$WW,1$It is recommended to pick only machines with real PS/2 ports. Working PS/2 emulation from USB can depend on particular BIOS versions and is never guarenteed to work.$WW,0$ -$TR,"Dell Latitude D630 Laptop"$ -$ID,2$$LK,"System Survey Results",A="FI:/Doc/Baremetal/Machines/DellD630.DD.Z"$ -$TX,"Baremetal Install of TempleOS/TinkerOS Quad-Boot Video",HTML="https://www.youtube.com/watch?v=NHDG4gu1daE"$ +$TR,"Desktops"$ +$ID,2$ +$LK,"Dell OptiPlex 7010 SFF",A="FI:/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7010_SFF/Survey.DD.Z"$ +$LK,"Dell OptiPlex 7050 MFF",A="FI:/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_MFF/Survey.DD.Z"$ +$LK,"Dell OptiPlex 7050 SFF",A="FI:/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_SFF/Survey.DD.Z"$ +$LK,"Dell OptiPlex 9010 SFF",A="FI:/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_9010_SFF/Survey.DD.Z"$ +$LK,"HP Compaq Elite 8300 SFF * w/USB",A="FI:/Doc/Baremetal/Machines/Desktop/HP/Compaq_Elite_8300_SFF/Survey.DD.Z"$ +$LK,"Lenovo ThinkCentre M79 * w/PS/2",A="FI:/Doc/Baremetal/Machines/Desktop/Lenovo/ThinkCentre_M79/Survey.DD.Z"$ +$ID,-2$ +$TR,"Laptops"$ +$ID,2$ +$LK,"Dell Latitude D630 * w/USB",A="FI:/Doc/Baremetal/Machines/Laptop/Dell/Latitude_D630/Survey.DD.Z"$ +$LK,"HP HP ProBook 655 G1",A="FI:/Doc/Baremetal/Machines/Laptop/HP/HP_ProBook_655_G1/Survey.DD.Z"$ +$LK,"Lenovo Lenovo IdeaPad Yoga 11S",A="FI:/Doc/Baremetal/Machines/Laptop/Lenovo/Lenovo_IdeaPad_Yoga_11S/Survey.DD.Z"$ +$LK,"Lenovo ThinkPad T420 * w/USB",A="FI:/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T420/Survey.DD.Z"$ +$LK,"Lenovo ThinkPad T430",A="FI:/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T430/Survey.DD.Z"$ +$LK,"Lenovo ThinkPad T440p",A="FI:/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T440p/Survey.DD.Z"$ $ID,-2$ - - -$FG$ diff --git a/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7010_SFF/Survey.DD b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7010_SFF/Survey.DD new file mode 100644 index 0000000..b9e49c3 --- /dev/null +++ b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7010_SFF/Survey.DD @@ -0,0 +1,88 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 02/22/18 14:36:57 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: IDE/Legacy + +Current boot drive: D + +Laptop: No + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: No + +Does your system have a PS/2 mouse or combo port: Yes + +Does your system have a serial port: Yes + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Is this a custom built PC / motherboard you installed: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Boot drive D IO port info: + +Base 0: 0xf130 +Base 1: 0xf120 +Unit : 0 + +Results from SysRepSurvey: + +SMBIOS version 2.7 (83 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Dell Inc.$FG$ +Product Name:$FG,0$OptiPlex 7010 SFF$FG$ +Version:$FG,0$01$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$CPU 1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-3550 CPU @ 3.30GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$10$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$3.3 GHz$FG$ +Max Speed:$FG,0$3.7 GHz$FG$ +Socket:$FG,0$LGA1155$FG$ +Voltage:$FG,0$2.9V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$32768 MB$FG$ +Mem Device Count:$FG,0$4$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 848x480 + 1280x1024 + 1024x768 + 640x480 + 800x600 + 1920x1080 + + + diff --git a/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050/Survey.DD b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050/Survey.DD new file mode 100644 index 0000000..bded366 --- /dev/null +++ b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050/Survey.DD @@ -0,0 +1,79 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/27/24 17:17:21 + +Current graphics mode: 960 x 540 (1920 by 1080 framebuffer) + +Current disk mode: AHCI + +Current boot drive: D + +Laptop: No + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: No + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: No + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Results from SysRepSurvey: + +SMBIOS version 3.0 (67 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Dell Inc.$FG$ +Product Name:$FG,0$OptiPlex 7050$FG$ +Version:$FG,0$None$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$32768 MB$FG$ +Mem Device Count:$FG,0$2$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$U3E1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$14$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$2.8 GHz$FG$ +Max Speed:$FG,0$4.2 GHz$FG$ +Socket:$FG,0$Other$FG$ +Voltage:$FG,0$0.9V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1280x1024 + 1024x768 + 640x480 + 800x600 + 1920x1080 + + + \ No newline at end of file diff --git a/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_MFF/Survey.DD b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_MFF/Survey.DD new file mode 100644 index 0000000..b39bc89 --- /dev/null +++ b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_MFF/Survey.DD @@ -0,0 +1,79 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/27/24 17:17:21 + +Current graphics mode: 960 x 540 (1920 by 1080 framebuffer) + +Current disk mode: AHCI + +Current boot drive: D + +Laptop: No + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: No + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: No + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Results from SysRepSurvey: + +SMBIOS version 3.0 (67 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Dell Inc.$FG$ +Product Name:$FG,0$OptiPlex 7050 MFF$FG$ +Version:$FG,0$None$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$32768 MB$FG$ +Mem Device Count:$FG,0$2$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$U3E1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$14$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$2.8 GHz$FG$ +Max Speed:$FG,0$4.2 GHz$FG$ +Socket:$FG,0$Other$FG$ +Voltage:$FG,0$0.9V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1280x1024 + 1024x768 + 640x480 + 800x600 + 1920x1080 + + + diff --git a/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_SFF/Survey.DD b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_SFF/Survey.DD new file mode 100644 index 0000000..d404b84 --- /dev/null +++ b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_7050_SFF/Survey.DD @@ -0,0 +1,80 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/28/24 13:55:22 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: AHCI + +Current boot drive: C + +Laptop: No + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: No + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: Yes + +Does your system have a serial port: Yes + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Is this a custom built PC / motherboard you installed: No + +Did this automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Results from SysRepSurvey: + +SMBIOS version 3.0 (86 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Dell Inc.$FG$ +Product Name:$FG,0$OptiPlex 7050 SFF$FG$ +Version:$FG,0$None$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$65536 MB$FG$ +Mem Device Count:$FG,0$4$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$U3E1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$14$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$3.4 GHz$FG$ +Max Speed:$FG,0$4.2 GHz$FG$ +Socket:$FG,0$Other$FG$ +Voltage:$FG,0$1.0V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1280x1024 + 1024x768 + 640x480 + 800x600 + 1920x1080 + + diff --git a/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_9010_SFF/Survey.DD b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_9010_SFF/Survey.DD new file mode 100644 index 0000000..067f869 --- /dev/null +++ b/Doc/Baremetal/Machines/Desktop/Dell/OptiPlex_9010_SFF/Survey.DD @@ -0,0 +1,87 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/31/12 18:49:21 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: IDE/Legacy + +Current boot drive: D + +Laptop: No + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: No + +Does your system have a PS/2 mouse or combo port: Yes + +Does your system have a serial port: Yes + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Is the a custom built PC / motherboard you installed: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Boot drive D IO port info: + +Base 0: 0xf130 +Base 1: 0xf120 +Unit : 0 + +Results from SysRepSurvey: + +SMBIOS version 2.7 (82 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Dell Inc.$FG$ +Product Name:$FG,0$OptiPlex 9010 SFF$FG$ +Version:$FG,0$01$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$CPU 1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-3550 CPU @ 3.30GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$10$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$3.3 GHz$FG$ +Max Speed:$FG,0$3.3 GHz$FG$ +Socket:$FG,0$LGA1155$FG$ +Voltage:$FG,0$5V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$32768 MB$FG$ +Mem Device Count:$FG,0$4$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1280x1024 + 1024x768 + 640x480 + 800x600 + 1920x1080 + + + diff --git a/Doc/Baremetal/Machines/Desktop/HP/Compaq_Elite_8300_SFF/Survey.DD b/Doc/Baremetal/Machines/Desktop/HP/Compaq_Elite_8300_SFF/Survey.DD new file mode 100644 index 0000000..45a0497 --- /dev/null +++ b/Doc/Baremetal/Machines/Desktop/HP/Compaq_Elite_8300_SFF/Survey.DD @@ -0,0 +1,82 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/28/24 15:56:39 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: IDE/Legacy + +Current boot drive: D + +Laptop: No + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: Yes + +Does your system have a serial port: Yes + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: Yes + +Is this a custom built PC / motherboard you installed: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Boot drive D IO port info: + +Base 0: 0xf0d0 +Base 1: 0xf0c0 +Unit : 0 + +Results from SysRepSurvey: + +SMBIOS version 2.7 (69 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Hewlett-Packard$FG$ +Product Name:$FG,0$Compaq Elite 8300 SFF$FG$ +Version:$FG,0$None$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$32768 MB$FG$ +Mem Device Count:$FG,0$4$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$Intel$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$10$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$3.4 GHz$FG$ +Max Speed:$FG,0$3.8 GHz$FG$ +Socket:$FG,0$LGA1155$FG$ +Voltage:$FG,0$1.0V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + + + diff --git a/Doc/Baremetal/Machines/Desktop/Lenovo/ThinkCentre_M79/Survey.DD b/Doc/Baremetal/Machines/Desktop/Lenovo/ThinkCentre_M79/Survey.DD new file mode 100644 index 0000000..cbcef37 --- /dev/null +++ b/Doc/Baremetal/Machines/Desktop/Lenovo/ThinkCentre_M79/Survey.DD @@ -0,0 +1,87 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/28/24 09:40:50 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: IDE/Legacy + +Current boot drive: E + +Laptop: No + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: No + +Does your system have a PS/2 mouse or combo port: Yes + +Does your system have a serial port: Yes + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Boot drive E IO port info: + +Base 0: 0x01f0 +Base 1: 0x03f4 +Unit : 0 + +Results from SysRepSurvey: + +SMBIOS version 2.8 (69 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$LENOVO$FG$ +Product Name:$FG,0$10CTS01S00$FG$ +Version:$FG,0$ThinkCentre M79$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$16384 MB$FG$ +Mem Device Count:$FG,0$4$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$P0$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$AuthenticAMD$FG$ +Name:$FG,0$AMD PRO A8-8650B R7, 10 Compute Cores 4C+6G $FG$ +Family:$FG,0$21$FG$ +Model:$FG,0$8$FG$ +Stepping:$FG,0$1$FG$ +Current Speed:$FG,0$3.2 GHz$FG$ +Max Speed:$FG,0$3.2 GHz$FG$ +Socket:$FG,0$LGA2011-3$FG$ +Voltage:$FG,0$1.2V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1280x960 + 640x480 + 800x600 + 1024x768 + 1280x1024 + 1400x1050 + 1920x1080 + + + \ No newline at end of file diff --git a/Doc/Baremetal/Machines/Laptop/Dell/Latitude_D630/Survey.DD b/Doc/Baremetal/Machines/Laptop/Dell/Latitude_D630/Survey.DD new file mode 100644 index 0000000..69b03e4 --- /dev/null +++ b/Doc/Baremetal/Machines/Laptop/Dell/Latitude_D630/Survey.DD @@ -0,0 +1,95 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 01/04/10 01:08:24 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: IDE/Legacy + +Current boot drive: D + +Laptop: Yes + +Dock with useful ports available: Yes + +Expresscard slot available: No + +Do laptop keyboard and trackpad both work: Yes + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: Yes + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: Yes + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: Yes + +Boot drive D IO port info: + +Base 0: 0x6eb0 +Base 1: 0x6eb8 +Unit : 0 + +Results from SysRepSurvey: + +SMBIOS version 2.4 (62 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Dell Inc.$FG$ +Product Name:$FG,0$Latitude D630 $FG$ +Version:$FG,0$None$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$Microprocessor$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$2$FG$ +Cores Enabled:$FG,0$2$FG$ +Manufacturer:$FG,0$Intel$FG$ +Name:$FG,0$None$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$240$FG$ +Stepping:$FG,0$13$FG$ +Current Speed:$FG,0$2.0 GHz$FG$ +Max Speed:$FG,0$2.0 GHz$FG$ +Socket:$FG,0$None$FG$ +Voltage:$FG,0$3.3V$FG$ +External Clock:$FG,0$200 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$4096 MB$FG$ +Mem Device Count:$FG,0$2$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 320x200 + 640x480 + 800x600 + 1024x768 + 320x400 + 320x240 + 640x400 + 1280x800 + 1280x720 + + + \ No newline at end of file diff --git a/Doc/Baremetal/Machines/Laptop/HP/HP_ProBook_655_G1/Survey.DD b/Doc/Baremetal/Machines/Laptop/HP/HP_ProBook_655_G1/Survey.DD new file mode 100644 index 0000000..c0be097 --- /dev/null +++ b/Doc/Baremetal/Machines/Laptop/HP/HP_ProBook_655_G1/Survey.DD @@ -0,0 +1,84 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/27/24 15:30:19 + +Current graphics mode: 1024 x 768 (1366 by 768 framebuffer) + +Current disk mode: AHCI + +Current boot drive: F + +Laptop: Yes + +Dock with useful ports available: Yes + +Expresscard slot available: No + +Do laptop keyboard and trackpad both work: Yes + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Unknown + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: Yes + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Results from SysRepSurvey: + +SMBIOS version 2.7 (28 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$Hewlett-Packard$FG$ +Product Name:$FG,0$HP ProBook 655 G1$FG$ +Version:$FG,0$A3009DD10203$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$Socket FS1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$4$FG$ +Cores Enabled:$FG,0$4$FG$ +Manufacturer:$FG,0$AMD Corporation$FG$ +Name:$FG,0$AMD A10-4600M APU with Radeon(tm) HD Graphics $FG$ +Family:$FG,0$21$FG$ +Model:$FG,0$0$FG$ +Stepping:$FG,0$1$FG$ +Current Speed:$FG,0$2.3 GHz$FG$ +Max Speed:$FG,0$2.3 GHz$FG$ +Socket:$FG,0$FS1$FG$ +Voltage:$FG,0$1.1V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$16384 MB$FG$ +Mem Device Count:$FG,0$2$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 640x480 + 800x600 + 1024x768 + 1366x768 + + + \ No newline at end of file diff --git a/Doc/Baremetal/Machines/Laptop/Lenovo/Lenovo_IdeaPad_Yoga_11S/Survey.DD b/Doc/Baremetal/Machines/Laptop/Lenovo/Lenovo_IdeaPad_Yoga_11S/Survey.DD new file mode 100644 index 0000000..7e03be5 --- /dev/null +++ b/Doc/Baremetal/Machines/Laptop/Lenovo/Lenovo_IdeaPad_Yoga_11S/Survey.DD @@ -0,0 +1,84 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 01/01/11 01:40:40 + +Current graphics mode: 1024 x 768 (1366 by 768 framebuffer) + +Current disk mode: AHCI + +Current boot drive: F + +Laptop: Yes + +Dock with useful ports available: No + +Expresscard slot available: No + +Do laptop keyboard and trackpad both work: Yes + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Unknown + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: No + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Results from SysRepSurvey: + +SMBIOS version 2.7 (33 entries) +$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$LENOVO$FG$ +Product Name:$FG,0$20246$FG$ +Version:$FG,0$Lenovo IdeaPad Yoga 11S$FG$ +$ID,-3$$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$U3E1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$2$FG$ +Cores Enabled:$FG,0$2$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-3339Y CPU @ 1.50GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$10$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$1.4 GHz$FG$ +Max Speed:$FG,0$4.0 GHz$FG$ +Socket:$FG,0$rPGA988B$FG$ +Voltage:$FG,0$0.8V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$8192 MB$FG$ +Mem Device Count:$FG,0$1$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1024x768 + 640x480 + 800x600 + 1366x768 + + + \ No newline at end of file diff --git a/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T420/Survey.DD b/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T420/Survey.DD new file mode 100644 index 0000000..caafe23 --- /dev/null +++ b/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T420/Survey.DD @@ -0,0 +1,91 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/28/24 13:57:14 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: IDE/Legacy + +Current boot drive: C + +Laptop: Yes + +Dock with useful ports available: No + +Expresscard slot available: Yes + +Do laptop keyboard and trackpad both work: Yes + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: No + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: Yes + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Boot drive C IO port info: + +Base 0: 0x01f0 +Base 1: 0x03f4 +Unit : 0 + +Results from SysRepSurvey: + +SMBIOS version 2.6 (67 entries) +$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$CPU$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$2$FG$ +Cores Enabled:$FG,0$2$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$10$FG$ +Stepping:$FG,0$7$FG$ +Current Speed:$FG,0$2.5 GHz$FG$ +Max Speed:$FG,0$2.5 GHz$FG$ +Socket:$FG,0$ZIF Socket$FG$ +Voltage:$FG,0$1.2V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$8192 MB$FG$ +Mem Device Count:$FG,0$2$FG$ +$ID,-3$$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$LENOVO$FG$ +Product Name:$FG,0$4236H11$FG$ +Version:$FG,0$ThinkPad T420$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 768x480 + 960x600 + 1024x768 + 640x480 + 800x600 + + + \ No newline at end of file diff --git a/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T430/Survey.DD b/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T430/Survey.DD new file mode 100644 index 0000000..229e943 --- /dev/null +++ b/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T430/Survey.DD @@ -0,0 +1,84 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/27/24 14:03:18 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: AHCI + +Current boot drive: C + +Laptop: Yes + +Dock with useful ports available: No + +Expresscard slot available: Yes + +Do laptop keyboard and trackpad both work: Yes + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Yes + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: No + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Results from SysRepSurvey: + +SMBIOS version 2.7 (68 entries) +$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$CPU Socket - U3E1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$2$FG$ +Cores Enabled:$FG,0$2$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$10$FG$ +Stepping:$FG,0$9$FG$ +Current Speed:$FG,0$2.5 GHz$FG$ +Max Speed:$FG,0$2.5 GHz$FG$ +Socket:$FG,0$rPGA988B$FG$ +Voltage:$FG,0$0.9V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$16384 MB$FG$ +Mem Device Count:$FG,0$2$FG$ +$ID,-3$$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$LENOVO$FG$ +Product Name:$FG,0$23472Q7$FG$ +Version:$FG,0$ThinkPad T430$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1024x768 + 640x480 + 800x600 + 1366x768 + + + \ No newline at end of file diff --git a/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T440p/Survey.DD b/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T440p/Survey.DD new file mode 100644 index 0000000..953c924 --- /dev/null +++ b/Doc/Baremetal/Machines/Laptop/Lenovo/ThinkPad_T440p/Survey.DD @@ -0,0 +1,84 @@ +$WW+H,1$Survey and System Results: + +OS: TinkerOS V5.160 07/27/24 14:35:40 + +Current graphics mode: 640 x 480 (640 by 480 framebuffer) + +Current disk mode: AHCI + +Current boot drive: C + +Laptop: Yes + +Dock with useful ports available: Unknown + +Expresscard slot available: No + +Do laptop keyboard and trackpad both work: Yes + +Is AHCI mode supported in BIOS: Yes + +Is Legacy/IDE mode supported in BIOS: Unknown + +Does PS/2 emulation of USB both keyboard and mouse work in TinkerOS: Yes + +Does your system have a PS/2 mouse or combo port: No + +Does your system have a serial port: No + +Does your system have a parallel port: No + +Can you install and run TinkerOS bare metal: Yes + +Can you install and run TempleOS bare metal: No + +Does PS/2 emulation of USB both keyboard and mouse work in TempleOS: No + +Did the automatic installer work: No + +Did you manually partition and format the drive: Yes + +Did you manually have to enter IO port numbers: No + +Results from SysRepSurvey: + +SMBIOS version 2.7 (66 entries) +$TR-C,"Processor"$ +$FD,3$$ID,3$Socket Name:$FG,0$CPU Socket - U3E1$FG$ +Processor Type:$FG,0$Central Processor$FG$ +Status:$FG,0$Socket Populated, CPU Enabled$FG$ +Core Count:$FG,0$2$FG$ +Cores Enabled:$FG,0$2$FG$ +Manufacturer:$FG,0$Intel(R) Corporation$FG$ +Name:$FG,0$Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz$FG$ +Family:$FG,0$6$FG$ +Model:$FG,0$12$FG$ +Stepping:$FG,0$3$FG$ +Current Speed:$FG,0$2.5 GHz$FG$ +Max Speed:$FG,0$2.5 GHz$FG$ +Socket:$FG,0$rPGA988B$FG$ +Voltage:$FG,0$0.8V$FG$ +External Clock:$FG,0$100 MHz$FG$ +$ID,-3$$TR-C,"Memory Array"$ +$FD,3$$ID,3$Location:$FG,0$Motherboard$FG$ +Use:$FG,0$System Memory$FG$ +Error Correction:$FG,0$None$FG$ +Max Capacity:$FG,0$16384 MB$FG$ +Mem Device Count:$FG,0$2$FG$ +$ID,-3$$TR-C,"System"$ +$FD,3$$ID,3$Operating system:$FG,0$TinkerOS V5.160$FG$ +Manufacturer:$FG,0$LENOVO$FG$ +Product Name:$FG,0$20AWS2FX00$FG$ +Version:$FG,0$ThinkPad T440p$FG$ +$ID,-3$$FD,1$ +Hypervisor present: 0 + +Detected resolution options: + + 1024x768 + 640x480 + 800x600 + 1600x900 + + + \ No newline at end of file diff --git a/Doc/Start.DD b/Doc/Start.DD index 4f6333b..37214d2 100644 --- a/Doc/Start.DD +++ b/Doc/Start.DD @@ -1,4 +1,4 @@ -$WW+H,1$$FG,5$$TX+CX,"TinkerOS V5.15",D="DD_OS_NAME_VERSION"$$FG$ +$WW+H,1$$FG,5$$TX+CX,"TinkerOS V5.16",D="DD_OS_NAME_VERSION"$$FG$ $TX+CX,"Public Domain Operating System"$ diff --git a/Doc/Web.DD b/Doc/Web.DD index a27dabd..3138e96 100644 --- a/Doc/Web.DD +++ b/Doc/Web.DD @@ -1,4 +1,4 @@ -$WW+H,1$$FG,5$$TX+CX,"TinkerOS V5.15",D="DD_OS_NAME_VERSION"$$FG$ +$WW+H,1$$FG,5$$TX+CX,"TinkerOS V5.16",D="DD_OS_NAME_VERSION"$$FG$ $TX+CX,"Public Domain Operating System"$ diff --git a/Kernel/BlkDev/DskAHCI.HC b/Kernel/BlkDev/DskAHCI.HC index a728305..5aa1d62 100644 --- a/Kernel/BlkDev/DskAHCI.HC +++ b/Kernel/BlkDev/DskAHCI.HC @@ -267,6 +267,7 @@ I64 AHCIAtapiCapacityGet(CBlkDev *bd) cmd_fis->type = FISt_H2D; PCIBts(&cmd_fis->desc, AHCI_CF_DESCf_C); //Set Command bit in H2D FIS. cmd_fis->command = ATA_PACKET; + cmd_fis->lba1 = 8; cmd_table->acmd[0] = ATAPI_READ_CAPACITY >> 8; AHCIPortWait(bd->port_num, tS + 2); PCIBts(&port->cmd_issue, cmd_slot); //Issue the command. diff --git a/Kernel/BlkDev/DskATAId.HC b/Kernel/BlkDev/DskATAId.HC index ed55789..1313f3f 100644 --- a/Kernel/BlkDev/DskATAId.HC +++ b/Kernel/BlkDev/DskATAId.HC @@ -454,7 +454,7 @@ I64 MountAHCIAuto() // if boot-drive blkdev exists, do a SATA port iteration to mount it first "( : BlkDev at 0x%0X )\n", bd; for (i = 0; i < AHCI_MAX_PORTS; i++) - if (Bt(&blkdev.ahci_hba->ports_implemented, i)) + if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) { port = &blkdev.ahci_hba->ports[i]; if (bd->port_num == i) @@ -481,7 +481,7 @@ I64 MountAHCIAuto() // do a 2nd iteration to mount remaining drives // (we end up trying to boot off whichever drive/partition ends up at chosen letter) for (i = 0; i < AHCI_MAX_PORTS; i++) - if (i != ata_port && i != atapi_port && Bt(&blkdev.ahci_hba->ports_implemented, i)) + if (i != ata_port && i != atapi_port && PCIBt(&blkdev.ahci_hba->ports_implemented, i)) { port = &blkdev.ahci_hba->ports[i]; if (port->signature == AHCI_PxSIG_ATA) @@ -502,8 +502,7 @@ I64 MountAHCIAuto() return res; } - -I64 MountIDEAuto(Bool ATAPIOnly=FALSE) +I64 MountIDEAuto(Bool ATAPIOnly=FALSE, Bool just_ide=TRUE) {//Try to mount hard drive and CD/DVD, automatically. (Kernel.Cfg option). //It uses 'C' and 'T' as first drive letters or whatever you set //in config when compiling Kernel.BIN. @@ -513,7 +512,7 @@ I64 MountIDEAuto(Bool ATAPIOnly=FALSE) { MountAHCIAuto; } - ATARep(FALSE,TRUE,&head); + ATARep(FALSE,just_ide,&head); ATAIDDrvs(head,&ata_drv,&atapi_drv); if (ata_drv && !ATAPIOnly) if (ATAMount(blkdev.first_hd_drv_let,BDT_ATA, diff --git a/Kernel/BlkDev/DskAddDev.HC b/Kernel/BlkDev/DskAddDev.HC index 7010970..a3d0c97 100644 --- a/Kernel/BlkDev/DskAddDev.HC +++ b/Kernel/BlkDev/DskAddDev.HC @@ -353,7 +353,7 @@ else return blkdev.dvd_boot_is_good; } -U0 MountAuto() +U0 MountAuto(Bool probe_extra=FALSE) { Bool silent=IsSilent; if (AHCIMode) @@ -365,7 +365,10 @@ U0 MountAuto() catch Fs->catch_except=TRUE; } - else MountIDEAuto; + else { + if (probe_extra) MountIDEAuto(FALSE,FALSE); + else MountIDEAuto; + } Silent(silent); } diff --git a/Kernel/KGlbls.HC b/Kernel/KGlbls.HC index 9977e06..f255c5e 100644 --- a/Kernel/KGlbls.HC +++ b/Kernel/KGlbls.HC @@ -22,7 +22,7 @@ U8 *rev_bits_table, //Table with U8 bits revd *set_bits_table; //Table with count of set bits in a U8 CDate local_time_offset; F64 *pow10_I64, - sys_os_version=5.150; + sys_os_version=5.160; CAutoCompleteDictGlbls acd; CAutoCompleteGlbls ac; diff --git a/Kernel/KernelC.HH b/Kernel/KernelC.HH index c67b9c2..80285e4 100644 --- a/Kernel/KernelC.HH +++ b/Kernel/KernelC.HH @@ -437,8 +437,8 @@ public extern I64 BlkDevAdd(CBlkDev *bd,I64 prt_num=I64_MIN, public extern Bool BlkDevInit(CBlkDev *bd); extern U0 DskCacheInit(I64 size_in_U8s); public extern U0 DskCacheInvalidate(CDrv *dv); -public extern I64 MountIDEAuto(Bool ATAPIOnly=FALSE); -public extern U0 MountAuto(); +public extern I64 MountIDEAuto(Bool ATAPIOnly=FALSE,Bool just_ide=TRUE); +public extern U0 MountAuto(Bool probe_extra=FALSE); public extern CBlkDevGlbls blkdev; #help_index "Graphics/Color" @@ -749,6 +749,11 @@ public extern Bool PCIBt(U8 *bit_field, I64 bit); public extern Bool PCIBtr(U8 *bit_field, I64 bit); public extern Bool PCIBts(U8 *bit_field, I64 bit); +#help_index "PCI;PCIE;Devices" +public extern U8 MixedInU8(I64 mmio, I64 port); +public extern U0 MixedOutU8(I64 mmio, I64 port, I64 val); +public extern U0 MakeAddrUncached(I64 mmio_addr); + #help_index "PCI;Info;File/System;Devices" public extern I64 ATARep(Bool pmt=TRUE, Bool just_ide=FALSE,CATARep **_head=NULL); @@ -760,7 +765,6 @@ public extern U8 *IntEntrySet(I64 irq, public extern U0 RouteIrq(I64 irq, I64 cpu=0); public extern U0 MaskIrq(I64 irq, I64 cpu=0); - #help_index "ScrnCast;Cmd Line (Typically)" public extern Bool ScrnCast(Bool val=ON,Bool just_audio=FALSE, U8 *print_fmt="B:/Tmp/%X.GR") diff --git a/Kernel/Mem/MemPhysical.HC b/Kernel/Mem/MemPhysical.HC index 76af2a0..14b6c9c 100644 --- a/Kernel/Mem/MemPhysical.HC +++ b/Kernel/Mem/MemPhysical.HC @@ -207,3 +207,28 @@ I64 Seg2Linear(U32 *ptr) *ptr = *ptr >> 16 << 4 + *ptr & 0xFFFF; return *ptr; } + +public U8 MixedInU8(I64 mmio, I64 port) +{//Dual function to support MMIO/IO space reading + U8 *mmio_ptr=mmio; + if (mmio) + return *mmio_ptr; + else + return InU8(port); +} + +public U0 MixedOutU8(I64 mmio, I64 port, I64 val) +{//Dual function to support MMIO/IO space writing + U8 *mmio_ptr=mmio; + if (mmio) + *mmio_ptr=val; + else + OutU8(port,val); +} + +public U0 MakeAddrUncached(I64 mmio_addr) +{//Make address uncached + *MemPageTable(mmio_addr)=*MemPageTable(mmio_addr)&~0x18 |0x11; + *MemPageTable(mmio_addr+mem_page_size)=*MemPageTable(mmio_addr+mem_page_size)&~0x18 |0x11; +} + diff --git a/Kernel/PCIEACPI.HC b/Kernel/PCIEACPI.HC index 6250a41..4bf2ccf 100644 --- a/Kernel/PCIEACPI.HC +++ b/Kernel/PCIEACPI.HC @@ -818,7 +818,7 @@ U8 *FindMCFG() // use them in Comm.HC // U0 EnumPcieDeviceIds(mcfg_entry *arr, I64 n) -{ +{//Output listing of devices found in PCIE config space U8 pci_class, pci_subclass, header_type,irq_line,irq_pin,*cfg_space; U16 vendor_id, device_id; U32 *bar; @@ -834,7 +834,7 @@ U0 EnumPcieDeviceIds(mcfg_entry *arr, I64 n) { for (Function=0; Function<8; Function++) { - "Start b,d,f=%d,%d,%d\n",Bus,Device,Function; //TODO + // "Start b,d,f=%d,%d,%d\n",Bus,Device,Function; //TODO cfg_space = e->addr + ((Bus - e->bus_start) << 20 | Device << 15 | Function << 12); vendor_id = PcieCfgRead(cfg_space, PCI_VENDOR_ID, 2); @@ -846,13 +846,14 @@ U0 EnumPcieDeviceIds(mcfg_entry *arr, I64 n) header_type = PcieCfgRead(cfg_space, PCI_HEADER_TYPE, 1); irq_pin=PcieCfgRead(cfg_space,PCI_INTERRUPT_PIN,1); irq_line=PcieCfgRead(cfg_space,PCI_INTERRUPT_LINE,1); - PCILookUpDev(vendor_id,device_id); + //TODO add checks before lookup to prevent hangs here + //PCILookUpDev(vendor_id,device_id); "Bus %d Device %d Func %d Header Type %02x Vendor ID %04x Device ID %04x\n" ,Bus,Device,Function,header_type,vendor_id,device_id; "Class %02x Sub-Class %02x IRQ line: %d IRQ pin %02x\n" ,pci_class,pci_subclass,irq_line,irq_pin; Sleep(10); //TODO - if (header_type == 0) + if (header_type & 0x7f == 0) { bar = &cfg_space[PCI_BASE_ADDRESS_0]; for (bi=0; bi<6; bi++) @@ -869,8 +870,8 @@ U0 EnumPcieDeviceIds(mcfg_entry *arr, I64 n) } } "\n"; - "End b,d,f=%d,%d,%d\n",Bus,Device,Function; //TODO - Sleep(1000); //TODO + // "End b,d,f=%d,%d,%d\n",Bus,Device,Function; //TODO + Sleep(10); //TODO } } } diff --git a/Misc/OSInstall.HC b/Misc/OSInstall.HC index 36f52ea..2afe3c3 100644 --- a/Misc/OSInstall.HC +++ b/Misc/OSInstall.HC @@ -742,7 +742,7 @@ U0 DoInstructions() Bool DoInstall(Bool pmt_reboot) { - I64 i,res=FALSE,vm_install,default_choice='y'; + I64 i,res=FALSE,vm_install,default_choice='y',found_drv='n'; InstallOptions *cfg; if (DrvMounted('C')) { @@ -761,6 +761,8 @@ Bool DoInstall(Bool pmt_reboot) "$$BK, 1$$$$RED$$WARNING WARNING WARNING WARNING WARNING$$FG$$$$BK, 0$$\n\n" "Note this option will repartition your drive and overwrite any existing data!\n\n" "$$BK, 1$$$$RED$$WARNING WARNING WARNING WARNING WARNING$$FG$$$$BK, 0$$\n\n"; + "$$BK, 1$$$$RED$$Select no here if you already setup$$FG$$$$BK, 0$$\n"; + "$$BK, 1$$$$RED$$partitions (such as with clonezilla).$$FG$$$$BK, 0$$\n\n"; "\nPerform automated partitioning and install "; vm_install=YorN('y'); } @@ -810,14 +812,42 @@ Bool DoInstall(Bool pmt_reboot) } else { - "\n\nThis wizard works if you have a partition ready." - "You can partition the drive or BootHDIns() " - "with more options if you do it by hand, not using this wizard.\n\n" + if (!DrvMounted('C')) + { + "\n\nThis wizard works if you already have partition(s) ready." + "\n\nThe partition table should be MSDOS\n" + "(NOT GPT) with FAT32 partitions on a\n" + "IDE or SATA drive (not M.2/NVME!)\n" + "\n\nIf you have already prepared partitions\n" + "to install to using clonezilla or\n" + "another partitioning tool you can try\n" + "to auto mount them now if they are\n" + "FAT32 formatted.\n" + "\nRun MountAuto "; + if (YorN('y')) + MountAuto; + if (!DrvMounted('C')&&!DrvMounted('D')&&!DrvMounted('E')&&!DrvMounted('F')&&!AHCIMode) + { + "\n\n$$BK, 1$$$$RED$$Performing extended probing...$$FG$$$$BK, 0$$\n"; + "$$BK, 1$$$$RED$$If system locks, reboot and do manual mount.$$FG$$$$BK, 0$$\n\n"; + Sleep(500); + MountAuto(TRUE); + } + } + if (DrvMounted('C')||DrvMounted('D')||DrvMounted('E')||DrvMounted('F')) + { + "Drive(s) have been detected!\n\n"; + found_drv='y'; + } + else { + "\n$$BK, 1$$$$RED$$Did you mount drives first? If not, exit.$$FG$$$$BK, 0$$\n\n"; + } + "$$BK, 1$$$$RED$$WARNING WARNING WARNING WARNING WARNING$$FG$$$$BK, 0$$\n" "Continue at your own risk, may cause loss of data!\n" "$$BK, 1$$$$RED$$WARNING WARNING WARNING WARNING WARNING$$FG$$$$BK, 0$$\n\n" "Continue Install Wizard "; - if (YorN('y')) + if (YorN(found_drv)) { do { diff --git a/Once.HC b/Once.HC index def54d4..c9e201b 100644 --- a/Once.HC +++ b/Once.HC @@ -67,6 +67,8 @@ U0 Tmp() "change it using BootHDIns. Otherwise\n"; "perform a manual re-install of this\n"; "partition using a lower resolution.\n\n"; + "For a quick fix to try 640x480\n"; + "instead run Do640x480;\n\n"; } else {