Commit 387faedb authored by H. Peter Anvin's avatar H. Peter Anvin Committed by Ingo Molnar

x86 setup: correct the base in the GDT_ENTRY() macro

The GDT_ENTRY() macro in pm.c would incorrectly cut the bottom 8 bits
off the base.  We didn't define any bases with the bottom 8 bits
nonzero, so it is a non-manifest bug, but it's still a bug.

Pointed out by John Smith <johnsmith9344@gmail.com>.
Cc: John Smith <johnsmith9344@gmail.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent acd644bb
......@@ -104,7 +104,7 @@ static void reset_coprocessor(void)
(((u64)(base & 0xff000000) << 32) | \
((u64)flags << 40) | \
((u64)(limit & 0x00ff0000) << 32) | \
((u64)(base & 0x00ffff00) << 16) | \
((u64)(base & 0x00ffffff) << 16) | \
((u64)(limit & 0x0000ffff)))
struct gdt_ptr {
......
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