- Timestamp:
- Jun 3, 2020, 5:36:55 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r200 r204 12 12 # Define default build version if not specified in environment 13 13 BLD_MAJOR=2 14 BLD_MINOR=0 7# must be 2 digits14 BLD_MINOR=08 # must be 2 digits 15 15 BLD_REV=0 # not used at this time 16 16 … … 116 116 @%create $^@ 117 117 @%append $^@ /* Autogenerated by Makefile */ 118 @ %append $^@ $#define DMAJOR $(BLD_MAJOR)119 @ %append $^@ $#define DMINOR $(BLD_MINOR)118 @AddToFile $^@,$#define DMAJOR,VERSIONMAJOR,$(VERSION) 119 @AddToFile $^@,$#define DMINOR,VERSIONMINOR,$(VERSION) 120 120 @%append $^@ $#define DVENDOR "$(VENDOR)" 121 121 @AddToFile $^@,$#define BLD_YEAR,DATEYEAR -
trunk/src/os2ahci/ahci.c
r201 r204 1718 1718 ADD_WORKSPACE *aws = (ADD_WORKSPACE *) &pIorb->ADDWorkSpace; 1719 1719 1720 vNext = pIorb-> pNxtIORB;1720 vNext = pIorb->f16NxtIORB; 1721 1721 if (aws->queued_hw && (done_mask & (1UL << aws->cmd_slot))) 1722 1722 { … … 1746 1746 IORBH *pIorb = Far16ToFlat(vIorb); 1747 1747 1748 vNext = pIorb-> pNxtIORB;1748 vNext = pIorb->f16NxtIORB; 1749 1749 1750 1750 iorb_complete(vIorb, pIorb); … … 1884 1884 int d = iorb_unit_device(pIorb); 1885 1885 1886 DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)-> pControllerCmd),1886 DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)->f16ControllerCmd), 1887 1887 ((IORB_ADAPTER_PASSTHRU *)pIorb)->ControllerCmdLen, 1888 1888 "ahci_execute_cdb(%d.%d.%d): ", a, p, d); … … 1910 1910 int d = iorb_unit_device(pIorb); 1911 1911 1912 DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)-> pControllerCmd),1912 DHEXDUMP(5,Far16ToFlat(((IORB_ADAPTER_PASSTHRU *)pIorb)->f16ControllerCmd), 1913 1913 ((IORB_ADAPTER_PASSTHRU *)pIorb)->ControllerCmdLen, 1914 1914 "ahci_execute_ata(%d.%d.%d): ", a, p, d); -
trunk/src/os2ahci/ata.c
r200 r204 361 361 { 362 362 ULONG offset = io->BlocksXferred * io->BlockSize; 363 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io-> pSGList);363 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList); 364 364 USHORT i; 365 365 … … 403 403 ULONG offset = 0; 404 404 USHORT i; 405 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io-> pSGList);405 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList); 406 406 407 407 for (i = sg_indx; i < io->cSGList; i++) … … 532 532 DLA_Table_Sector *pDLA = (DLA_Table_Sector*)add_workspace(pIorb)->buf; 533 533 AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb); 534 GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)-> pGeometry;534 GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->f16Geometry; 535 535 int p = iorb_unit_port(pIorb); 536 536 int rc; … … 567 567 int is_lvm_geometry(IORBH *pIorb) 568 568 { 569 GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)-> pGeometry;569 GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->f16Geometry; 570 570 ULONG sector; 571 571 … … 597 597 void ata_get_geometry_pp(IORBH FAR16DATA *vIorb, IORBH *pIorb) 598 598 { 599 GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)-> pGeometry;599 GEOMETRY *geometry = ((IORB_GEOMETRY*)pIorb)->f16Geometry; 600 600 USHORT geometry_len = ((IORB_GEOMETRY *)pIorb)->GeometryLen; 601 601 u16 *id_buf = add_workspace(pIorb)->buf; … … 750 750 { 751 751 IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb; 752 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io-> pSGList);752 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList); 753 753 AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb); 754 754 ULONG sector = io->RBA + io->BlocksXferred; … … 875 875 { 876 876 IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb; 877 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io-> pSGList);877 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList); 878 878 ADD_WORKSPACE *aws = add_workspace(pIorb); 879 879 … … 948 948 { 949 949 IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb; 950 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io-> pSGList);950 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList); 951 951 AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb); 952 952 ULONG sector = io->RBA + io->BlocksXferred; … … 1015 1015 { 1016 1016 IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb; 1017 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io-> pSGList);1017 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList); 1018 1018 ADD_WORKSPACE *aws = add_workspace(pIorb); 1019 1019 AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb); … … 1092 1092 { 1093 1093 IORB_ADAPTER_PASSTHRU *apt = (IORB_ADAPTER_PASSTHRU *)pIorb; 1094 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(apt-> pSGList);1094 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(apt->f16SGList); 1095 1095 AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb); 1096 1096 int p = iorb_unit_port(pIorb); … … 1106 1106 rc = ata_cmd(ai, p, d, slot, 0, 1107 1107 AP_SGLIST, pSGList, apt->cSGList, 1108 AP_ATA_CMD, Far16ToFlat(apt-> pControllerCmd),1108 AP_ATA_CMD, Far16ToFlat(apt->f16ControllerCmd), 1109 1109 AP_WRITE, !(apt->Flags & PT_DIRECTION_IN), 1110 1110 AP_END); … … 1148 1148 1149 1149 /* map D2H FIS to the original ATA controller command structure */ 1150 cmd = (ATA_CMD *)Far16ToFlat(((IORB_ADAPTER_PASSTHRU*)pIorb)-> pControllerCmd);1150 cmd = (ATA_CMD *)Far16ToFlat(((IORB_ADAPTER_PASSTHRU*)pIorb)->f16ControllerCmd); 1151 1151 1152 1152 cmd->cmd = fis[2]; -
trunk/src/os2ahci/atapi.c
r196 r204 72 72 { 73 73 IORB_EXECUTEIO *io = (IORB_EXECUTEIO *)pIorb; 74 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io-> pSGList);74 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(io->f16SGList); 75 75 ATAPI_CDB_12 cdb; 76 76 AD_INFO *ai = ad_infos + iorb_unit_adapter(pIorb); … … 238 238 { 239 239 IORB_ADAPTER_PASSTHRU *pt = (IORB_ADAPTER_PASSTHRU *)pIorb; 240 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(pt-> pSGList);240 SCATGATENTRY *pSGList = (SCATGATENTRY*)Far16ToFlat(pt->f16SGList); 241 241 int rc; 242 242 u8 cdb[ATAPI_MAX_CDB_LEN]; … … 249 249 } 250 250 /* AHCI requires 12 or 16 byte commands */ 251 atapi_pad_cdb(Far16ToFlat(pt-> pControllerCmd), pt->ControllerCmdLen, cdb, &cdb_len);251 atapi_pad_cdb(Far16ToFlat(pt->f16ControllerCmd), pt->ControllerCmdLen, cdb, &cdb_len); 252 252 253 253 if (cdb[0] == 0x12 || cdb[0] == 0x5a) … … 318 318 /* if the sense buffer requested is larger than our default, adjust 319 319 * the length accordingly to satisfy the caller's requirements. */ 320 if (ssb-> SenseData !=NULL && ssb->ReqSenseLen > sense_buf_len)320 if (ssb->f16SenseData != FAR16NULL && ssb->ReqSenseLen > sense_buf_len) 321 321 { 322 322 sense_buf_len = ssb->ReqSenseLen; … … 388 388 memset(ssb->AdapterDiagInfo, 0x00, sizeof(ssb->AdapterDiagInfo)); 389 389 390 if (ssb-> SenseData !=NULL)390 if (ssb->f16SenseData != FAR16NULL) 391 391 { 392 memcpy(Far16ToFlat(ssb-> SenseData), psd, ssb->ReqSenseLen);392 memcpy(Far16ToFlat(ssb->f16SenseData), psd, ssb->ReqSenseLen); 393 393 ssb->Flags |= STATUS_SENSEDATA_VALID; 394 394 } -
trunk/src/os2ahci/ctxhook.c
r202 r204 144 144 IORBH *pIorb = Far16ToFlat(vIorb); 145 145 ADD_WORKSPACE *aws = add_workspace(pIorb); 146 vNext = pIorb-> pNxtIORB;146 vNext = pIorb->f16NxtIORB; 147 147 148 148 if (aws->queued_hw) … … 274 274 { 275 275 IORBH *pIorb = Far16ToFlat(vIorb); 276 vNext = pIorb-> pNxtIORB;276 vNext = pIorb->f16NxtIORB; 277 277 278 278 spin_lock(drv_lock); … … 358 358 { 359 359 IORBH *pIorb = Far16ToFlat(vIorb); 360 vNext = pIorb-> pNxtIORB;360 vNext = pIorb->f16NxtIORB; 361 361 a = iorb_unit_adapter(pIorb); 362 362 p = iorb_unit_port(pIorb); … … 422 422 IORBH *pIorb = Far16ToFlat(vIorb); 423 423 ADD_WORKSPACE *aws = add_workspace(pIorb); 424 vNext = pIorb-> pNxtIORB;424 vNext = pIorb->f16NxtIORB; 425 425 426 426 if (aws->queued_hw) … … 452 452 { 453 453 IORBH *pIorb = Far16ToFlat(vIorb); 454 vNext = pIorb-> pNxtIORB;454 vNext = pIorb->f16NxtIORB; 455 455 456 456 spin_lock(drv_lock); -
trunk/src/os2ahci/ioctl.c
r198 r204 187 187 ic->iorb.iorbh.RequestControl = IORB_ASYNC_POST; 188 188 ic->iorb.iorbh.Timeout = req->timeout; 189 ic->iorb.iorbh. NotifyAddress = Far16AdrOfIoctlWakeup16;189 ic->iorb.iorbh.f16NotifyAddress = Far16AdrOfIoctlWakeup16; 190 190 191 191 ic->iorb.cSGList = ic->sg_cnt; 192 ic->iorb. pSGList = MemFar16Adr(ic->sg_lst);192 ic->iorb.f16SGList = MemFar16Adr(ic->sg_lst); 193 193 ic->iorb.ppSGLIST = MemPhysAdr(ic->sg_lst); 194 194 195 195 memcpy(ic->cmd, req->cmd.cdb, sizeof(ic->cmd)); 196 196 ic->iorb.ControllerCmdLen = req->cmdlen; 197 ic->iorb. pControllerCmd = MemFar16Adr(ic->cmd);197 ic->iorb.f16ControllerCmd = MemFar16Adr(ic->cmd); 198 198 ic->iorb.Flags = (req->flags & PT_WRITE) ? 0 : PT_DIRECTION_IN; 199 199 … … 203 203 ic->iorb.iorbh.pStatusBlock = CastFar16ToULONG(MemFar16Adr(&ic->ssb)); 204 204 ic->iorb.iorbh.StatusBlockLen = sizeof(ic->ssb); 205 ic->ssb. SenseData= MemFar16Adr(ic->sense);205 ic->ssb.f16SenseData = MemFar16Adr(ic->sense); 206 206 ic->ssb.ReqSenseLen = sizeof(ic->sense); 207 207 ic->iorb.iorbh.RequestControl |= IORB_REQ_STATUSBLOCK; -
trunk/src/os2ahci/os2ahci.c
r201 r204 68 68 int verbosity = 0; /* default is quiet. 1=show sign on banner, >1=show adapter info during boot */ 69 69 int use_mbr_test = 1; 70 long com_baud = 0;71 70 72 71 HDRIVER rm_drvh; /* resource manager driver handle */ … … 225 224 { 226 225 pszCmdLine += 2; 227 com_baud = strtol(pszCmdLine, &pszCmdLine, 0);226 InitComPort(strtol(pszCmdLine, &pszCmdLine, 0)); 228 227 continue; 229 228 } … … 234 233 /* set COM port base address for debug messages */ 235 234 D32g_ComBase = strtol(pszCmdLine, &pszCmdLine, 0); 235 #ifdef TESTVER 236 if (D32g_ComBase == 0) SetPsdPutc(); 237 #endif 236 238 if (D32g_ComBase == 1) D32g_ComBase = 0x3f8; 237 239 if (D32g_ComBase == 2) D32g_ComBase = 0x2f8; … … 419 421 if (iStatus) goto init_fail; 420 422 421 if (com_baud) InitComPort(com_baud);422 423 423 dprintf(0,"BldLevel: %s\n", BldLevel); 424 424 dprintf(0,"CmdLine: %s\n", cmd_line); … … 602 602 * link in 'vNext'. 603 603 */ 604 if (pIorb->RequestControl & IORB_CHAIN) vNext = pIorb-> pNxtIORB;604 if (pIorb->RequestControl & IORB_CHAIN) vNext = pIorb->f16NxtIORB; 605 605 else vNext = (IORBH FAR16DATA *)0; 606 606 … … 767 767 pIorb = Far16ToFlat(vIorb); 768 768 769 vNext = pIorb-> pNxtIORB;769 vNext = pIorb->f16NxtIORB; 770 770 if (!add_workspace(pIorb)->processing) 771 771 { … … 911 911 IORBH *pPtr = Far16ToFlat(vPtr); 912 912 913 vNext = pPtr-> pNxtIORB;913 vNext = pPtr->f16NxtIORB; 914 914 /* move all matching IORBs to the abort queue */ 915 915 if (vPtr != vIorb && iorb_unit_device(pPtr) == d) … … 1002 1002 break; 1003 1003 } 1004 ad_infos[a].ports[p].devs[d].unit_info = pIorb_uc-> pUnitInfo;1004 ad_infos[a].ports[p].devs[d].unit_info = pIorb_uc->f16UnitInfo; 1005 1005 break; 1006 1006 … … 1052 1052 1053 1053 pIorb_conf = (IORB_CONFIGURATION *)pIorb; 1054 vDt = pIorb_conf-> pDeviceTable;1054 vDt = pIorb_conf->f16DeviceTable; 1055 1055 pDt = Far16ToFlat(vDt); 1056 1056 … … 1079 1079 } 1080 1080 1081 pDt->pAdapter[dta] = MakeNear16PtrFromDiff(pIorb_conf-> pDeviceTable, pDt, pPtr);1081 pDt->pAdapter[dta] = MakeNear16PtrFromDiff(pIorb_conf->f16DeviceTable, pDt, pPtr); 1082 1082 1083 1083 //DPRINTF(2,"iocm_device_table: ptr=%x dta=%x pAdapter[dta]=%x pDeviceTable=%x\n", … … 1290 1290 { 1291 1291 /* priority IORB; insert at first position */ 1292 pIorb-> pNxtIORB = queue->vRoot;1292 pIorb->f16NxtIORB = queue->vRoot; 1293 1293 queue->vRoot = vIorb; 1294 1294 } … … 1296 1296 { 1297 1297 /* append IORB to end of queue */ 1298 pIorb-> pNxtIORB = FAR16NULL;1298 pIorb->f16NxtIORB = FAR16NULL; 1299 1299 1300 1300 if (queue->vRoot == FAR16NULL) … … 1304 1304 else 1305 1305 { 1306 ((IORBH *)Far16ToFlat(queue->vTail))-> pNxtIORB = vIorb;1306 ((IORBH *)Far16ToFlat(queue->vTail))->f16NxtIORB = vIorb; 1307 1307 } 1308 1308 queue->vTail = vIorb; … … 1363 1363 if (_vPrev != FAR16NULL) 1364 1364 { 1365 ((IORBH*)Far16ToFlat(_vPrev))-> pNxtIORB = _pIorb->pNxtIORB;1365 ((IORBH*)Far16ToFlat(_vPrev))->f16NxtIORB = _pIorb->f16NxtIORB; 1366 1366 } 1367 1367 else 1368 1368 { 1369 queue->vRoot = _pIorb-> pNxtIORB;1369 queue->vRoot = _pIorb->f16NxtIORB; 1370 1370 } 1371 1371 if (_vIorb == queue->vTail) … … 1377 1377 } 1378 1378 _vPrev = _vIorb; 1379 _vIorb = _pIorb-> pNxtIORB;1379 _vIorb = _pIorb->f16NxtIORB; 1380 1380 } 1381 1381 … … 1461 1461 if (pIorb->RequestControl & IORB_ASYNC_POST) 1462 1462 { 1463 Dev32Help_CallFar16((PFNFAR16)pIorb-> NotifyAddress, vIorb);1463 Dev32Help_CallFar16((PFNFAR16)pIorb->f16NotifyAddress, vIorb); 1464 1464 } 1465 1465 } … … 1630 1630 int a, int p, int d, int scsi_id) 1631 1631 { 1632 DEVICETABLE *pDt = Far16ToFlat(pIorb_conf-> pDeviceTable);1632 DEVICETABLE *pDt = Far16ToFlat(pIorb_conf->f16DeviceTable); 1633 1633 ADAPTERINFO *pPtr; 1634 1634 UNITINFO *pUi; 1635 1635 AD_INFO *ai = ad_infos + a; 1636 1636 1637 pPtr = (ADAPTERINFO *)MakeFlatFromNear16(pIorb_conf-> pDeviceTable, pDt->pAdapter[dta]);1637 pPtr = (ADAPTERINFO *)MakeFlatFromNear16(pIorb_conf->f16DeviceTable, pDt->pAdapter[dta]); 1638 1638 //DPRINTF(2,"add_unit_info: ptr=%x dta=%x pAdapter[dta]=%x pDeviceTable=%x\n", 1639 1639 // ptr, dta, dt->pAdapter[dta], iorb_conf->pDeviceTable); -
trunk/src/os2ahci/trace.c
r200 r204 83 83 dprintf(0," CmdMod=%x ReqCtrl=%x Status=%x ErrorCode=%x\n", 84 84 pIorb->CommandModifier, pIorb->RequestControl, pIorb->Status, pIorb->ErrorCode); 85 dprintf(0," Timeout=%x StatusBlkLen=%x pStatusBlk=%x Res=%x pNxtIORB=%x\n",85 dprintf(0," Timeout=%x StatusBlkLen=%x pStatusBlk=%x Res=%x f16NxtIORB=%x\n", 86 86 pIorb->Timeout, pIorb->StatusBlockLen, pIorb->pStatusBlock, pIorb->Reserved_1, 87 pIorb-> pNxtIORB);87 pIorb->f16NxtIORB); 88 88 } 89 89 #endif -
trunk/tools/AddToFile.cmd
r200 r204 3 3 * Written by and Copyright (c) 2010-2018 David Azarewicz http://88watts.net 4 4 * 5 * @#D Azarewicz:1.0 2#@##1## 15 Nov 2018 DAZAR1 ::::::@@AddToFile.cmd (c) David Azarewicz 20185 * @#D Azarewicz:1.03#@##1## 02 Mar 2020 DAZAR1 ::::::@@AddToFile.cmd (c) David Azarewicz 2020 6 6 * V1.01 16-Sep-2016 First official release 7 7 * V1.02 02-Jun-2017 Added Asd to bldlevel, added DATE1 8 * V1.03 02-Mar-2020 Added STRING function 8 9 * 9 10 * The following line is for the help sample code for the VAR function: … … 27 28 Say ' VERSIONMINOR - Adds the minor portion of the provided version number.'; 28 29 Say ' VERSIONREVISION - Adds the revision portion of the provided version number.'; 30 Say ' STRING - Adds the string with %Y substitution.'; 29 31 Say ' VAR - Adds the value of the specified variable from a specified file.'; 30 32 Say ' FILE - Adds the contents of a file.'; … … 60 62 call 'AddToFile.cmd' MyCmd; 61 63 MyCmd=MyFile||',#define DVREV,VERSIONREVISION,1.2.3'; 64 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 65 call 'AddToFile.cmd' MyCmd; 66 MyCmd=MyFile||',#define DSTRING,STRING,The year is %Y'; 62 67 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 63 68 call 'AddToFile.cmd' MyCmd; … … 183 188 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 184 189 else OutStr=String||' '||NewStr; 190 rc=lineout(OutFile, OutStr); 191 rc=lineout(OutFile); 192 end 193 194 when (Function="STRING") then do 195 RepLoc=Pos('%Y', Parm1); 196 if (RepLoc>0) then do 197 Parm1=Substr(Parm1,1,RepLoc-1)||FORMAT(SUBSTR(DATE('S'), 1, 4))||Substr(Parm1,RepLoc+2); 198 end 199 RepLoc=Pos('%A', String); 200 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||Parm1||Substr(String,RepLoc+2); 201 else OutStr=String||' '||Parm1; 185 202 rc=lineout(OutFile, OutStr); 186 203 rc=lineout(OutFile);
Note:
See TracChangeset
for help on using the changeset viewer.