mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	Sometimes we met SERROR, but only to catch it when Linux boots up. Let's enable catching in U-Boot to catch it ealier and ease debug. Signed-off-by: Peng Fan <peng.fan@nxp.com>
		
			
				
	
	
		
			23 lines
		
	
	
		
			310 B
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			310 B
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0+ */
 | 
						|
/*
 | 
						|
 * Copyright 2019 NXP
 | 
						|
 */
 | 
						|
 | 
						|
#include <linux/linkage.h>
 | 
						|
 | 
						|
ENTRY(lowlevel_init)
 | 
						|
	mrs	x0, CurrentEL
 | 
						|
	cmp	x0, #8
 | 
						|
	b.eq	1f
 | 
						|
	ret
 | 
						|
1:
 | 
						|
	msr daifclr, #4
 | 
						|
 | 
						|
	/* set HCR_EL2.AMO to catch SERROR */
 | 
						|
	mrs	x0, hcr_el2
 | 
						|
	orr	x0, x0, #0x20
 | 
						|
	msr	hcr_el2, x0
 | 
						|
	isb
 | 
						|
	ret
 | 
						|
ENDPROC(lowlevel_init)
 |