xref: /openbmc/linux/arch/arm/mm/abort-ev7.S (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1b2441318SGreg Kroah-Hartman/* SPDX-License-Identifier: GPL-2.0 */
2bbe88886SCatalin Marinas#include <linux/linkage.h>
3bbe88886SCatalin Marinas#include <asm/assembler.h>
4bbe88886SCatalin Marinas/*
5bbe88886SCatalin Marinas * Function: v7_early_abort
6bbe88886SCatalin Marinas *
7da740472SRussell King * Params  : r2 = pt_regs
8da740472SRussell King *	   : r4 = aborted context pc
93e287becSRussell King *	   : r5 = aborted context psr
10bbe88886SCatalin Marinas *
11da740472SRussell King * Returns : r4 - r11, r13 preserved
12bbe88886SCatalin Marinas *
13bbe88886SCatalin Marinas * Purpose : obtain information about current aborted instruction.
14bbe88886SCatalin Marinas */
15*a2faac39SNick Desaulniers	.arch	armv7-a
16bbe88886SCatalin Marinas	.align	5
17bbe88886SCatalin MarinasENTRY(v7_early_abort)
18bbe88886SCatalin Marinas	mrc	p15, 0, r1, c5, c0, 0		@ get FSR
19bbe88886SCatalin Marinas	mrc	p15, 0, r0, c6, c0, 0		@ get FAR
202190fed6SRussell King	uaccess_disable ip			@ disable userspace access
21da740472SRussell King	b	do_DataAbort
2293ed3970SCatalin MarinasENDPROC(v7_early_abort)
23