aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorShao Miller <shao.miller@yrdsb.edu.on.ca>2009-07-31 21:45:46 -0400
committerShao Miller <shao.miller@yrdsb.edu.on.ca>2009-08-03 22:09:36 -0400
commitd5d62c379dde5a852ad049286cbabb770c4955a1 (patch)
treefcdd48736cbccf7cc93509a708b1602589d87cb9 /memdisk
parentc4c2d6cd6a492cef09fff0cbcb06dcfde866017a (diff)
downloadsyslinux.git-d5d62c379dde5a852ad049286cbabb770c4955a1.tar.gz
syslinux.git-d5d62c379dde5a852ad049286cbabb770c4955a1.tar.xz
syslinux.git-d5d62c379dde5a852ad049286cbabb770c4955a1.zip
[memdisk] Add drive shift limit logic
We will not shift drives greater than or equal to a maximum BIOS drive number. This is hard-coded to drive 0xFF for now. This addition is in support of future disk probing logic, which can decide what the drive shift limit should be.
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/memdisk.inc13
-rw-r--r--memdisk/setup.c4
2 files changed, 17 insertions, 0 deletions
diff --git a/memdisk/memdisk.inc b/memdisk/memdisk.inc
index 3c79b624..7b63c050 100644
--- a/memdisk/memdisk.inc
+++ b/memdisk/memdisk.inc
@@ -147,6 +147,12 @@ Int13Start:
jz our_drive ; If ZF=1, we have an exact match
cmp dl,[cs:DriveNo]
jb .nomatch ; Drive < Our drive
+ cmp dl,[cs:DriveShiftLimit]
+ jae .nomatch ; Drive > The maximum drive
+ ; number that we will shift for.
+ ; This leaves any higher-up BIOS
+ ; drives alone, such as an optical
+ ; disc drive 0xA0 or 0xE0
dec dl ; Drive > Our drive, adjust drive #
.nomatch:
TRACER '!'
@@ -1013,6 +1019,13 @@ DPT_ptr dw 0 ; If nonzero, pointer to DPT
MDI_Len equ $-MemDisk_Info
; ---- MDI structure ends here ---
+DriveShiftLimit db 0ffh ; Installer will [soon] probe for
+ ; a range of contiguous drives.
+ ; Any BIOS drives above this region
+ ; shall not be impacted by our
+ ; shifting behaviour
+ db 0 ; pad to a DWORD
+ dw 0 ; pad to a QWORD
MemInt1588 dw 0 ; 1MB-65MB memory amount (1K)
Cylinders dw 0 ; Cylinder count
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 7f026633..b2444f61 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -107,6 +107,10 @@ struct patch_area {
uint16_t dpt_ptr;
/* End of the official MemDisk_Info */
+ uint8_t driveshiftlimit; /* Do not shift drives above this region */
+ uint8_t _pad2; /* Pad to DWORD */
+ uint16_t _pad3; /* Pad to QWORD */
+
uint16_t memint1588;
uint16_t cylinders;