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:	Tue, 26 Jan 2016 16:38:00 -0800
From:	John Stultz <john.stultz@...aro.org>
To:	lkml <linux-kernel@...r.kernel.org>
Cc:	John Stultz <john.stultz@...aro.org>,
	Andy Yan <andy.yan@...k-chips.com>,
	Rob Herring <robh@...nel.org>, Arnd Bergmann <arnd@...db.de>,
	Thierry Reding <treding@...dia.com>,
	Heiko Stübner <heiko@...ech.de>,
	Caesar Wang <wxt@...k-chips.com>,
	Kees Cook <keescook@...omium.org>,
	Guodong Xu <guodong.xu@...aro.org>,
	Haojian Zhuang <haojian.zhuang@...aro.org>,
	Vishal Bhoj <vishal.bhoj@...aro.org>,
	Bjorn Andersson <bjorn.andersson@...aro.org>,
	devicetree@...r.kernel.org,
	Android Kernel Team <kernel-team@...roid.com>
Subject: [RFC][PATCH 3/3] dts: hikey: Add hikey support for sram-reboot-mode

Add support to hikey dts and defconfig for the
sram-reboot-mode driver.

The dts entries added here should really be generated
by the UEFI firmware, and not be static in the dts,
since one may be using different firmware on HiKey.
But this patch provides an example of how the
sram-reboot-mode entry would otherwise look.

Cc: Andy Yan <andy.yan@...k-chips.com>
Cc: Rob Herring <robh@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Thierry Reding <treding@...dia.com>
Cc: Heiko Stübner <heiko@...ech.de>
Cc: Caesar Wang <wxt@...k-chips.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: Guodong Xu <guodong.xu@...aro.org>
Cc: Haojian Zhuang <haojian.zhuang@...aro.org>
Cc: Vishal Bhoj <vishal.bhoj@...aro.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: devicetree@...r.kernel.org
Cc: Android Kernel Team <kernel-team@...roid.com>
Signed-off-by: John Stultz <john.stultz@...aro.org>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 36 ++++++++++++++++++++++++++
 arch/arm64/configs/hikey_defconfig             |  3 +++
 2 files changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index 92f1704..67d12d0 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -52,6 +52,11 @@
 			      <0x0 0x0740f000 0x0 0x00001000>;	/* MCU firmware section */
 		};
 
+		reboot-reason@...01000 {
+			no-map;
+			reg = <0x0 0x05f01000 0x0 0x00001000>;
+		};
+
 		mbox-buf@...ff000 {
 			no-map;
 			reg = <0x0 0x06dff000 0x0 0x00001000>;	/* Mailbox message buf */
@@ -71,6 +76,37 @@
 		ftrace-size	= <0x0 0x00020000>;
 	};
 
+
+	/* This entry should really be provided by the UEFI firmware */
+	sram@...1000 {
+		compatible = "mmio-sram", "simple-bus";
+		reg = <0x0 0x05f01000 0x0 0x00001000>;
+		ranges = <0x0 0x0 0x05f01000 0x00001000>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		reboot-mode@0 {
+			compatible = "sram-reboot-mode";
+			reg = <0x0 0x4>;
+
+			none {
+				linux,mode = "none";
+				loader,magic = <0x77665501>;
+			};
+
+			bootloader {
+				linux,mode = "bootloader";
+				loader,magic = <0x77665500>;
+			};
+
+			recovery {
+				linux,mode = "recovery";
+				loader,magic = <0x77665502>;
+			};
+		};
+	};
+
 	smb {
 		uart0: uart@...15000 {	/* console */
 			status = "ok";
diff --git a/arch/arm64/configs/hikey_defconfig b/arch/arm64/configs/hikey_defconfig
index a8375aa..e9db588 100644
--- a/arch/arm64/configs/hikey_defconfig
+++ b/arch/arm64/configs/hikey_defconfig
@@ -201,6 +201,7 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=16384
 CONFIG_VIRTIO_BLK=y
+CONFIG_SRAM=y
 CONFIG_TI_ST=y
 CONFIG_ST_HCI=y
 # CONFIG_SCSI_PROC_FS is not set
@@ -266,6 +267,8 @@ CONFIG_SPI_PL022=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_XGENE=y
 CONFIG_POWER_RESET_SYSCON=y
+CONFIG_SYSCON_REBOOT_MODE=y
+CONFIG_SRAM_REBOOT_MODE=y
 CONFIG_THERMAL=y
 CONFIG_THERMAL_WRITABLE_TRIPS=y
 CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ