source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm @ 334

Last change on this file since 334 was 334, checked in by gregli@…, 12 years ago

Serial server DPT flag optimization, remove Serial/IDE specific header on drive scan results, added GNU GPL v2 banner at boot.

File size: 1.5 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Sets Serial Device specific parameters to DPT.
3
4; Section containing code
5SECTION .text
6
7;--------------------------------------------------------------------
8; SerialDPT_Finalize
9;   Parameters:
10;       DS:DI:  Ptr to Disk Parameter Table
11;       ES:SI:  Ptr to 512-byte ATA information read from the drive
12;   Returns:
13;       CF:     Set, indicates that this is a floppy disk
14;               Clear, indicates that this is a hard disk
15;   Corrupts registers:
16;       AX
17;--------------------------------------------------------------------
18SerialDPT_Finalize:
19        mov     ax, [es:si+SerialServer_ATA_wPortAndBaud]
20        mov     [di+DPT_SERIAL.wSerialPortAndBaud], ax
21
22;
23; Note that this section is not under %ifdef MODULE_SERIAL_FLOPPY.  It is important to 
24; distinguish floppy disks presented by the server and not treat them as hard disks, even
25; if the floppy support is disabled.
26;
27        mov     al, [es:si+SerialServer_ATA_wDriveFlags]
28        shl     al, 1
29        mov     byte [di+DPT.bFlagsHigh], al
30       
31        ret
32
33%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
34    %if FLGH_DPT_SERIAL_DEVICE != 0x4 || FLGH_DPT_SERIAL_FLOPPY != 0x10 || FLGH_DPT_SERIAL_FLOPPY_TYPE_MASK != 0xe0 || FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION != 5
35        %error "The serial server passes FLGH values into SerialDPT_Finalize directly.  If the flag positions are changed, corresponding changes will need to be made in the serial server, and likely a version check put in to deal with servers talking to incompatible clients"
36    %endif
37%endif
Note: See TracBrowser for help on using the repository browser.