]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: quark: Lock HMBOUND register before jumping to kernel
authorBin Meng <bmeng.cn@gmail.com>
Thu, 10 Sep 2015 06:20:26 +0000 (23:20 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 17 Sep 2015 01:53:53 +0000 (19:53 -0600)
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 <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/quark/quark.c
arch/x86/include/asm/arch-quark/quark.h

index 8d53fe367d87db5ab73e2ea6cde41f387decd90f..3ddf07926ae6a64fe2d093c7c21e75347218d1e7 100644 (file)
@@ -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;
 }
index eb3afbff1d55c7ac6cc0322c20ae15b5bc9cb7e4..338c89687e8937870cb854c322e350fec9c403dd 100644 (file)
@@ -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