Commit 1a820802 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] export boottime gdt descriptor

Patch from Andrey Panin <pazke@orbita1.ru>

This simple patch exports boottime gdt descriptor from trampoline.S.
Visws uses it to initialize bootup cpu before running the rest of head.S
parent f9822eca
...@@ -46,8 +46,8 @@ r_base = . ...@@ -46,8 +46,8 @@ r_base = .
movl $0xA5A5A5A5, trampoline_data - r_base movl $0xA5A5A5A5, trampoline_data - r_base
# write marker for master knows we're running # write marker for master knows we're running
lidt idt_48 - r_base # load idt with 0, 0 lidt boot_idt - r_base # load idt with 0, 0
lgdt gdt_48 - r_base # load gdt with whatever is appropriate lgdt boot_gdt - r_base # load gdt with whatever is appropriate
xor %ax, %ax xor %ax, %ax
inc %ax # protected mode (PE) bit inc %ax # protected mode (PE) bit
...@@ -57,7 +57,7 @@ flush_instr: ...@@ -57,7 +57,7 @@ flush_instr:
ljmpl $__BOOT_CS, $0x00100000 ljmpl $__BOOT_CS, $0x00100000
# jump to startup_32 in arch/i386/kernel/head.S # jump to startup_32 in arch/i386/kernel/head.S
idt_48: boot_idt:
.word 0 # idt limit = 0 .word 0 # idt limit = 0
.word 0, 0 # idt base = 0L .word 0, 0 # idt base = 0L
...@@ -65,8 +65,7 @@ idt_48: ...@@ -65,8 +65,7 @@ idt_48:
# NOTE: here we actually use CPU#0's GDT - but that is OK, we reload # NOTE: here we actually use CPU#0's GDT - but that is OK, we reload
# the proper GDT shortly after booting up the secondary CPUs. # the proper GDT shortly after booting up the secondary CPUs.
# #
ENTRY(boot_gdt)
gdt_48:
.word __BOOT_DS + 7 # gdt limit .word __BOOT_DS + 7 # gdt limit
.long boot_gdt_table-__PAGE_OFFSET # gdt base = gdt (first SMP CPU) .long boot_gdt_table-__PAGE_OFFSET # gdt base = gdt (first SMP CPU)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment