Changeset 105
- Timestamp:
- Apr 8, 2017, 12:27:02 AM (8 years ago)
- Location:
- trunk/bootcode
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/airboot.asm
r97 r105 2351 2351 2352 2352 ; ----------------------------------------------------------------------------- 2353 ; I13X BUFFER 2354 ; ----------------------------------------------------------------------------- 2353 ; INT13X DAP 2354 ; ----------------------------------------------------------------------------- 2355 2356 ; Disk Address Package that holds information for LBA-access using INT13X 2357 INT13X_DAP db ? ; Size of paket, inserted by code 2358 db ? ; Reserved 2359 INT13X_DAP_NumBlocks dw ? ; Number of blocks 2360 INT13X_DAP_Transfer dd ? ; Transfer Adress 2361 INT13X_DAP_Absolute dd ? ; Absolute Sector 2362 dd ? ; Second Part of QWORD 2363 INT13X_DAP_Size = $-offset [INT13X_DAP] ; Calculated size 2364 2355 2365 ; 2356 2366 ; BOOKMARK: Temporary buffer for 48h INT13X bios call. -
trunk/bootcode/regular/driveio.asm
r104 r105 436 436 DriveIO_SaveLVMSector EndP 437 437 438 ; Rousseau: Move this to BSS and merge with int13xbuf there. 439 440 ; Memory-Block that holds information for LBA-access via INT 13h 441 DriveIO_DAP db 10h ; Size of paket 442 db 0 ; Reserved 443 DriveIO_DAP_NumBlocks dw 0 ; Number of blocks 444 DriveIO_DAP_Transfer dd 0 ; Transfer Adress 445 DriveIO_DAP_Absolute dd 0 ; Absolute Sector 446 dd 0 ; Second Part of QWORD 438 447 439 448 440 ; Special error message instead of "LOAD ERROR" during partition scanning, … … 517 509 DIOLS_UseExtension: 518 510 push cx 519 mov cs:[ DriveIO_DAP_NumBlocks], 1 ; Copy ONE sector520 mov wptr cs:[ DriveIO_DAP_Transfer+0], si511 mov cs:[INT13X_DAP_NumBlocks], 1 ; Copy ONE sector 512 mov wptr cs:[INT13X_DAP_Transfer+0], si 521 513 mov cx, ds 522 mov wptr cs:[ DriveIO_DAP_Transfer+2], cx; Fill out Transfer Adress523 mov wptr cs:[ DriveIO_DAP_Absolute+0], ax524 mov wptr cs:[ DriveIO_DAP_Absolute+2], bx; Fill out Absolute Sector514 mov wptr cs:[INT13X_DAP_Transfer+2], cx ; Fill out Transfer Adress 515 mov wptr cs:[INT13X_DAP_Absolute+0], ax 516 mov wptr cs:[INT13X_DAP_Absolute+2], bx ; Fill out Absolute Sector 525 517 push cs 526 518 pop ds 527 mov si, offset DriveIO_DAP528 mov ah, 42h ; Extended Read519 mov si, offset [INT13X_DAP] 520 mov ah, 42h ; Extended Read 529 521 int 13h 530 522 pop cx … … 552 544 553 545 ; One sector to read 554 mov cs:[ DriveIO_DAP_NumBlocks], 1546 mov cs:[INT13X_DAP_NumBlocks], 1 555 547 556 548 ; Setup transfer address 557 mov wptr cs:[ DriveIO_DAP_Transfer+0], si; offset558 mov wptr cs:[ DriveIO_DAP_Transfer+2], di; segment549 mov wptr cs:[INT13X_DAP_Transfer+0], si ; offset 550 mov wptr cs:[INT13X_DAP_Transfer+2], di ; segment 559 551 560 552 ; Setup LBA64 address of requested sector 561 mov wptr cs:[ DriveIO_DAP_Absolute+0], cx; low word lower part562 mov wptr cs:[ DriveIO_DAP_Absolute+2], bx; high word lower part563 mov wptr cs:[ DriveIO_DAP_Absolute+4], 0; low word upper part564 mov wptr cs:[ DriveIO_DAP_Absolute+6], 0; high word upper part553 mov wptr cs:[INT13X_DAP_Absolute+0], cx ; low word lower part 554 mov wptr cs:[INT13X_DAP_Absolute+2], bx ; high word lower part 555 mov wptr cs:[INT13X_DAP_Absolute+4], 0 ; low word upper part 556 mov wptr cs:[INT13X_DAP_Absolute+6], 0 ; high word upper part 565 557 566 558 ; Address of packet 567 mov si, offset [ DriveIO_DAP]; disk address packet559 mov si, offset [INT13X_DAP] ; disk address packet 568 560 569 561 ; Do the extended read … … 606 598 607 599 ; One sector to read 608 mov cs:[ DriveIO_DAP_NumBlocks], 1600 mov cs:[INT13X_DAP_NumBlocks], 1 609 601 610 602 ; Setup transfer address 611 mov wptr cs:[ DriveIO_DAP_Transfer+0], si; offset612 mov wptr cs:[ DriveIO_DAP_Transfer+2], di; segment603 mov wptr cs:[INT13X_DAP_Transfer+0], si ; offset 604 mov wptr cs:[INT13X_DAP_Transfer+2], di ; segment 613 605 614 606 ; Setup LBA64 address of requested sector 615 mov wptr cs:[ DriveIO_DAP_Absolute+0], cx; low word lower part616 mov wptr cs:[ DriveIO_DAP_Absolute+2], bx; high word lower part617 mov wptr cs:[ DriveIO_DAP_Absolute+4], 0; low word upper part618 mov wptr cs:[ DriveIO_DAP_Absolute+6], 0; high word upper part607 mov wptr cs:[INT13X_DAP_Absolute+0], cx ; low word lower part 608 mov wptr cs:[INT13X_DAP_Absolute+2], bx ; high word lower part 609 mov wptr cs:[INT13X_DAP_Absolute+4], 0 ; low word upper part 610 mov wptr cs:[INT13X_DAP_Absolute+6], 0 ; high word upper part 619 611 620 612 ; Address of packet 621 mov si, offset [ DriveIO_DAP]; disk address packet613 mov si, offset [INT13X_DAP] ; disk address packet 622 614 623 615 ; Do the extended write … … 916 908 DIOSS_UseExtension: 917 909 push cx 918 mov cs:[ DriveIO_DAP_NumBlocks], 1; Copy ONE sector919 mov wptr cs:[ DriveIO_DAP_Transfer+0], si910 mov cs:[INT13X_DAP_NumBlocks], 1 ; Copy ONE sector 911 mov wptr cs:[INT13X_DAP_Transfer+0], si 920 912 mov cx, ds 921 mov wptr cs:[ DriveIO_DAP_Transfer+2], cx; Fill out Transfer Adress922 mov wptr cs:[ DriveIO_DAP_Absolute+0], ax923 mov wptr cs:[ DriveIO_DAP_Absolute+2], bx; Fill out Absolute Sector913 mov wptr cs:[INT13X_DAP_Transfer+2], cx ; Fill out Transfer Adress 914 mov wptr cs:[INT13X_DAP_Absolute+0], ax 915 mov wptr cs:[INT13X_DAP_Absolute+2], bx ; Fill out Absolute Sector 924 916 push cs 925 917 pop ds 926 mov si, offset DriveIO_DAP927 mov ax, 4300h ; Extended Write (No Verify)918 mov si, offset [INT13X_DAP] 919 mov ax, 4300h ; Extended Write (No Verify) 928 920 int 13h 929 921 pop cx … … 981 973 DriveIO_LoadMasterLVMSector_NextTry: 982 974 ; Number of sectors to read 983 mov [ DriveIO_DAP_NumBlocks],1975 mov [INT13X_DAP_NumBlocks],1 984 976 985 977 ; Setup destination address 986 978 mov si, offset [LVMSector] 987 mov word ptr [ DriveIO_DAP_Transfer+0],si979 mov word ptr [INT13X_DAP_Transfer+0],si 988 980 mov ax, ds 989 mov word ptr [ DriveIO_DAP_Transfer+2],ax981 mov word ptr [INT13X_DAP_Transfer+2],ax 990 982 991 983 ; Get the sector-number of the next possible LVM sector (255,127,63) … … 1020 1012 1021 1013 ; Setup the requested LBA sector number 1022 mov word ptr [ DriveIO_DAP_Absolute+0],ax ; LBA low NORMAL I/O GEBRUIKEN !1023 mov word ptr [ DriveIO_DAP_Absolute+2],00h ; LBA high1024 mov si, offset DriveIO_DAP; address request packet1014 mov word ptr [INT13X_DAP_Absolute+0],ax ; LBA low NORMAL I/O GEBRUIKEN ! 1015 mov word ptr [INT13X_DAP_Absolute+2],00h ; LBA high 1016 mov si, offset [INT13X_DAP] ; address request packet 1025 1017 mov ah, 42h 1026 int 13h ; do the i/o 1018 int 13h ; do the i/o, CF=1->error, CF=0->success 1019 1020 IFDEF AUX_DEBUG 1021 pushf 1022 pusha 1023 pushf 1024 xor ax, ax 1025 mov al, dl 1026 call AuxIO_TeletypeHexWord 1027 mov al, '#' 1028 call AuxIO_Teletype 1029 popf 1030 mov ax,0000h 1031 rcl al, 1 1032 call AuxIO_TeletypeHexWord 1033 mov al, '#' 1034 call AuxIO_Teletype 1035 mov ax,word ptr [INT13X_DAP_Absolute+0] 1036 call AuxIO_TeletypeHexWord 1037 mov al, '#' 1038 call AuxIO_Teletype 1039 popa 1040 popf 1041 ENDIF 1042 1027 1043 cmc ; Complement carry so we can exit imm. on error 1028 1044 jnc DriveIO_LoadMasterLVMSector_End ; oops, return with NC … … 1057 1073 DriveIO_LoadMasterLVMSector_Found: 1058 1074 ; Store the address for later use. 1059 mov ax, word ptr [ DriveIO_DAP_Absolute]1075 mov ax, word ptr [INT13X_DAP_Absolute] 1060 1076 mov word ptr [MasterLVMLBA], ax 1061 1077 -
trunk/bootcode/regular/other.asm
r101 r105 89 89 ; 90 90 PRECRAP_Main Proc Near 91 91 92 ; First initialize Variable-Area (everything with NUL) 92 93 ; We use the start instead of the variables because they could be 'orged' … … 371 372 372 373 ; 374 ; Setup the size of the INT13X Disk Address Packet 375 ; 376 mov [INT13X_DAP], INT13X_DAP_Size 377 378 ; 373 379 ; Check valididy of the AiR-BOOT Configuration. 374 380 ;
Note:
See TracChangeset
for help on using the changeset viewer.