summaryrefslogtreecommitdiffstats
path: root/acc.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-03-06 02:54:55 -0800
committerH. Peter Anvin <hpa@zytor.com>2013-03-06 02:54:55 -0800
commit420fd29eaf077bc657dcecfc754ad6d71af3e352 (patch)
tree919f474ba1b12631106673f23d040e590daac4b6 /acc.asm
parent08071cd4c1a9f9f7cd0c4e882fdaa64358ae2073 (diff)
downloadvirtio9p-420fd29eaf077bc657dcecfc754ad6d71af3e352.tar.gz
virtio9p-420fd29eaf077bc657dcecfc754ad6d71af3e352.tar.xz
virtio9p-420fd29eaf077bc657dcecfc754ad6d71af3e352.zip
Fix CDS-based accept handling
Diffstat (limited to 'acc.asm')
-rw-r--r--acc.asm22
1 files changed, 18 insertions, 4 deletions
diff --git a/acc.asm b/acc.asm
index b36ded7..dfaee91 100644
--- a/acc.asm
+++ b/acc.asm
@@ -56,13 +56,12 @@ END(acc_file)
/*
* Available for multiple users of a modified drive number
- * at %fs:(%si) - specifically a zero-based drive number where
+ * at %fs:(%si) - specifically a one-based drive number where
* bit 6 is expected to be set for a conforming redirector.
*/
LPROC(acc_drive_common)
movb %fs:(%si),%al /* Device info word (low half) */
andb $0x5f,%al /* Drive number + conforming bit (6) */
- incw %ax
cmpb drive_letter,%al
jne acc_fail
/* CF = 0 if equal */
@@ -103,8 +102,11 @@ fxn_unknown = acc_never
* ------------------------------------------------------------------------- */
GPROC(acc_cds)
- lfsw dos_sdafn,%si
- addw $SDN_CDS,%si
+ lfsw dos_cdsptr,%si
+ lfsw %fs:(%si),%si
+ /* Fall through */
+END(acc_cds)
+LPROC(acc_cds_common)
cmpw $CDS_MAGIC,%fs:CDS_DPBPTR(%si) /* Our magic? */
jne acc_fail
movb drive_letter,%al
@@ -118,6 +120,18 @@ GPROC(acc_cds)
END(acc_cds)
/* ------------------------------------------------------------------------- *
+ * acc_cds_esdi
+ *
+ * ES:DI contains a pointer to the CDS
+ * ------------------------------------------------------------------------- */
+
+GPROC(acc_cds_esdi)
+ movw F_DI,%si
+ movw F_ES,%fs
+ jmp acc_cds_common
+END(acc_cds_esdi)
+
+/* ------------------------------------------------------------------------- *
* acc_qualify
* ------------------------------------------------------------------------- */