瀏覽代碼

watchdog: hpwdt: Changes to handle NX secure bit in 32bit path

This patch makes use of the set_memory_x() kernel API in order
to make necessary BIOS calls to source NMIs.

This is needed for SLES11 SP2 and the latest upstream kernel as it appears
the NX Execute Disable has grown in its control.

Signed-off by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off by: Wim Van Sebroeck <wim@iguana.be>
Cc: stable@kernel.org
Mingarelli, Thomas 13 年之前
父節點
當前提交
e67d668e14
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      drivers/watchdog/hpwdt.c

+ 4 - 1
drivers/watchdog/hpwdt.c

@@ -231,6 +231,7 @@ static int __devinit cru_detect(unsigned long map_entry,
 
 
 	cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE;
 	cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE;
 
 
+	set_memory_x((unsigned long)bios32_entrypoint, (2 * PAGE_SIZE));
 	asminline_call(&cmn_regs, bios32_entrypoint);
 	asminline_call(&cmn_regs, bios32_entrypoint);
 
 
 	if (cmn_regs.u1.ral != 0) {
 	if (cmn_regs.u1.ral != 0) {
@@ -248,8 +249,10 @@ static int __devinit cru_detect(unsigned long map_entry,
 		if ((physical_bios_base + physical_bios_offset)) {
 		if ((physical_bios_base + physical_bios_offset)) {
 			cru_rom_addr =
 			cru_rom_addr =
 				ioremap(cru_physical_address, cru_length);
 				ioremap(cru_physical_address, cru_length);
-			if (cru_rom_addr)
+			if (cru_rom_addr) {
+				set_memory_x((unsigned long)cru_rom_addr, cru_length);
 				retval = 0;
 				retval = 0;
+			}
 		}
 		}
 
 
 		printk(KERN_DEBUG "hpwdt: CRU Base Address:   0x%lx\n",
 		printk(KERN_DEBUG "hpwdt: CRU Base Address:   0x%lx\n",