Browse Source

[prefix] Remove unsupported ELF prefices

The .elf, .elfd, .lmelf, and .lmelfd prefices were brought over from
legacy Etherboot and they do not build in gPXE.  This patch removes the
ELF prefices.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
tags/v1.0.0
Stefan Hajnoczi 14 years ago
parent
commit
1056a1c2d5

+ 0
- 4
src/arch/i386/Makefile.pcbios View File

@@ -16,10 +16,6 @@ MEDIA		+= xrom
16 16
 MEDIA		+= pxe
17 17
 MEDIA		+= kpxe
18 18
 MEDIA		+= kkpxe
19
-MEDIA		+= elf
20
-MEDIA		+= elfd
21
-MEDIA		+= lmelf
22
-MEDIA		+= lmelfd
23 19
 MEDIA		+= lkrn
24 20
 MEDIA		+= dsk
25 21
 MEDIA		+= nbi

+ 0
- 94
src/arch/i386/prefix/elf_dprefix.S View File

@@ -1,94 +0,0 @@
1
-#include "elf.h"
2
-
3
-	.arch i386
4
-	.section ".prefix", "a", @progbits
5
-
6
-#define LOAD_ADDR 0x10000
7
-
8
-	/* ELF Header */
9
-	.globl elf_header
10
-elf_header:	
11
-e_ident:	.byte	0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
12
-e_type:		.short	ET_DYN
13
-e_machine:	.short	EM_386
14
-e_version:	.long	1
15
-e_entry:	.long	LOAD_ADDR + _start - elf_header
16
-e_phoff:	.long	elf_program_header - elf_header
17
-e_shoff:	.long	0
18
-e_flags:	.long	0
19
-e_ehsize:	.short	elf_header_end - elf_header
20
-e_phentsize:	.short	ELF32_PHDR_SIZE
21
-e_phnum:	.short	(elf_program_header_end - elf_program_header)/ELF32_PHDR_SIZE
22
-e_shentsize:	.short	0
23
-e_shnum:	.short	0
24
-e_shstrndx:	.short	0
25
-elf_header_end:
26
-	
27
-elf_program_header:
28
-phdr1_p_type:	.long	PT_NOTE
29
-phdr1_p_offset:	.long	elf_note - elf_header
30
-phdr1_p_vaddr:	.long	elf_note
31
-phdr1_p_paddr:	.long	elf_note
32
-phdr1_p_filesz:	.long	elf_note_end - elf_note
33
-phdr1_p_memsz:	.long	elf_note_end - elf_note
34
-phdr1_p_flags:	.long	PF_R | PF_W | PF_X
35
-phdr1_p_align:	.long	0
36
-
37
-/* The decompressor */
38
-phdr2_p_type:	.long	PT_LOAD
39
-phdr2_p_offset:	.long	0
40
-phdr2_p_vaddr:	.long	elf_header
41
-phdr2_p_paddr:	.long	LOAD_ADDR
42
-phdr2_p_filesz:	.long	_verbatim_size
43
-phdr2_p_memsz:	.long	_image_size
44
-phdr2_p_flags:	.long	PF_R | PF_W | PF_X
45
-phdr2_p_align:	.long	16
46
-
47
-elf_program_header_end:
48
-
49
-	.globl elf_note
50
-elf_note:
51
-	.balign 4
52
-	.int 2f - 1f
53
-	.int 4f - 3f
54
-	.int EIN_PROGRAM_NAME
55
-1:	.asciz "ELFBoot"
56
-2:
57
-	.balign 4
58
-3:	
59
-	.asciz "Etherboot"
60
-4:
61
-
62
-
63
-	.balign 4
64
-	.int 2f - 1f
65
-	.int 4f - 3f
66
-	.int EIN_PROGRAM_VERSION
67
-1:	.asciz "ELFBoot"
68
-2:
69
-	.balign 4
70
-3:	
71
-	.asciz VERSION
72
-4:
73
-
74
-#if 0
75
-	.balign 4
76
-	.int 2f - 1f
77
-	.int 4f - 3f
78
-	.int EIN_PROGRAM_CHECKSUM
79
-1:	.asciz "ELFBoot"
80
-2:
81
-	.balign 4
82
-3:	
83
-	.word 0
84
-4:
85
-#endif
86
-	.balign 4
87
-elf_note_end:
88
-
89
-	/* Dummy routines to satisfy the build */
90
-	.section ".text16", "ax", @progbits
91
-prefix_exit:
92
-
93
-prefix_exit_end:
94
-	.previous

+ 0
- 94
src/arch/i386/prefix/elfprefix.S View File

@@ -1,94 +0,0 @@
1
-#include "elf.h"
2
-
3
-	.arch i386
4
-	.section ".prefix", "a", @progbits
5
-
6
-#define LOAD_ADDR 0x10000
7
-
8
-	/* ELF Header */
9
-	.globl elf_header
10
-elf_header:	
11
-e_ident:	.byte	0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
12
-e_type:		.short	ET_EXEC
13
-e_machine:	.short	EM_386
14
-e_version:	.long	1
15
-e_entry:	.long	LOAD_ADDR + _start - elf_header
16
-e_phoff:	.long	elf_program_header - elf_header
17
-e_shoff:	.long	0
18
-e_flags:	.long	0
19
-e_ehsize:	.short	elf_header_end - elf_header
20
-e_phentsize:	.short	ELF32_PHDR_SIZE
21
-e_phnum:	.short	(elf_program_header_end - elf_program_header)/ELF32_PHDR_SIZE
22
-e_shentsize:	.short	0
23
-e_shnum:	.short	0
24
-e_shstrndx:	.short	0
25
-elf_header_end:
26
-	
27
-elf_program_header:
28
-phdr1_p_type:	.long	PT_NOTE
29
-phdr1_p_offset:	.long	elf_note - elf_header
30
-phdr1_p_vaddr:	.long	elf_note
31
-phdr1_p_paddr:	.long	elf_note
32
-phdr1_p_filesz:	.long	elf_note_end - elf_note
33
-phdr1_p_memsz:	.long	elf_note_end - elf_note
34
-phdr1_p_flags:	.long	PF_R | PF_W | PF_X
35
-phdr1_p_align:	.long	0
36
-
37
-/* The decompressor */
38
-phdr2_p_type:	.long	PT_LOAD
39
-phdr2_p_offset:	.long	0
40
-phdr2_p_vaddr:	.long	elf_header
41
-phdr2_p_paddr:	.long	LOAD_ADDR
42
-phdr2_p_filesz:	.long	_verbatim_size
43
-phdr2_p_memsz:	.long	_image_size
44
-phdr2_p_flags:	.long	PF_R | PF_W | PF_X
45
-phdr2_p_align:	.long	16
46
-
47
-elf_program_header_end:
48
-
49
-	.globl elf_note
50
-elf_note:
51
-	.balign 4
52
-	.int 2f - 1f
53
-	.int 4f - 3f
54
-	.int EIN_PROGRAM_NAME
55
-1:	.asciz "ELFBoot"
56
-2:
57
-	.balign 4
58
-3:	
59
-	.asciz "Etherboot"
60
-4:
61
-
62
-
63
-	.balign 4
64
-	.int 2f - 1f
65
-	.int 4f - 3f
66
-	.int EIN_PROGRAM_VERSION
67
-1:	.asciz "ELFBoot"
68
-2:
69
-	.balign 4
70
-3:	
71
-	.asciz VERSION
72
-4:
73
-
74
-#if 0
75
-	.balign 4
76
-	.int 2f - 1f
77
-	.int 4f - 3f
78
-	.int EIN_PROGRAM_CHECKSUM
79
-1:	.asciz "ELFBoot"
80
-2:
81
-	.balign 4
82
-3:	
83
-	.word 0
84
-4:
85
-#endif
86
-	.balign 4
87
-elf_note_end:
88
-
89
-	/* Dummy routines to satisfy the build */
90
-	.section ".text16", "ax", @progbits
91
-prefix_exit:
92
-
93
-prefix_exit_end:
94
-	.previous

+ 0
- 161
src/arch/i386/prefix/lmelf_dprefix.S View File

@@ -1,161 +0,0 @@
1
-#include "elf.h"
2
-	.arch sledgehammer
3
-	.code32
4
-	.equ	FLAT_CODE_SEG,_pmcs-_gdt
5
-	.equ	FLAT_DATA_SEG,_pmds-_gdt
6
-	.equ	MSR_K6_EFER,   0xC0000080
7
-	.equ	EFER_LME,      0x00000100
8
-	.equ	X86_CR4_PAE,   0x00000020
9
-	.equ	CR0_PG,        0x80000000
10
-
11
-	.section ".prefix", "ax", @progbits
12
-
13
-#define LOAD_ADDR 0x10000
14
-		
15
-	/* ELF Header */
16
-	.globl elf_header
17
-elf_header:	
18
-e_ident:	.byte	0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
19
-e_type:		.short	ET_DYN
20
-e_machine:	.short	EM_X86_64
21
-e_version:	.long	1
22
-e_entry:	.long	LOAD_ADDR + elf_start - elf_header
23
-e_phoff:	.long	elf_program_header - elf_header
24
-e_shoff:	.long	0
25
-e_flags:	.long	0
26
-e_ehsize:	.short	elf_header_end - elf_header
27
-e_phentsize:	.short	ELF32_PHDR_SIZE
28
-e_phnum:	.short	(elf_program_header_end - elf_program_header)/ELF32_PHDR_SIZE
29
-e_shentsize:	.short	0
30
-e_shnum:	.short	0
31
-e_shstrndx:	.short	0
32
-elf_header_end:
33
-	
34
-elf_program_header:
35
-phdr1_p_type:	.long	PT_NOTE
36
-phdr1_p_offset:	.long	elf_note - elf_header
37
-phdr1_p_vaddr:	.long	elf_note
38
-phdr1_p_paddr:	.long	elf_note
39
-phdr1_p_filesz:	.long	elf_note_end - elf_note
40
-phdr1_p_memsz:	.long	elf_note_end - elf_note
41
-phdr1_p_flags:	.long	PF_R | PF_W | PF_X
42
-phdr1_p_align:	.long	0
43
-
44
-/* The decompressor */
45
-phdr2_p_type:	.long	PT_LOAD
46
-phdr2_p_offset:	.long	0
47
-phdr2_p_vaddr:	.long	elf_header
48
-phdr2_p_paddr:	.long	LOAD_ADDR
49
-phdr2_p_filesz:	.long	_verbatim_size
50
-phdr2_p_memsz:	.long	_image_size
51
-phdr2_p_flags:	.long	PF_R | PF_W | PF_X
52
-phdr2_p_align:	.long	16
53
-
54
-elf_program_header_end:
55
-
56
-	.globl elf_note
57
-elf_note:
58
-	.balign 4
59
-	.int 2f - 1f
60
-	.int 4f - 3f
61
-	.int EIN_PROGRAM_NAME
62
-1:	.asciz "ELFBoot"
63
-2:
64
-	.balign 4
65
-3:	
66
-	.asciz "Etherboot"
67
-4:
68
-
69
-
70
-	.balign 4
71
-	.int 2f - 1f
72
-	.int 4f - 3f
73
-	.int EIN_PROGRAM_VERSION
74
-1:	.asciz "ELFBoot"
75
-2:
76
-	.balign 4
77
-3:	
78
-	.asciz VERSION
79
-4:
80
-
81
-#if 0
82
-	.balign 4
83
-	.int 2f - 1f
84
-	.int 4f - 3f
85
-	.int EIN_PROGRAM_CHECKSUM
86
-1:	.asciz "ELFBoot"
87
-2:
88
-	.balign 4
89
-3:	
90
-	.word 0
91
-4:
92
-#endif
93
-	.balign 4
94
-elf_note_end:
95
-
96
-elf_start:
97
-	.code64
98
-	/* Reload the gdt to something I know */
99
-	leaq	_gdt(%rip), %rax
100
-	movq	%rax, 0x02 + gdtptr(%rip)
101
-	lgdt	gdtptr(%rip)
102
-
103
-	/* Enter 32bit compatibility mode */
104
-	leaq	elf_start32(%rip), %rax
105
-	movl	%eax, 0x00 + elf_start32_addr(%rip)
106
-	ljmp	*elf_start32_addr(%rip)
107
-
108
-elf_start32:	
109
-	.code32
110
-	/* Reload the data segments */
111
-	movl	$FLAT_DATA_SEG, %eax
112
-	movl	%eax, %ds
113
-	movl	%eax, %es
114
-	movl	%eax, %ss
115
-	
116
-	/* Disable paging */
117
-	movl	%cr0, %eax
118
-	andl	$~CR0_PG, %eax
119
-	movl	%eax, %cr0
120
-
121
-	/* Disable long mode */
122
-	movl	$MSR_K6_EFER, %ecx
123
-	rdmsr
124
-	andl	$~EFER_LME, %eax
125
-	wrmsr
126
-
127
-	/* Disable PAE */
128
-	movl	%cr4, %eax
129
-	andl	$~X86_CR4_PAE, %eax
130
-	movl	%eax, %cr4
131
-
132
-	/* Save the first argument */
133
-	pushl	%ebx
134
-	jmp	_start
135
-
136
-gdtptr:	
137
-	.word	_gdt_end - _gdt -1
138
-	.long	_gdt
139
-	.long	0
140
-_gdt:
141
-elf_start32_addr:
142
-	.long	elf_start32
143
-	.long	FLAT_CODE_SEG
144
-_pmcs:
145
-	/* 32 bit protected mode code segment, base 0 */
146
-	.word	0xffff,0
147
-	.byte	0,0x9f,0xcf,0
148
-
149
-_pmds:
150
-	/* 32 bit protected mode data segment, base 0 */
151
-	.word	0xffff,0
152
-	.byte	0,0x93,0xcf,0
153
-_gdt_end:	
154
-
155
-
156
-	/* Dummy routines to satisfy the build */
157
-	.section ".text16", "ax", @progbits
158
-prefix_exit:
159
-
160
-prefix_exit_end:
161
-	.previous

+ 0
- 161
src/arch/i386/prefix/lmelf_prefix.S View File

@@ -1,161 +0,0 @@
1
-#include "elf.h"
2
-	.arch sledgehammer
3
-	.code32
4
-	.equ	FLAT_CODE_SEG,_pmcs-_gdt
5
-	.equ	FLAT_DATA_SEG,_pmds-_gdt
6
-	.equ	MSR_K6_EFER,   0xC0000080
7
-	.equ	EFER_LME,      0x00000100
8
-	.equ	X86_CR4_PAE,   0x00000020
9
-	.equ	CR0_PG,        0x80000000
10
-
11
-	.section ".prefix", "ax", @progbits
12
-
13
-#define LOAD_ADDR 0x10000
14
-		
15
-	/* ELF Header */
16
-	.globl elf_header
17
-elf_header:	
18
-e_ident:	.byte	0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
19
-e_type:		.short	ET_EXEC
20
-e_machine:	.short	EM_X86_64
21
-e_version:	.long	1
22
-e_entry:	.long	LOAD_ADDR + elf_start - elf_header
23
-e_phoff:	.long	elf_program_header - elf_header
24
-e_shoff:	.long	0
25
-e_flags:	.long	0
26
-e_ehsize:	.short	elf_header_end - elf_header
27
-e_phentsize:	.short	ELF32_PHDR_SIZE
28
-e_phnum:	.short	(elf_program_header_end - elf_program_header)/ELF32_PHDR_SIZE
29
-e_shentsize:	.short	0
30
-e_shnum:	.short	0
31
-e_shstrndx:	.short	0
32
-elf_header_end:
33
-	
34
-elf_program_header:
35
-phdr1_p_type:	.long	PT_NOTE
36
-phdr1_p_offset:	.long	elf_note - elf_header
37
-phdr1_p_vaddr:	.long	elf_note
38
-phdr1_p_paddr:	.long	elf_note
39
-phdr1_p_filesz:	.long	elf_note_end - elf_note
40
-phdr1_p_memsz:	.long	elf_note_end - elf_note
41
-phdr1_p_flags:	.long	PF_R | PF_W | PF_X
42
-phdr1_p_align:	.long	0
43
-
44
-/* The decompressor */
45
-phdr2_p_type:	.long	PT_LOAD
46
-phdr2_p_offset:	.long	0
47
-phdr2_p_vaddr:	.long	elf_header
48
-phdr2_p_paddr:	.long	LOAD_ADDR
49
-phdr2_p_filesz:	.long	_verbatim_size
50
-phdr2_p_memsz:	.long	_image_size
51
-phdr2_p_flags:	.long	PF_R | PF_W | PF_X
52
-phdr2_p_align:	.long	16
53
-
54
-elf_program_header_end:
55
-
56
-	.globl elf_note
57
-elf_note:
58
-	.balign 4
59
-	.int 2f - 1f
60
-	.int 4f - 3f
61
-	.int EIN_PROGRAM_NAME
62
-1:	.asciz "ELFBoot"
63
-2:
64
-	.balign 4
65
-3:	
66
-	.asciz "Etherboot"
67
-4:
68
-
69
-
70
-	.balign 4
71
-	.int 2f - 1f
72
-	.int 4f - 3f
73
-	.int EIN_PROGRAM_VERSION
74
-1:	.asciz "ELFBoot"
75
-2:
76
-	.balign 4
77
-3:	
78
-	.asciz VERSION
79
-4:
80
-
81
-#if 0
82
-	.balign 4
83
-	.int 2f - 1f
84
-	.int 4f - 3f
85
-	.int EIN_PROGRAM_CHECKSUM
86
-1:	.asciz "ELFBoot"
87
-2:
88
-	.balign 4
89
-3:	
90
-	.word 0
91
-4:
92
-#endif
93
-	.balign 4
94
-elf_note_end:
95
-
96
-elf_start:
97
-	.code64
98
-	/* Reload the gdt to something I know */
99
-	leaq	_gdt(%rip), %rax
100
-	movq	%rax, 0x02 + gdtptr(%rip)
101
-	lgdt	gdtptr(%rip)
102
-
103
-	/* Enter 32bit compatibility mode */
104
-	leaq	elf_start32(%rip), %rax
105
-	movl	%eax, 0x00 + elf_start32_addr(%rip)
106
-	ljmp	*elf_start32_addr(%rip)
107
-
108
-elf_start32:	
109
-	.code32
110
-	/* Reload the data segments */
111
-	movl	$FLAT_DATA_SEG, %eax
112
-	movl	%eax, %ds
113
-	movl	%eax, %es
114
-	movl	%eax, %ss
115
-	
116
-	/* Disable paging */
117
-	movl	%cr0, %eax
118
-	andl	$~CR0_PG, %eax
119
-	movl	%eax, %cr0
120
-
121
-	/* Disable long mode */
122
-	movl	$MSR_K6_EFER, %ecx
123
-	rdmsr
124
-	andl	$~EFER_LME, %eax
125
-	wrmsr
126
-
127
-	/* Disable PAE */
128
-	movl	%cr4, %eax
129
-	andl	$~X86_CR4_PAE, %eax
130
-	movl	%eax, %cr4
131
-
132
-	/* Save the first argument */
133
-	pushl	%ebx
134
-	jmp	_start
135
-
136
-gdtptr:	
137
-	.word	_gdt_end - _gdt -1
138
-	.long	_gdt
139
-	.long	0
140
-_gdt:
141
-elf_start32_addr:
142
-	.long	elf_start32
143
-	.long	FLAT_CODE_SEG
144
-_pmcs:
145
-	/* 32 bit protected mode code segment, base 0 */
146
-	.word	0xffff,0
147
-	.byte	0,0x9f,0xcf,0
148
-
149
-_pmds:
150
-	/* 32 bit protected mode data segment, base 0 */
151
-	.word	0xffff,0
152
-	.byte	0,0x93,0xcf,0
153
-_gdt_end:	
154
-
155
-
156
-	/* Dummy routines to satisfy the build */
157
-	.section ".text16", "ax", @progbits
158
-prefix_exit:
159
-
160
-prefix_exit_end:
161
-	.previous

Loading…
Cancel
Save