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 | |
Aaron Durbin | 0135702 | 2013-03-22 20:23:17 -0500 | [diff] [blame] | 19 | .section ".textfirst", "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 |
Denis 'GNUtoo' Carikli | e4cece0 | 2012-06-22 15:56:37 +0200 | [diff] [blame] | 89 | call gdb_stub_breakpoint |
| 90 | #endif |
Stefan Reinauer | 6adef08 | 2013-05-09 16:30:06 -0700 | [diff] [blame] | 91 | call main |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 92 | /* NOTREACHED */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 93 | .Lhlt: |
Alexandru Gagniuc | 5005bb06 | 2011-04-11 20:17:22 +0000 | [diff] [blame] | 94 | post_code(POST_DEAD_CODE) /* post ee */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 95 | hlt |
| 96 | jmp .Lhlt |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 97 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 98 | vec0: |
| 99 | pushl $0 /* error code */ |
| 100 | pushl $0 /* vector */ |
| 101 | jmp int_hand |
| 102 | vec1: |
| 103 | pushl $0 /* error code */ |
| 104 | pushl $1 /* vector */ |
| 105 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 106 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 107 | vec2: |
| 108 | pushl $0 /* error code */ |
| 109 | pushl $2 /* vector */ |
| 110 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 111 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 112 | vec3: |
| 113 | pushl $0 /* error code */ |
| 114 | pushl $3 /* vector */ |
| 115 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 116 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 117 | vec4: |
| 118 | pushl $0 /* error code */ |
| 119 | pushl $4 /* vector */ |
| 120 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 121 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 122 | vec5: |
| 123 | pushl $0 /* error code */ |
| 124 | pushl $5 /* vector */ |
| 125 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 126 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 127 | vec6: |
| 128 | pushl $0 /* error code */ |
| 129 | pushl $6 /* vector */ |
| 130 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 131 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 132 | vec7: |
| 133 | pushl $0 /* error code */ |
| 134 | pushl $7 /* vector */ |
| 135 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 136 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 137 | vec8: |
| 138 | /* error code */ |
| 139 | pushl $8 /* vector */ |
| 140 | jmp int_hand |
| 141 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 142 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 143 | vec9: |
| 144 | pushl $0 /* error code */ |
| 145 | pushl $9 /* vector */ |
| 146 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 147 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 148 | vec10: |
| 149 | /* error code */ |
| 150 | pushl $10 /* vector */ |
| 151 | jmp int_hand |
| 152 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 153 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 154 | vec11: |
| 155 | /* error code */ |
| 156 | pushl $11 /* vector */ |
| 157 | jmp int_hand |
| 158 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 159 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 160 | vec12: |
| 161 | /* error code */ |
| 162 | pushl $12 /* vector */ |
| 163 | jmp int_hand |
| 164 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 165 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 166 | vec13: |
| 167 | /* error code */ |
| 168 | pushl $13 /* vector */ |
| 169 | jmp int_hand |
| 170 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 171 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 172 | vec14: |
| 173 | /* error code */ |
| 174 | pushl $14 /* vector */ |
| 175 | jmp int_hand |
| 176 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 177 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 178 | vec15: |
| 179 | pushl $0 /* error code */ |
| 180 | pushl $15 /* vector */ |
| 181 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 182 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 183 | vec16: |
| 184 | pushl $0 /* error code */ |
| 185 | pushl $16 /* vector */ |
| 186 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 187 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 188 | vec17: |
| 189 | /* error code */ |
| 190 | pushl $17 /* vector */ |
| 191 | jmp int_hand |
| 192 | .word 0x9090 |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 193 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 194 | vec18: |
| 195 | pushl $0 /* error code */ |
| 196 | pushl $18 /* vector */ |
| 197 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 198 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 199 | vec19: |
| 200 | pushl $0 /* error code */ |
| 201 | pushl $19 /* vector */ |
| 202 | jmp int_hand |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 203 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 204 | int_hand: |
| 205 | /* At this point on the stack there is: |
| 206 | * 0(%esp) vector |
| 207 | * 4(%esp) error code |
| 208 | * 8(%esp) eip |
| 209 | * 12(%esp) cs |
| 210 | * 16(%esp) eflags |
| 211 | */ |
| 212 | pushl %edi |
| 213 | pushl %esi |
| 214 | pushl %ebp |
| 215 | /* Original stack pointer */ |
| 216 | leal 32(%esp), %ebp |
| 217 | pushl %ebp |
| 218 | pushl %ebx |
| 219 | pushl %edx |
| 220 | pushl %ecx |
| 221 | pushl %eax |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 222 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 223 | pushl %esp /* Pointer to structure on the stack */ |
| 224 | call x86_exception |
| 225 | pop %eax /* Drop the pointer */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 226 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 227 | popl %eax |
| 228 | popl %ecx |
| 229 | popl %edx |
| 230 | popl %ebx |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 231 | popl %ebp /* Ignore saved %esp value */ |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 232 | popl %ebp |
| 233 | popl %esi |
| 234 | popl %edi |
| 235 | |
| 236 | addl $8, %esp /* pop of the vector and error code */ |
| 237 | |
| 238 | iret |
| 239 | |
Stefan Reinauer | 8ada152 | 2012-11-16 13:34:48 -0800 | [diff] [blame] | 240 | #if CONFIG_GDB_WAIT |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 241 | |
| 242 | .globl gdb_stub_breakpoint |
| 243 | gdb_stub_breakpoint: |
| 244 | popl %eax /* Return address */ |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 245 | pushfl |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 246 | pushl %cs |
| 247 | pushl %eax /* Return address */ |
| 248 | pushl $0 /* No error code */ |
| 249 | pushl $32 /* vector 32 is user defined */ |
| 250 | jmp int_hand |
| 251 | |
| 252 | #endif |
| 253 | |
Aaron Durbin | a146d58 | 2013-02-08 16:56:51 -0600 | [diff] [blame] | 254 | .globl gdt, gdt_end, idtarg |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 255 | |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 256 | gdtaddr: |
Aaron Durbin | a146d58 | 2013-02-08 16:56:51 -0600 | [diff] [blame] | 257 | .word gdt_end - gdt - 1 |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 258 | .long gdt /* we know the offset */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 259 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 260 | .data |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 261 | |
Stefan Reinauer | f8ee180 | 2008-01-18 15:08:58 +0000 | [diff] [blame] | 262 | /* This is the gdt for GCC part of coreboot. |
| 263 | * It is different from the gdt in ROMCC/ASM part of coreboot |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 264 | * which is defined in entry32.inc |
| 265 | * |
| 266 | * When the machine is initially started, we use a very simple |
| 267 | * gdt from rom (that in entry32.inc) which only contains those |
| 268 | * entries we need for protected mode. |
| 269 | * |
| 270 | * When we're executing code from RAM, we want to do more complex |
| 271 | * stuff, like initializing PCI option roms in real mode, or doing |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 272 | * a resume from a suspend to ram. |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 273 | */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 274 | gdt: |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 275 | /* selgdt 0, unused */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 276 | .word 0x0000, 0x0000 /* dummy */ |
| 277 | .byte 0x00, 0x00, 0x00, 0x00 |
| 278 | |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 279 | /* selgdt 8, unused */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 280 | .word 0x0000, 0x0000 /* dummy */ |
| 281 | .byte 0x00, 0x00, 0x00, 0x00 |
| 282 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 283 | /* selgdt 0x10, flat code segment */ |
| 284 | .word 0xffff, 0x0000 |
| 285 | .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] | 286 | |
| 287 | /* selgdt 0x18, flat data segment */ |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 288 | .word 0xffff, 0x0000 |
| 289 | .byte 0x00, 0x93, 0xcf, 0x00 |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 290 | |
Li-Ta Lo | f84926e | 2004-11-04 18:36:06 +0000 | [diff] [blame] | 291 | /* selgdt 0x20, unused */ |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 292 | .word 0x0000, 0x0000 /* dummy */ |
| 293 | .byte 0x00, 0x00, 0x00, 0x00 |
| 294 | |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 295 | /* The next two entries are used for executing VGA option ROMs */ |
| 296 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 297 | /* selgdt 0x28 16 bit 64k code at 0x00000000 */ |
Stefan Reinauer | f8a5c6e | 2009-05-29 13:08:27 +0000 | [diff] [blame] | 298 | .word 0xffff, 0x0000 |
| 299 | .byte 0, 0x9a, 0, 0 |
| 300 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 301 | /* selgdt 0x30 16 bit 64k data at 0x00000000 */ |
Stefan Reinauer | f8a5c6e | 2009-05-29 13:08:27 +0000 | [diff] [blame] | 302 | .word 0xffff, 0x0000 |
| 303 | .byte 0, 0x92, 0, 0 |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 304 | |
| 305 | /* The next two entries are used for ACPI S3 RESUME */ |
| 306 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 307 | /* selgdt 0x38, flat data segment 16 bit */ |
Stefan Reinauer | c0ac7e9 | 2009-11-10 22:17:15 +0000 | [diff] [blame] | 308 | .word 0x0000, 0x0000 /* dummy */ |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 309 | .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] | 310 | |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 311 | /* selgdt 0x40, flat code segment 16 bit */ |
| 312 | .word 0xffff, 0x0000 |
| 313 | .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] | 314 | gdt_end: |
| 315 | |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 316 | idtarg: |
| 317 | .word _idt_end - _idt - 1 /* limit */ |
| 318 | .long _idt |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 319 | .word 0 |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 320 | _idt: |
Stefan Reinauer | 607cdf6 | 2010-04-26 12:08:51 +0000 | [diff] [blame] | 321 | .fill 20, 8, 0 # idt is uninitialized |
Eric Biederman | f8a2ddd | 2004-10-30 08:05:41 +0000 | [diff] [blame] | 322 | _idt_end: |
| 323 | |
| 324 | .previous |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 325 | .code32 |