Changeset 8ccec3c1 in mainline for arch/ia32/src/boot/boot.S


Ignore:
Timestamp:
2006-01-04T22:41:05Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45ba9cf
Parents:
a59e81e
Message:

remove deprecated pre-grub stuff on ia32
prepare for the same on amd64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/boot/boot.S

    ra59e81e r8ccec3c1  
    3333
    3434.section K_TEXT_START, "ax"
    35 .global kernel_image_start
    3635
    3736KTEXT=8
    3837KDATA=16
    3938
    40 .code16
    41 #
    42 # This is where we require any SPARTAN-kernel-compatible boot loader
    43 # to pass control in real mode.
    44 #
    45 # Protected mode tables are statically initialised during compile
    46 # time. So we can just load the respective table registers and
    47 # switch to protected mode.
    48 #
    49 kernel_image_start:
    50         cli
    51         xorw %ax, %ax
    52         movw %ax, %ds
    53         movw %ax, %es
    54         movw %ax, %ss                                                   # initialize stack segment register
    55         movl $BOOTSTRAP_OFFSET - 0x400, %esp                            # initialize stack pointer
    56        
    57         call memmap_arch_init
    58        
    59         lgdt real_bootstrap_gdtr_boot                                   # initialize Global Descriptor Table register
    60        
    61         movl %cr0, %eax
    62         orl $0x1, %eax
    63         movl %eax, %cr0                                                 # switch to protected mode
    64        
    65         jmpl $KTEXT, $boot_image_start
    66        
    6739.code32
    6840.align 4
     
    7749        .long multiboot_image_start + BOOT_OFFSET
    7850       
    79 boot_image_start:
    80         movw $KDATA, %ax
    81         movw %ax, %es
    82         movw %ax, %gs
    83         movw %ax, %fs
    84         movw %ax, %ds                                                   # kernel data + stack
    85         movw %ax, %ss
    86        
    87         movb $0xd1, %al                                                 # enable A20 using i8042 controller
    88         outb %al, $0x64
    89         movb $0xdf, %al
    90         outb %al, $0x60
    91        
    92         movl $BOOTSTRAP_OFFSET, %esi
    93         movl $BOOTSTRAP_OFFSET + BOOT_OFFSET, %edi
    94         movl $_hardcoded_kernel_size, %ecx
    95         cld
    96         rep movsb
    97        
    98         call map_kernel                                                 # map kernel and turn paging on
    99        
    100         call main_bsp                                                   # never returns
    101 
    102         cli
    103         hlt
    104        
    10551multiboot_image_start:
    10652        movl $BOOTSTRAP_OFFSET - 0x400, %esp                            # initialize stack pointer
Note: See TracChangeset for help on using the changeset viewer.