Sfoglia il codice sorgente

[arm] Split out 32-bit-specific code to arch/arm32

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 anni fa
parent
commit
edea3a434c

+ 4
- 17
src/arch/arm/Makefile Vedi File

@@ -3,23 +3,10 @@
3 3
 ASM_TCHAR	:= %
4 4
 ASM_TCHAR_OPS	:= %%
5 5
 
6
-# ARM-specific directories containing source files
7
-#
8
-SRCDIRS		+= arch/arm/core
9
-SRCDIRS		+= arch/arm/libgcc
10
-SRCDIRS		+= arch/arm/interface/efi
11
-
12
-# ARM-specific flags
6
+# Include common ARM headers
13 7
 #
14
-CFLAGS		+= -mthumb -mcpu=cortex-a15 -mabi=aapcs -mfloat-abi=soft
15
-CFLAGS		+= -mword-relocations
16
-ASFLAGS		+= -mthumb -mcpu=cortex-a15
8
+INCDIRS		+= arch/arm/include
17 9
 
18
-# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
19
-#
20
-CFLAGS		+= -fshort-wchar
21
-
22
-# Include platform-specific Makefile
10
+# ARM-specific directories containing source files
23 11
 #
24
-MAKEDEPS	+= arch/arm/Makefile.$(PLATFORM)
25
-include arch/arm/Makefile.$(PLATFORM)
12
+SRCDIRS		+= arch/arm/interface/efi

+ 0
- 8
src/arch/arm/Makefile.efi Vedi File

@@ -1,13 +1,5 @@
1 1
 # -*- makefile -*- : Force emacs to use Makefile mode
2 2
 
3
-# Specify EFI image builder
4
-#
5
-ELF2EFI		= $(ELF2EFI32)
6
-
7
-# Specify EFI boot file
8
-#
9
-EFI_BOOT_FILE	= bootarm.efi
10
-
11 3
 # Include generic EFI Makefile
12 4
 #
13 5
 MAKEDEPS	+= Makefile.efi

+ 13
- 13
src/arch/arm/core/arm_io.c Vedi File

@@ -33,7 +33,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
33 33
  */
34 34
 
35 35
 /** An ARM I/O qword */
36
-union arm_io_qword {
36
+union arm32_io_qword {
37 37
 	uint64_t qword;
38 38
 	uint32_t dword[2];
39 39
 };
@@ -44,12 +44,12 @@ union arm_io_qword {
44 44
  * @v io_addr		I/O address
45 45
  * @ret data		Value read
46 46
  *
47
- * This is not atomic for ARM.
47
+ * This is not atomic for ARM32.
48 48
  */
49
-static uint64_t arm_readq ( volatile uint64_t *io_addr ) {
50
-	volatile union arm_io_qword *ptr =
51
-		container_of ( io_addr, union arm_io_qword, qword );
52
-	union arm_io_qword tmp;
49
+static uint64_t arm32_readq ( volatile uint64_t *io_addr ) {
50
+	volatile union arm32_io_qword *ptr =
51
+		container_of ( io_addr, union arm32_io_qword, qword );
52
+	union arm32_io_qword tmp;
53 53
 
54 54
 	tmp.dword[0] = readl ( &ptr->dword[0] );
55 55
 	tmp.dword[1] = readl ( &ptr->dword[1] );
@@ -62,12 +62,12 @@ static uint64_t arm_readq ( volatile uint64_t *io_addr ) {
62 62
  * @v data		Value to write
63 63
  * @v io_addr		I/O address
64 64
  *
65
- * This is not atomic for ARM.
65
+ * This is not atomic for ARM32.
66 66
  */
67
-static void arm_writeq ( uint64_t data, volatile uint64_t *io_addr ) {
68
-	volatile union arm_io_qword *ptr =
69
-		container_of ( io_addr, union arm_io_qword, qword );
70
-	union arm_io_qword tmp;
67
+static void arm32_writeq ( uint64_t data, volatile uint64_t *io_addr ) {
68
+	volatile union arm32_io_qword *ptr =
69
+		container_of ( io_addr, union arm32_io_qword, qword );
70
+	union arm32_io_qword tmp;
71 71
 
72 72
 	tmp.qword = data;
73 73
 	writel ( tmp.dword[0], &ptr->dword[0] );
@@ -84,5 +84,5 @@ PROVIDE_IOAPI_INLINE ( arm, writew );
84 84
 PROVIDE_IOAPI_INLINE ( arm, writel );
85 85
 PROVIDE_IOAPI_INLINE ( arm, iodelay );
86 86
 PROVIDE_IOAPI_INLINE ( arm, mb );
87
-PROVIDE_IOAPI ( arm, readq, arm_readq );
88
-PROVIDE_IOAPI ( arm, writeq, arm_writeq );
87
+PROVIDE_IOAPI ( arm, readq, arm32_readq );
88
+PROVIDE_IOAPI ( arm, writeq, arm32_writeq );

+ 23
- 0
src/arch/arm32/Makefile Vedi File

@@ -0,0 +1,23 @@
1
+# ARM32-specific directories containing source files
2
+#
3
+SRCDIRS		+= arch/arm32/core
4
+SRCDIRS		+= arch/arm32/libgcc
5
+
6
+# ARM32-specific flags
7
+#
8
+CFLAGS		+= -mthumb -mcpu=cortex-a15 -mabi=aapcs -mfloat-abi=soft
9
+CFLAGS		+= -mword-relocations
10
+ASFLAGS		+= -mthumb -mcpu=cortex-a15
11
+
12
+# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
13
+#
14
+CFLAGS		+= -fshort-wchar
15
+
16
+# Include common ARM Makefile
17
+MAKEDEPS	+= arch/arm/Makefile
18
+include arch/arm/Makefile
19
+
20
+# Include platform-specific Makefile
21
+#
22
+MAKEDEPS	+= arch/arm32/Makefile.$(PLATFORM)
23
+include arch/arm32/Makefile.$(PLATFORM)

+ 14
- 0
src/arch/arm32/Makefile.efi Vedi File

@@ -0,0 +1,14 @@
1
+# -*- makefile -*- : Force emacs to use Makefile mode
2
+
3
+# Specify EFI image builder
4
+#
5
+ELF2EFI		= $(ELF2EFI32)
6
+
7
+# Specify EFI boot file
8
+#
9
+EFI_BOOT_FILE	= bootarm.efi
10
+
11
+# Include generic EFI Makefile
12
+#
13
+MAKEDEPS	+= arch/arm/Makefile.efi
14
+include arch/arm/Makefile.efi

src/arch/arm/core/arm_bigint.c → src/arch/arm32/core/arm32_bigint.c Vedi File


src/arch/arm/core/setjmp.S → src/arch/arm32/core/setjmp.S Vedi File


src/arch/arm/include/bits/bigint.h → src/arch/arm32/include/bits/bigint.h Vedi File


src/arch/arm/include/bits/bitops.h → src/arch/arm32/include/bits/bitops.h Vedi File


src/arch/arm/include/bits/byteswap.h → src/arch/arm32/include/bits/byteswap.h Vedi File


src/arch/arm/include/bits/compiler.h → src/arch/arm32/include/bits/compiler.h Vedi File


src/arch/arm/include/bits/profile.h → src/arch/arm32/include/bits/profile.h Vedi File


src/arch/arm/include/bits/stdint.h → src/arch/arm32/include/bits/stdint.h Vedi File


src/arch/arm/include/bits/strings.h → src/arch/arm32/include/bits/strings.h Vedi File


src/arch/arm/include/efi/ipxe/dhcp_arch.h → src/arch/arm32/include/efi/ipxe/dhcp_arch.h Vedi File


src/arch/arm/include/gdbmach.h → src/arch/arm32/include/gdbmach.h Vedi File


src/arch/arm/include/limits.h → src/arch/arm32/include/limits.h Vedi File


src/arch/arm/include/setjmp.h → src/arch/arm32/include/setjmp.h Vedi File


src/arch/arm/libgcc/lldivmod.S → src/arch/arm32/libgcc/lldivmod.S Vedi File


src/arch/arm/libgcc/llshift.S → src/arch/arm32/libgcc/llshift.S Vedi File


Loading…
Annulla
Salva