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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Dec 2013 15:51:55 +0800
From:	"Lee, Chun-Yi" <joeyli.kernel@...il.com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	"H. Peter Anvin" <hpa@...or.com>,
	Matt Fleming <matt@...sole-pimps.org>,
	Matthew Garrett <matthew.garrett@...ula.com>
Cc:	Elliott@...com, samer.el-haj-mahmoud@...com,
	Oliver Neukum <oneukum@...e.de>, werner@...e.com,
	trenn@...e.de, JBeulich@...e.com, linux-kernel@...r.kernel.org,
	rtc-linux@...glegroups.com, x86@...nel.org,
	"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
	linux-acpi@...r.kernel.org, "Lee, Chun-Yi" <jlee@...e.com>
Subject: [TEST PATCH 14/14] acpi: add early parameter to set CMOS RTC Not Present bit for testing

This is a patch for testing that will not go to any git tree.

Add a early kernel parameter to set CMOS RTC Not Present bit in
acpi_gbl_FADT variable for testing. Use acpi_no_cmos_rtc=1 to enable
this bit to block rtc cmos interface.

Signed-off-by: Lee, Chun-Yi <jlee@...e.com>
---
 arch/x86/kernel/acpi/boot.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 6c0b43b..64925dd 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -83,6 +83,8 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
 #warning ACPI uses CMPXCHG, i486 and later hardware
 #endif
 
+static bool acpi_no_cmos_rtc;
+
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
    -------------------------------------------------------------------------- */
@@ -1531,6 +1533,13 @@ int __init acpi_boot_init(void)
 	 */
 	acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt);
 
+	/* Dummy NO_CMOS_RTC enable option to fake out RTC CMOS */
+	if (acpi_no_cmos_rtc) {
+		acpi_gbl_FADT.header.revision = 5;
+		acpi_gbl_FADT.boot_flags |= ACPI_FADT_NO_CMOS_RTC;
+		pr_info("acpi: Set NO_CMOS_RTC bit in FADT for testing\n");
+	}
+
 	/*
 	 * Process the Multiple APIC Description Table (MADT), if present
 	 */
@@ -1673,3 +1682,11 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)
 	e820_add_region(addr, size, E820_ACPI);
 	update_e820();
 }
+
+/* Dummy NO_CMOS_RTC enable option to fake out RTC CMOS */
+static int __init setup_acpi_no_cmos_rtc(char *arg)
+{
+	acpi_no_cmos_rtc = true;
+	return 0;
+}
+early_param("acpi_no_cmos_rtc", setup_acpi_no_cmos_rtc);
-- 
1.6.4.2

--
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