2 #include <arch/intel.h>
18 intel_chip_post_macro(0x13) /* post 13 */
25 shrl $2, %ecx /* it is 32 bit align, right? */
35 shrl $2, %ecx /* it is 32 bit align, right? */
44 /* Push the cpu index and struct cpu */
48 /* push the boot_complete flag */
51 /* Save the stack location */
54 /* Initialize the Interrupt Descriptor table */
57 movl $(0x10 << 16), %eax /* cs selector */
61 movw $0x8E00, %dx /* Interrupt gate - dpl=0, present */
69 /* Load the Interrupt descriptor table */
73 * Now we are finished. Memory is up, data is copied and
74 * bss is cleared. Now we call the main routine and
77 intel_chip_post_macro(0xfe) /* post fe */
79 /* Restore the stack location */
82 /* The boot_complete flag has already been pushed */
86 intel_chip_post_macro(0xee) /* post ee */
91 pushl $0 /* error code */
95 pushl $0 /* error code */
100 pushl $0 /* error code */
101 pushl $2 /* vector */
105 pushl $0 /* error code */
106 pushl $3 /* vector */
110 pushl $0 /* error code */
111 pushl $4 /* vector */
115 pushl $0 /* error code */
116 pushl $5 /* vector */
120 pushl $0 /* error code */
121 pushl $6 /* vector */
125 pushl $0 /* error code */
126 pushl $7 /* vector */
131 pushl $8 /* vector */
136 pushl $0 /* error code */
137 pushl $9 /* vector */
142 pushl $10 /* vector */
148 pushl $11 /* vector */
154 pushl $12 /* vector */
160 pushl $13 /* vector */
166 pushl $14 /* vector */
171 pushl $0 /* error code */
172 pushl $15 /* vector */
176 pushl $0 /* error code */
177 pushl $16 /* vector */
182 pushl $17 /* vector */
187 pushl $0 /* error code */
188 pushl $18 /* vector */
192 pushl $0 /* error code */
193 pushl $19 /* vector */
196 /* At this point on the stack there is:
206 /* Original stack pointer */
214 pushl %esp /* Pointer to structure on the stack */
216 pop %eax /* Drop the pointer */
222 popl %ebp /* Ignore saved %esp value */
227 addl $8, %esp /* pop of the vector and error code */
231 #if CONFIG_GDB_STUB == 1
233 .globl gdb_stub_breakpoint
235 popl %eax /* Return address */
238 pushl %eax /* Return address */
239 pushl $0 /* No error code */
240 pushl $32 /* vector 32 is user defined */
245 .globl gdt, gdt_end, gdt_limit, idtarg
247 gdt_limit = gdt_end - gdt - 1 /* compute the table limit */
250 .long gdt /* we know the offset */
254 /* This is the gdt for GCC part of LinuxBIOS.
255 * It is different from the gdt in ROMCC/ASM part of LinuxBIOS
256 * which is defined in entry32.inc */
258 /* selgdt 0, unused */
259 .word 0x0000, 0x0000 /* dummy */
260 .byte 0x00, 0x00, 0x00, 0x00
262 /* selgdt 8, unused */
263 .word 0x0000, 0x0000 /* dummy */
264 .byte 0x00, 0x00, 0x00, 0x00
266 /* selgdt 0x10, flat code segment */
268 .byte 0x00, 0x9b, 0xcf, 0x00
270 /* selgdt 0x18, flat data segment */
272 .byte 0x00, 0x93, 0xcf, 0x00
274 /* selgdt 0x20, unused */
275 .word 0x0000, 0x0000 /* dummy */
276 .byte 0x00, 0x00, 0x00, 0x00
281 .word _idt_end - _idt - 1 /* limit */
285 .fill 20, 8, 0 # idt is unitiailzed