lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 27 Sep 2012 18:42:39 -0700
From:	tip-bot for Thomas Renninger <trenn@...e.de>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	yinghai@...nel.org, lenb@...nel.org, eric.piel@...mplin-utc.net,
	tglx@...utronix.de, trenn@...e.de, hpa@...ux.intel.com,
	robert.moore@...el.com
Subject: [tip:x86/acpi] X86 ACPI:
  Introduce x86 arch specific arch_reserve_mem_area() for e820 handling

Commit-ID:  9e0a90cdff5b89599d73695b4d9971d1075c0b14
Gitweb:     http://git.kernel.org/tip/9e0a90cdff5b89599d73695b4d9971d1075c0b14
Author:     Thomas Renninger <trenn@...e.de>
AuthorDate: Wed, 26 Sep 2012 14:18:57 +0200
Committer:  H. Peter Anvin <hpa@...ux.intel.com>
CommitDate: Thu, 27 Sep 2012 15:00:44 -0700

X86 ACPI: Introduce x86 arch specific arch_reserve_mem_area() for e820 handling

This is needed for ACPI table overriding via initrd. Beside reserving
memblocks, X86 also requires to flag the memory area to E820_RESERVED or
E820_ACPI in the e820 mappings to be able to io(re)map it later.

Signed-off-by: Thomas Renninger <trenn@...e.de>
Link: http://lkml.kernel.org/r/1348661941-71287-3-git-send-email-trenn@suse.de
Cc: Len Brown <lenb@...nel.org>
Cc: Robert Moore <robert.moore@...el.com>
Cc: Yinghai Lu <yinghai@...nel.org>
Cc: Eric Piel <eric.piel@...mplin-utc.net>
Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
---
 arch/x86/kernel/acpi/boot.c |    6 ++++++
 include/linux/acpi.h        |    9 +++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index b2297e5..6b75777 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1700,3 +1700,9 @@ int __acpi_release_global_lock(unsigned int *lock)
 	} while (unlikely (val != old));
 	return old & 0x1;
 }
+
+void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)
+{
+	e820_add_region(addr, size, E820_ACPI);
+	update_e820();
+}
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 4f2a762..ebecc46 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -430,4 +430,13 @@ acpi_status acpi_os_prepare_sleep(u8 sleep_state,
 #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
 #endif
 
+#if CONFIG_X86
+void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
+#else
+static inline void arch_reserve_mem_area(acpi_physical_address addr,
+					  size_t size)
+{
+}
+#endif /* CONFIG_X86 */
+
 #endif	/*_LINUX_ACPI_H*/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ