diff mbox

[U-Boot,v2,2/2] x86: Fix GDT limit in start16.S

Message ID 1413471515-13788-1-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng Oct. 16, 2014, 2:58 p.m. UTC
GDT limit should be one less than an integral multiple of eight.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
 arch/x86/cpu/start16.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Oct. 17, 2014, 5:57 p.m. UTC | #1
On 16 October 2014 16:58, Bin Meng <bmeng.cn@gmail.com> wrote:
> GDT limit should be one less than an integral multiple of eight.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass Oct. 22, 2014, 4:22 p.m. UTC | #2
On 17 October 2014 11:57, Simon Glass <sjg@chromium.org> wrote:
> On 16 October 2014 16:58, Bin Meng <bmeng.cn@gmail.com> wrote:
>> GDT limit should be one less than an integral multiple of eight.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-x86/master, thanks!
diff mbox

Patch

diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index 8b9b327..6968fda 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -70,7 +70,7 @@  idt_ptr:
  * GDT is setup in a safe location in RAM
  */
 gdt_ptr:
-	.word	0x20		/* limit (32 bytes = 4 GDT entries) */
+	.word	0x1f		/* limit (31 bytes = 4 GDT entries - 1) */
 	.long	BOOT_SEG + gdt	/* base */
 
 /* Some CPUs are picky about GDT alignment... */