mb/google/brya/var/uldrenite: Generate RAM ID and SPD file
[coreboot2.git] / payloads / libpayload / arch / arm / asmlib.h
blob8b3fa22cc2b719f5c2cc56db1f99817c2af32bfd
1 /*
2 * arch/arm/asmlib.h
4 * Adapted from Linux arch/arm/include/assembler.h
6 * Copyright (C) 1996-2000 Russell King
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * This file contains arm architecture specific defines
13 * for the different processors.
15 * Do not include any C declarations in this file - it is included by
16 * assembler source.
20 * WARNING: This file is *only* meant for memcpy.S and friends which were copied
21 * from Linux and require some weird macros. It does unspeakable things like
22 * redefining "push", so do *not* try to turn it into a general assembly macro
23 * file, and keep it out of global include directories.
26 #ifndef __ARM_ASMLIB_H__
27 #define __ARM_ASMLIB_H__
30 * Endian independent macros for shifting bytes within registers.
32 #ifndef __ARMEB__
33 #define pull lsr
34 #define push lsl
35 #define get_byte_0 lsl #0
36 #define get_byte_1 lsr #8
37 #define get_byte_2 lsr #16
38 #define get_byte_3 lsr #24
39 #define put_byte_0 lsl #0
40 #define put_byte_1 lsl #8
41 #define put_byte_2 lsl #16
42 #define put_byte_3 lsl #24
43 #else
44 #define pull lsl
45 #define push lsr
46 #define get_byte_0 lsr #24
47 #define get_byte_1 lsr #16
48 #define get_byte_2 lsr #8
49 #define get_byte_3 lsl #0
50 #define put_byte_0 lsl #24
51 #define put_byte_1 lsl #16
52 #define put_byte_2 lsl #8
53 #define put_byte_3 lsl #0
54 #endif
57 * Data preload for architectures that support it
59 #if 1 /* TODO: differentiate once libpayload supports more ARM versions */
60 #define PLD(code...) code
61 #else
62 #define PLD(code...)
63 #endif
66 * This can be used to enable code to cacheline align the destination
67 * pointer when bulk writing to memory. Linux doesn't enable this except
68 * for the "Feroceon" processor, so we better just leave it out.
70 #define CALGN(code...)
72 #endif /* __ARM_ASMLIB_H */