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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Aug 2014 15:44:13 -0700
From:	Gregory Fong <gregory.0xf0@...il.com>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Russell King <linux@....linux.org.uk>,
	Will Deacon <will.deacon@....com>,
	Matt Porter <mporter@...aro.org>,
	Christian Daudt <bcm@...thebug.org>,
	Mark Rutland <mark.rutland@....com>,
	Brian Norris <computersforpeace@...il.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	Marc Carino <marc.ceeeee@...il.com>,
	Kevin Cernekee <cernekee@...il.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Gregory Fong <gregory.0xf0@...il.com>
Subject: [PATCH] ARM: Explain workaround for faulty ISAR0 register on B15

The Brahma-B15 CPU design, like Krait, incorrectly indicates that it
only supports UDIV and SDIV instructions in Thumb mode when it
actually supports them in ARM and Thumb mode.  This is apparently
because it follows the DDI0406B ARM ARM which has two values for the
divide instruction field, instead of the DDI0406C ARM ARM which has
three values.

Work around this problem by forcing the hwcaps to indicate support for
UDIV and SDIV in both ARM and Thumb modes.

Signed-off-by: Gregory Fong <gregory.0xf0@...il.com>
Cc: Will Deacon <will.deacon@....com>
Cc: Mark Rutland <mark.rutland@....com>
---

Will and Mark had both asked whether Brahma-B15 has a wrong value for ISAR0:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225895.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/227916.html

This should clear up the matter, sorry it took so long!

 arch/arm/mm/proc-v7.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index b5d67db..7706986 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -570,6 +570,11 @@ __v7_ca15mp_proc_info:
 __v7_b15mp_proc_info:
 	.long	0x420f00f0
 	.long	0xff0ffff0
+	/*
+	 * Brahma-B15 processors don't indicate support for SDIV and UDIV
+	 * instructions in the ARM instruction set, even though they actually
+	 * do support them.
+	 */
 	__v7_proc __v7_b15mp_setup, hwcaps = HWCAP_IDIV
 	.size	__v7_b15mp_proc_info, . - __v7_b15mp_proc_info
 
-- 
1.8.3.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