aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-21 19:15:55 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-04-21 19:15:55 -0700
commit6af3d0ea72a6f6852bda7519278a0c6fdd16d2b5 (patch)
treeacbb1afd35c0cae0dd13642e6485b3516a063e40
parentb558a3e68fe65960f83b8372b2795b3ba58fa0d2 (diff)
downloadsyslinux.git-6af3d0ea72a6f6852bda7519278a0c6fdd16d2b5.tar.gz
syslinux.git-6af3d0ea72a6f6852bda7519278a0c6fdd16d2b5.tar.xz
syslinux.git-6af3d0ea72a6f6852bda7519278a0c6fdd16d2b5.zip
a20: advance A20Test by a large, prime number
Rather than simply incrementing A20Test, advance it by a large prime number every time. The reason is to minimize false aliasing as quickly as possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/bcopy32.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/bcopy32.inc b/core/bcopy32.inc
index 97b92638..c7155574 100644
--- a/core/bcopy32.inc
+++ b/core/bcopy32.inc
@@ -333,7 +333,7 @@ a20_test:
mov eax,[cs:A20Test]
mov cx,32 ; Loop count
jmp .test ; First iteration = early out
-.wait: inc eax
+.wait: add eax,0x430aea41 ; A large prime number
mov [cs:A20Test],eax
io_delay ; Serialize, and fix delay
.test: cmp eax,[es:A20Test+10h]