summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>2004-10-18 18:08:16 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-18 18:08:16 -0700
commit26550a76ae30cae1cc0ada4e798dac9cbd0ff201 (patch)
tree47fd28ea302f087ae8b5dd24c3f06b89202d23ef
parent7fa82794b53dfe5eaf0c90d7c9136865064535a3 (diff)
[PATCH] Fix EDID_INFO in zero-page
EDID_INFO is encroaching on the space meant for E820 map in zero-page. This will result in E820 map corruption on any system that has more=20 than 18 E820 entries and CONFIG_VIDEO_SELECT. Not sure how this bug=20 managed to hide for more than a year. Attached patch should fix the bug. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--Documentation/i386/zero-page.txt3
-rw-r--r--arch/i386/boot/video.S4
-rw-r--r--include/asm-i386/setup.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/i386/zero-page.txt b/Documentation/i386/zero-page.txt
index bbdf7261e7a9..30badb4e39f5 100644
--- a/Documentation/i386/zero-page.txt
+++ b/Documentation/i386/zero-page.txt
@@ -28,7 +28,8 @@ Offset Type Description
0xa0 16 bytes System description table truncated to 16 bytes.
( struct sys_desc_table_struct )
- 0xb0 - 0x1c3 Free. Add more parameters here if you really need them.
+ 0xb0 - 0x13f Free. Add more parameters here if you really need them.
+ 0x140- 0x1be EDID_INFO Video mode setup
0x1c4 unsigned long EFI system table pointer
0x1c8 unsigned long EFI memory descriptor size
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
index a6e043c46e66..925d3f5a3824 100644
--- a/arch/i386/boot/video.S
+++ b/arch/i386/boot/video.S
@@ -1936,7 +1936,7 @@ store_edid:
movl $0x13131313, %eax # memset block with 0x13
movw $32, %cx
- movw $0x440, %di
+ movw $0x140, %di
cld
rep
stosl
@@ -1945,7 +1945,7 @@ store_edid:
movw $0x01, %bx
movw $0x00, %cx
movw $0x01, %dx
- movw $0x440, %di
+ movw $0x140, %di
int $0x10
popw %di # restore all registers
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h
index 59f4a1ad3a49..8814b54c75d4 100644
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -55,7 +55,7 @@ extern unsigned char boot_params[PARAM_SIZE];
#define KERNEL_START (*(unsigned long *) (PARAM+0x214))
#define INITRD_START (*(unsigned long *) (PARAM+0x218))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c))
-#define EDID_INFO (*(struct edid_info *) (PARAM+0x440))
+#define EDID_INFO (*(struct edid_info *) (PARAM+0x140))
#define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))