Commit ba97d488 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Fix e820 overflow.

Originally from Venkatesh Pallipadi for i386

An e820 map with more than 18 entries would overflow into the EDID area in the
zero page.  Fix this.

This is a x86-64 port of Venka's i386 version.
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 58d9acc3
......@@ -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
......
......@@ -25,7 +25,7 @@ extern char x86_boot_params[2048];
#define KERNEL_START (*(unsigned int *) (PARAM+0x214))
#define INITRD_START (*(unsigned int *) (PARAM+0x218))
#define INITRD_SIZE (*(unsigned int *) (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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment