Stefan Reinauer | 5f5436f | 2010-04-25 20:42:02 +0000 | [diff] [blame] | 1 | #include <cpu/x86/post_code.h> |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 2 | |
Aaron Durbin | 633f112 | 2013-02-06 15:28:40 -0600 | [diff] [blame] | 3 | /* Place the stack in the bss section. It's not necessary to define it in the |
| 4 | * the linker script. */ |
| 5 | .section .bss, "aw", @nobits |
| 6 | .global _stack |
| 7 | .global _estack |
| 8 | |
| 9 | .align CONFIG_STACK_SIZE |
| 10 | _stack: |
| 11 | .space CONFIG_MAX_CPUS*CONFIG_STACK_SIZE |
| 12 | _estack: |
Aaron Durbin | 38c326d | 2013-05-06 12:22:23 -0500 | [diff] [blame] | 13 | #if CONFIG_COOP_MULTITASKING |
| 14 | .global thread_stacks |
| 15 | thread_stacks: |
| 16 | .space CONFIG_STACK_SIZE*CONFIG_NUM_THREADS |
| 17 | #endif |
Aaron Durbin | 633f112 | 2013-02-06 15:28:40 -0600 | [diff] [blame] | 18 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 19 | .section ".text._start", "ax", @progbits |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 20 | .code32 |
| 21 | .globl _start |
Aaron Durbin | 3eb8eb7 | 2014-03-10 16:13:58 -0500 | [diff] [blame] | 22 | .globl __rmodule_entry |
| 23 | __rmodule_entry: |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 24 | _start: |
| 25 | cli |
| 26 | lgdt %cs:gdtaddr |
| 27 | ljmp $0x10, $1f |
| 28 | 1: movl $0x18, %eax |
| 29 | movl %eax, %ds |
| 30 | movl %eax, %es |
| 31 | movl %eax, %ss |
| 32 | movl %eax, %fs |
| 33 | movl %eax, %gs |
| 34 | |
Alexandru Gagniuc | 5005bb06 | 2011-04-11 20:17:22 +0000 | [diff] [blame] | 35 | post_code(POST_ENTRY_C_START) /* post 13 */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 36 | |
arch import user (historical) | 6ca7636 | 2005-07-06 17:17:25 +0000 | [diff] [blame] | 37 | cld |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 38 | |
Aaron Durbin | 633f112 | 2013-02-06 15:28:40 -0600 | [diff] [blame] | 39 | /** poison the stack. Code should not count on the |
| 40 | * stack being full of zeros. This stack poisoning |
| 41 | * recently uncovered a bug in the broadcast SIPI |
| 42 | * code. |
| 43 | */ |
| 44 | leal _stack, %edi |
| 45 | movl $_estack, %ecx |
| 46 | subl %edi, %ecx |
| 47 | shrl $2, %ecx /* it is 32 bit aligned, right? */ |
| 48 | movl $0xDEADBEEF, %eax |
| 49 | rep |
| 50 | stosl |
| 51 | |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 52 | /* set new stack */ |
| 53 | movl $_estack, %esp |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 54 | |
Aaron Durbin | 38c326d | 2013-05-06 12:22:23 -0500 | [diff] [blame] | 55 | #if CONFIG_COOP_MULTITASKING |
| 56 | /* Push the thread pointer. */ |
| 57 | pushl $0 |
| 58 | #endif |
Eric Biederman | b78c197 | 2004-10-14 20:54:17 +0000 | [diff] [blame] | 59 | /* Push the cpu index and struct cpu */ |
| 60 | pushl $0 |
| 61 | pushl $0 |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 62 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 63 | /* Initialize the Interrupt Descriptor table */ |
| 64 | leal _idt, %edi |
| 65 | leal vec0, %ebx |
| 66 | movl $(0x10 << 16), %eax /* cs selector */ |
| 67 | |
| 68 | 1: movw %bx, %ax |
| 69 | movl %ebx, %edx |
| 70 | movw $0x8E00, %dx /* Interrupt gate - dpl=0, present */ |
| 71 | movl %eax, 0(%edi) |
| 72 | movl %edx, 4(%edi) |
| 73 | addl $6, %ebx |
| 74 | addl $8, %edi |
| 75 | cmpl $_idt_end, %edi |
| 76 | jne 1b |
| 77 | |
| 78 | /* Load the Interrupt descriptor table */ |
| 79 | lidt idtarg |
| 80 | |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 81 | /* |
| 82 | * Now we are finished. Memory is up, data is copied and |
| 83 | * bss is cleared. Now we call the main routine and |
| 84 | * let it do the rest. |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 85 | */ |
Alexandru Gagniuc | 5005bb06 | 2011-04-11 20:17:22 +0000 | [diff] [blame] | 86 | post_code(POST_PRE_HARDWAREMAIN) /* post fe */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 87 | |
Stefan Reinauer | 8ada152 | 2012-11-16 13:34:48 -0800 | [diff] [blame] | 88 | #if CONFIG_GDB_WAIT |
Kyösti Mälkki | f2f7f03 | 2014-04-04 15:05:28 +0300 | [diff] [blame] | 89 | call gdb_hw_init |
Denis 'GNUtoo' Carikli | e4cece0 | 2012-06-22 15:56:37 +0200 | [diff] [blame] | 90 | call gdb_stub_breakpoint |
| 91 | #endif |
Stefan Reinauer | 6adef08 | 2013-05-09 16:30:06 -0700 | [diff] [blame] | 92 | call main |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 93 | /* NOTREACHED */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 94 | .Lhlt: |
Alexandru Gagniuc | 5005bb06 | 2011-04-11 20:17:22 +0000 | [diff] [blame] | 95 | post_code(POST_DEAD_CODE) /* post ee */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 96 | hlt |
| 97 | jmp .Lhlt |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 98 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 99 | vec0: |
| 100 | pushl $0 /* error code */ |
| 101 | pushl $0 /* vector */ |
| 102 | jmp int_hand |
| 103 | vec1: |
| 104 | pushl $0 /* error code */ |
| 105 | pushl $1 /* vector */ |
| 106 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 107 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 108 | vec2: |
| 109 | pushl $0 /* error code */ |
| 110 | pushl $2 /* vector */ |
| 111 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 112 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 113 | vec3: |
| 114 | pushl $0 /* error code */ |
| 115 | pushl $3 /* vector */ |
| 116 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 117 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 118 | vec4: |
| 119 | pushl $0 /* error code */ |
| 120 | pushl $4 /* vector */ |
| 121 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 122 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 123 | vec5: |
| 124 | pushl $0 /* error code */ |
| 125 | pushl $5 /* vector */ |
| 126 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 127 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 128 | vec6: |
| 129 | pushl $0 /* error code */ |
| 130 | pushl $6 /* vector */ |
| 131 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 132 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 133 | vec7: |
| 134 | pushl $0 /* error code */ |
| 135 | pushl $7 /* vector */ |
| 136 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 137 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 138 | vec8: |
| 139 | /* error code */ |
| 140 | pushl $8 /* vector */ |
| 141 | jmp int_hand |
| 142 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 143 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 144 | vec9: |
| 145 | pushl $0 /* error code */ |
| 146 | pushl $9 /* vector */ |
| 147 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 148 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 149 | vec10: |
| 150 | /* error code */ |
| 151 | pushl $10 /* vector */ |
| 152 | jmp int_hand |
| 153 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 154 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 155 | vec11: |
| 156 | /* error code */ |
| 157 | pushl $11 /* vector */ |
| 158 | jmp int_hand |
| 159 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 160 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 161 | vec12: |
| 162 | /* error code */ |
| 163 | pushl $12 /* vector */ |
| 164 | jmp int_hand |
| 165 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 166 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 167 | vec13: |
| 168 | /* error code */ |
| 169 | pushl $13 /* vector */ |
| 170 | jmp int_hand |
| 171 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 172 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 173 | vec14: |
| 174 | /* error code */ |
| 175 | pushl $14 /* vector */ |
| 176 | jmp int_hand |
| 177 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 178 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 179 | vec15: |
| 180 | pushl $0 /* error code */ |
| 181 | pushl $15 /* vector */ |
| 182 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 183 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 184 | vec16: |
| 185 | pushl $0 /* error code */ |
| 186 | pushl $16 /* vector */ |
| 187 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 188 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 189 | vec17: |
| 190 | /* error code */ |
| 191 | pushl $17 /* vector */ |
| 192 | jmp int_hand |
| 193 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 194 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 195 | vec18: |
| 196 | pushl $0 /* error code */ |
| 197 | pushl $18 /* vector */ |
| 198 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 199 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 200 | vec19: |
| 201 | pushl $0 /* error code */ |
| 202 | pushl $19 /* vector */ |
| 203 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 204 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 205 | int_hand: |
| 206 | /* At this point on the stack there is: |
| 207 | * 0(%esp) vector |
| 208 | * 4(%esp) error code |
| 209 | * 8(%esp) eip |
| 210 | * 12(%esp) cs |
| 211 | * 16(%esp) eflags |
| 212 | */ |
| 213 | pushl %edi |
| 214 | pushl %esi |
| 215 | pushl %ebp |
| 216 | /* Original stack pointer */ |
| 217 | leal 32(%esp), %ebp |
| 218 | pushl %ebp |
| 219 | pushl %ebx |
| 220 | pushl %edx |
| 221 | pushl %ecx |
| 222 | pushl %eax |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 223 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 224 | pushl %esp /* Pointer to structure on the stack */ |
| 225 | call x86_exception |
| 226 | pop %eax /* Drop the pointer */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 227 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 228 | popl %eax |
| 229 | popl %ecx |
| 230 | popl %edx |
| 231 | popl %ebx |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 232 | popl %ebp /* Ignore saved %esp value */ |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 233 | popl %ebp |
| 234 | popl %esi |
| 235 | popl %edi |
| 236 | |
| 237 | addl $8, %esp /* pop of the vector and error code */ |
| 238 | |
| 239 | iret |
| 240 | |
Stefan Reinauer | 8ada152 | 2012-11-16 13:34:48 -0800 | [diff] [blame] | 241 | #if CONFIG_GDB_WAIT |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 242 | |
| 243 | .globl gdb_stub_breakpoint |
| 244 | gdb_stub_breakpoint: |
| 245 | popl %eax /* Return address */ |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 246 | pushfl |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 247 | pushl %cs |
| 248 | pushl %eax /* Return address */ |
| 249 | pushl $0 /* No error code */ |
| 250 | pushl $32 /* vector 32 is user defined */ |
| 251 | jmp int_hand |
| 252 | |
| 253 | #endif |
| 254 | |
Aaron Durbin | a146d58 | 2013-02-08 16:56:51 -0600 | [diff] [blame] | 255 | .globl gdt, gdt_end, idtarg |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 256 | |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 257 | gdtaddr: |
Aaron Durbin | a146d58 | 2013-02-08 16:56:51 -0600 | [diff] [blame] | 258 | .word gdt_end - gdt - 1 |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 259 | .long gdt /* we know the offset */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 260 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 261 | .data |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 262 | |
Stefan Reinauer | f8ee180 | 2008-01-18 15:08:58 +0000 | [diff] [blame] | 263 | /* This is the gdt for GCC part of coreboot. |
| 264 | * It is different from the gdt in ROMCC/ASM part of coreboot |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 265 | * which is defined in entry32.inc |
| 266 | * |
| 267 | * When the machine is initially started, we use a very simple |
| 268 | * gdt from rom (that in entry32.inc) which only contains those |
| 269 | * entries we need for protected mode. |
| 270 | * |
| 271 | * When we're executing code from RAM, we want to do more complex |
| 272 | * stuff, like initializing PCI option roms in real mode, or doing |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 273 | * a resume from a suspend to ram. |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 274 | */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 275 | gdt: |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 276 | /* selgdt 0, unused */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 277 | .word 0x0000, 0x0000 /* dummy */ |
| 278 | .byte 0x00, 0x00, 0x00, 0x00 |
| 279 | |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 280 | /* selgdt 8, unused */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 281 | .word 0x0000, 0x0000 /* dummy */ |
| 282 | .byte 0x00, 0x00, 0x00, 0x00 |
| 283 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 284 | /* selgdt 0x10, flat code segment */ |
| 285 | .word 0xffff, 0x0000 |
| 286 | .byte 0x00, 0x9b, 0xcf, 0x00 /* G=1 and 0x0f, So we get 4Gbytes for limit */ |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 287 | |
| 288 | /* selgdt 0x18, flat data segment */ |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 289 | .word 0xffff, 0x0000 |
| 290 | .byte 0x00, 0x93, 0xcf, 0x00 |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 291 | |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 292 | /* selgdt 0x20, unused */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 293 | .word 0x0000, 0x0000 /* dummy */ |
| 294 | .byte 0x00, 0x00, 0x00, 0x00 |
| 295 | |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 296 | /* The next two entries are used for executing VGA option ROMs */ |
| 297 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 298 | /* selgdt 0x28 16 bit 64k code at 0x00000000 */ |
Stefan Reinauer | f8a5c6e | 2009-05-29 13:08:27 +0000 | [diff] [blame] | 299 | .word 0xffff, 0x0000 |
| 300 | .byte 0, 0x9a, 0, 0 |
| 301 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 302 | /* selgdt 0x30 16 bit 64k data at 0x00000000 */ |
Stefan Reinauer | f8a5c6e | 2009-05-29 13:08:27 +0000 | [diff] [blame] | 303 | .word 0xffff, 0x0000 |
| 304 | .byte 0, 0x92, 0, 0 |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 305 | |
| 306 | /* The next two entries are used for ACPI S3 RESUME */ |
| 307 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 308 | /* selgdt 0x38, flat data segment 16 bit */ |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 309 | .word 0x0000, 0x0000 /* dummy */ |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 310 | .byte 0x00, 0x93, 0x8f, 0x00 /* G=1 and 0x0f, So we get 4Gbytes for limit */ |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 311 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 312 | /* selgdt 0x40, flat code segment 16 bit */ |
| 313 | .word 0xffff, 0x0000 |
| 314 | .byte 0x00, 0x9b, 0x8f, 0x00 /* G=1 and 0x0f, So we get 4Gbytes for limit */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 315 | gdt_end: |
| 316 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 317 | idtarg: |
| 318 | .word _idt_end - _idt - 1 /* limit */ |
| 319 | .long _idt |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 320 | .word 0 |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 321 | _idt: |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 322 | .fill 20, 8, 0 # idt is uninitialized |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 323 | _idt_end: |
| 324 | |
| 325 | .previous |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 326 | .code32 |