Bug 201434

Summary: [PATCH] Bad management of PSR_A bit
Product: Base System Reporter: Grégory Soutadé <soutade>
Component: armAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: Closed FIXED    
Severity: Affects Some People CC: mmoll
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: arm   
OS: Any   
Attachments:
Description Flags
Clear PSR_A bit at startup (initarm) none

Description Grégory Soutadé 2015-07-09 07:30:36 UTC
Created attachment 158557 [details]
Clear PSR_A bit at startup (initarm)

Sometimes at reboot, the PSR_A bit (CPSR register) is set. This bit mask further hardware bad accesses until it's cleared (going into userspace for me) leaving "Asynchronous External Abort" very late.

In the ARM_NEW_PMAP code, we call enable_interrupts() in initarm() to force clearing this bit. Nevertheless, enable_interrupts() does a mask with ARM_CPSR_I32 and ARM_CPSR_F32 bits making the call useless.

The attached patch correct it in ARM_NEW_PMAP and non ARM_NEW_PMAP code.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-11-10 13:47:35 UTC
A commit references this bug:

Author: mmel
Date: Tue Nov 10 13:47:28 UTC 2015
New revision: 290661
URL: https://svnweb.freebsd.org/changeset/base/290661

Log:
  ARM: Refactor interrupt_enable/disable/restore.
  Allow manipulation with PSR_A bit on ARMv6+.
  Remove declaration of unused functions.

  This effectively enables asynchronous aborts on early bootstrap stage,
  which previously was not enabled due to an error in enable_interrupts().

  PR:		201434
  Reported by:	Gregory Soutade <soutade at gmail.com>
  Approved by:	kib (mentor)

Changes:
  head/sys/arm/include/cpufunc.h
Comment 2 Michael Moll freebsd_committer freebsd_triage 2015-11-28 14:29:55 UTC
closing with mmel@'s blessings.