Changeset 1a67595 in mainline


Ignore:
Timestamp:
2006-01-08T15:18:15Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
59adc2b
Parents:
6d7ffa65
Message:

AMD64 PM initialization

Location:
arch/amd64
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/include/pm.h

    r6d7ffa65 r1a67595  
    147147extern struct ptr_16_64 gdtr;
    148148extern struct ptr_16_32 real_bootstrap_gdtr;
     149extern struct ptr_16_32 protected_bootstrap_gdtr;
    149150
    150151extern void pm_init(void);
  • arch/amd64/src/boot/boot.S

    r6d7ffa65 r1a67595  
    5050.code16
    5151.global kernel_image_start
     52.global multiboot_image_start
    5253kernel_image_start:
    5354        cli
     
    9697multiboot_image_start:
    9798        movl $START_STACK, %esp                         # initialize stack pointer
    98         # FIXME TODO
     99       
     100        lgdt protected_bootstrap_gdtr + BOOT_OFFSET             # initialize Global Descriptor Table register
     101
     102        movw $gdtselector(KDATA_DES), %cx
     103        movw %cx, %es
     104        movw %cx, %gs
     105        movw %cx, %fs
     106        movw %cx, %ds                                                   # kernel data + stack
     107        movw %cx, %ss
     108       
     109        jmpl $gdtselector(KTEXT_DES), $multiboot_meeting_point + BOOT_OFFSET
     110        multiboot_meeting_point:
     111       
     112        hlt
    99113
    100114# Protected 32-bit. We want to reuse the code-seg descriptor,
     
    209223        .word gdtselector(GDT_ITEMS)
    210224        .long KA2PA(gdt)-BOOT_OFFSET
     225
     226.global protected_bootstrap_gdtr
     227protected_bootstrap_gdtr:
     228        .word gdtselector(GDT_ITEMS)
     229        .long KA2PA(gdt)
Note: See TracChangeset for help on using the changeset viewer.