mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	The UEFI spec mandates that unaligned memory access should be enabled if supported by the CPU architecture. This patch adds an empty weak function unaligned_access() that can be overridden by an architecture specific routine. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
		
			
				
	
	
		
			27 lines
		
	
	
		
			566 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			566 B
		
	
	
	
		
			C
		
	
	
	
	
	
#ifndef _GENERIC_UNALIGNED_H
 | 
						|
#define _GENERIC_UNALIGNED_H
 | 
						|
 | 
						|
#include <asm/byteorder.h>
 | 
						|
 | 
						|
#include <linux/unaligned/le_byteshift.h>
 | 
						|
#include <linux/unaligned/be_byteshift.h>
 | 
						|
#include <linux/unaligned/generic.h>
 | 
						|
 | 
						|
/*
 | 
						|
 * Select endianness
 | 
						|
 */
 | 
						|
#if defined(__LITTLE_ENDIAN)
 | 
						|
#define get_unaligned	__get_unaligned_le
 | 
						|
#define put_unaligned	__put_unaligned_le
 | 
						|
#elif defined(__BIG_ENDIAN)
 | 
						|
#define get_unaligned	__get_unaligned_be
 | 
						|
#define put_unaligned	__put_unaligned_be
 | 
						|
#else
 | 
						|
#error invalid endian
 | 
						|
#endif
 | 
						|
 | 
						|
/* Allow unaligned memory access */
 | 
						|
void allow_unaligned(void);
 | 
						|
 | 
						|
#endif
 |