Browse Source

Update all prefixes currently referring to _load_size to include a

compressor fixup section.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
84551d485e

+ 9
- 4
src/arch/i386/prefix/dskprefix.S View File

1
 /* NOTE: this boot sector contains instructions that need at least an 80186.
1
 /* NOTE: this boot sector contains instructions that need at least an 80186.
2
  * Yes, as86 has a bug somewhere in the valid instruction set checks.
2
  * Yes, as86 has a bug somewhere in the valid instruction set checks.
3
  *
3
  *
4
- * SYS_SIZE is the number of clicks (16 bytes) to be loaded.
5
  */
4
  */
6
-.globl	SYSSIZE
7
-.equ	SYSSIZE, _load_size_pgh
8
 
5
 
9
 /*	floppyload.S Copyright (C) 1991, 1992 Linus Torvalds
6
 /*	floppyload.S Copyright (C) 1991, 1992 Linus Torvalds
10
  *	modified by Drew Eckhardt
7
  *	modified by Drew Eckhardt
147
 	/* Jump to loaded copy */
144
 	/* Jump to loaded copy */
148
 	ljmp	$SYSSEG, $start_runtime
145
 	ljmp	$SYSSEG, $start_runtime
149
 
146
 
147
+endseg:	.word SYSSEG + _load_size_pgh
148
+	.section ".zinfo.fixup", "a"	/* Compressor fixup information */
149
+	.ascii	"SUBW"
150
+	.long	endseg
151
+	.long	16
152
+	.long	0
153
+	.previous
154
+
150
 /* This routine loads the system at address SYSSEG<<4, making sure no 64kB
155
 /* This routine loads the system at address SYSSEG<<4, making sure no 64kB
151
  * boundaries are crossed. We try to load it as fast as possible, loading whole
156
  * boundaries are crossed. We try to load it as fast as possible, loading whole
152
  * tracks whenever we can.
157
  * tracks whenever we can.
165
 	movb	$4, %cl
170
 	movb	$4, %cl
166
 	shrw	%cl,%dx			/* bx is always divisible by 16 */
171
 	shrw	%cl,%dx			/* bx is always divisible by 16 */
167
 	addw	%dx,%ax
172
 	addw	%dx,%ax
168
-	cmpw	$SYSSEG+SYSSIZE, %ax	/* have we loaded all yet? */
173
+	cmpw	endseg, %ax	/* have we loaded all yet? */
169
 	jb	ok1_read
174
 	jb	ok1_read
170
 	ret
175
 	ret
171
 ok1_read: 
176
 ok1_read: 

+ 10
- 2
src/arch/i386/prefix/hdprefix.S View File

58
 	ja	1b
58
 	ja	1b
59
 	ljmp	$BOOT_SEG, $start_image
59
 	ljmp	$BOOT_SEG, $start_image
60
 
60
 
61
-load_length:
62
-	.long	_load_size_sect
63
 max_sector:
61
 max_sector:
64
 	.byte	0
62
 	.byte	0
65
 max_head:
63
 max_head:
66
 	.byte	0
64
 	.byte	0
65
+load_length:
66
+	.long	_load_size_sect
67
+	
68
+	.section ".zinfo.fixup", "a"	/* Compressor fixup information */
69
+	.ascii	"SUBL"
70
+	.long	load_length
71
+	.long	512
72
+	.long	0
73
+	.previous
74
+
67
 
75
 
68
 load_failed:
76
 load_failed:
69
 	movw	$10f, %si
77
 	movw	$10f, %si

+ 8
- 0
src/arch/i386/prefix/lkrnprefix.S View File

105
 
105
 
106
 
106
 
107
 	.org	512
107
 	.org	512
108
+
109
+	.section ".zinfo.fixup", "a"	/* Compressor fixup information */
110
+	.ascii	"SUBW"
111
+	.long	syssize
112
+	.long	16
113
+	.long	0
114
+	.previous
115
+	
108
 /*
116
 /*
109
 	We're now at the beginning of the second sector of the image -
117
 	We're now at the beginning of the second sector of the image -
110
 	where the setup code goes.
118
 	where the setup code goes.

+ 13
- 2
src/arch/i386/prefix/nbiprefix.S View File

32
 	.byte	0
32
 	.byte	0
33
 	.byte	0x04		/* Last segment */
33
 	.byte	0x04		/* Last segment */
34
 	.long	0x00007e00
34
 	.long	0x00007e00
35
-	.long	_load_size - 512
36
-	.long	_load_size - 512
35
+imglen:	.long	_load_size - 512
36
+memlen:	.long	_load_size - 512
37
 	.size	segment_header, . - segment_header
37
 	.size	segment_header, . - segment_header
38
 
38
 
39
+	.section ".zinfo.fixup", "a"	/* Compressor fixup information */
40
+	.ascii	"SUBL"
41
+	.long	imglen
42
+	.long	1
43
+	.long	0
44
+	.ascii	"SUBL"
45
+	.long	memlen
46
+	.long	1
47
+	.long	0
48
+	.previous
49
+
39
 /*****************************************************************************
50
 /*****************************************************************************
40
  * NBI entry point
51
  * NBI entry point
41
  *****************************************************************************
52
  *****************************************************************************

+ 15
- 13
src/arch/i386/prefix/romprefix.S View File

23
 	.org	0x1a
23
 	.org	0x1a
24
 	.word	pnpheader
24
 	.word	pnpheader
25
 	.size romheader, . - romheader
25
 	.size romheader, . - romheader
26
+	
27
+	.section ".zinfo.fixup", "a"	/* Compressor fixup information */
28
+	.ascii	"SUBB"
29
+	.long	romheader_size
30
+	.long	512
31
+	.long	0
32
+	.previous
26
 
33
 
27
 pciheader:
34
 pciheader:
28
 	.ascii	"PCIR"			/* Signature */
35
 	.ascii	"PCIR"			/* Signature */
41
 	.word	0x0000			/* reserved */
48
 	.word	0x0000			/* reserved */
42
 	.equ pciheader_len, . - pciheader
49
 	.equ pciheader_len, . - pciheader
43
 	.size pciheader, . - pciheader
50
 	.size pciheader, . - pciheader
51
+	
52
+	.section ".zinfo.fixup", "a"	/* Compressor fixup information */
53
+	.ascii	"SUBW"
54
+	.long	pciheader_size
55
+	.long	512
56
+	.long	0
57
+	.previous
44
 
58
 
45
 pnpheader:
59
 pnpheader:
46
 	.ascii	"$PnP"			/* Signature */
60
 	.ascii	"$PnP"			/* Signature */
124
 	.size notpnp_message, . - notpnp_message
138
 	.size notpnp_message, . - notpnp_message
125
 
139
 
126
 /* Boot execution vector
140
 /* Boot execution vector
127
- *
141
+ *pciheader_size
128
  * Called by the PnP BIOS when it wants to boot us, or via the hooked
142
  * Called by the PnP BIOS when it wants to boot us, or via the hooked
129
  * INT 19 if we detected a non-PnP BIOS.
143
  * INT 19 if we detected a non-PnP BIOS.
130
  */	
144
  */	
215
 	popw	%ax
229
 	popw	%ax
216
 	ret
230
 	ret
217
 	.size print_message, . - print_message
231
 	.size print_message, . - print_message
218
-
219
-
220
-	/* Data update information for the compressor */
221
-	.section ".zinfo.fixup", "a"
222
-	.ascii	"SUBB"
223
-	.long	romheader_size
224
-	.long	512
225
-	.long	0
226
-	.ascii	"SUBW"
227
-	.long	pciheader_size
228
-	.long	512
229
-	.long	0

+ 6
- 0
src/arch/i386/scripts/i386.lds View File

269
      */
269
      */
270
     _text16_size_pgh	= ( ( _text16_size + 15 ) / 16 );
270
     _text16_size_pgh	= ( ( _text16_size + 15 ) / 16 );
271
     _data16_size_pgh	= ( ( _data16_size + 15 ) / 16 );
271
     _data16_size_pgh	= ( ( _data16_size + 15 ) / 16 );
272
+
273
+    /*
274
+     * Load sizes in paragraphs and sectors.  Note that wherever the
275
+     * _load_size variables are used, there must be a corresponding
276
+     * .zinfo.fixup section.
277
+     */
272
     _load_size_pgh	= ( ( _load_size + 15 ) / 16 );
278
     _load_size_pgh	= ( ( _load_size + 15 ) / 16 );
273
     _load_size_sect	= ( ( _load_size + 511 ) / 512 );
279
     _load_size_sect	= ( ( _load_size + 511 ) / 512 );
274
 }
280
 }

Loading…
Cancel
Save