From: Bin Meng Date: Thu, 10 Sep 2015 06:20:26 +0000 (-0700) Subject: x86: quark: Lock HMBOUND register before jumping to kernel X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=693b5f6c71c870276f5c370254fafcb10ee43cb1;p=u-boot.git x86: quark: Lock HMBOUND register before jumping to kernel When Linux kernel boots, it hangs at: [ 0.829408] Intel Quark side-band driver registered This happens when Quark kernel Isolated Memory Region (IMR) driver tries to lock an IMR register to protect kernel's text and rodata sections. However in order to have IMR function correctly, HMBOUND register must be locked otherwise the system just hangs. Signed-off-by: Bin Meng Acked-by: Simon Glass --- diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index 8d53fe367d..3ddf07926a 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -288,5 +288,8 @@ void board_final_cleanup(void) val &= ~0xff0000; writel(val, &rcba->esd); + /* Lock HMBOUND for security */ + msg_port_setbits(MSG_PORT_HOST_BRIDGE, HM_BOUND, HM_BOUND_LOCK); + return; } diff --git a/arch/x86/include/asm/arch-quark/quark.h b/arch/x86/include/asm/arch-quark/quark.h index eb3afbff1d..338c89687e 100644 --- a/arch/x86/include/asm/arch-quark/quark.h +++ b/arch/x86/include/asm/arch-quark/quark.h @@ -32,6 +32,7 @@ /* Host Memory I/O Boundary */ #define HM_BOUND 0x08 +#define HM_BOUND_LOCK 0x00000001 /* Extended Configuration Space */ #define HEC_REG 0x09