Changeset 1f5c9c96 in mainline for kernel/arch/amd64/src
- Timestamp:
- 2011-12-02T17:29:43Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b8b1e631, c3887ad
- Parents:
- c48f6ab
- Location:
- kernel/arch/amd64/src
- Files:
-
- 1 added
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/amd64.c
rc48f6ab r1f5c9c96 41 41 #include <proc/thread.h> 42 42 #include <genarch/multiboot/multiboot.h> 43 #include <genarch/multiboot/multiboot2.h> 43 44 #include <genarch/drivers/legacy/ia32/io.h> 44 45 #include <genarch/drivers/ega/ega.h> 45 #include < arch/drivers/vesa.h>46 #include <genarch/fb/bfb.h> 46 47 #include <genarch/drivers/i8042/i8042.h> 47 48 #include <genarch/kbrd/kbrd.h> … … 101 102 /** Perform amd64-specific initialization before main_bsp() is called. 102 103 * 103 * @param signature Should contain the multiboot signature. 104 * @param mi Pointer to the multiboot information structure. 105 */ 106 void arch_pre_main(uint32_t signature, const multiboot_info_t *mi) 104 * @param signature Multiboot signature. 105 * @param info Multiboot information structure. 106 * 107 */ 108 void arch_pre_main(uint32_t signature, void *info) 107 109 { 108 110 /* Parse multiboot information obtained from the bootloader. */ 109 multiboot_info_parse(signature, mi); 111 multiboot_info_parse(signature, (multiboot_info_t *) info); 112 multiboot2_info_parse(signature, (multiboot2_info_t *) info); 110 113 111 114 #ifdef CONFIG_SMP … … 153 156 154 157 #if (defined(CONFIG_FB) || defined(CONFIG_EGA)) 155 bool vesa= false;158 bool bfb = false; 156 159 #endif 157 160 158 161 #ifdef CONFIG_FB 159 vesa = vesa_init();162 bfb = bfb_init(); 160 163 #endif 161 164 162 165 #ifdef CONFIG_EGA 163 if (! vesa) {166 if (!bfb) { 164 167 outdev_t *egadev = ega_init(EGA_BASE, EGA_VIDEORAM); 165 168 if (egadev) -
kernel/arch/amd64/src/boot/memmap.c
rc48f6ab r1f5c9c96 35 35 #include <arch/boot/memmap.h> 36 36 37 uint8_t e820counter = 0 xffU;37 uint8_t e820counter = 0; 38 38 e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS]; 39 39 -
kernel/arch/amd64/src/boot/multiboot.S
rc48f6ab r1f5c9c96 30 30 31 31 #include <arch/boot/boot.h> 32 #include <arch/boot/memmap.h>33 32 #include <arch/mm/page.h> 34 33 #include <arch/mm/ptl.h> 35 34 #include <arch/pm.h> 35 #include <genarch/multiboot/multiboot.h> 36 #include <arch/cpuid.h> 36 37 #include <arch/cpu.h> 37 #include <arch/cpuid.h>38 38 39 39 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) … … 101 101 multiboot_meeting_point: 102 102 103 /* Save GRUB arguments */ 104 movl %eax, grub_eax 105 movl %ebx, grub_ebx 103 /* 104 * Protected 32-bit. We want to reuse the code-seg descriptor, 105 * the Default operand size must not be 1 when entering long mode. 106 */ 107 108 /* Save multiboot arguments */ 109 movl %eax, multiboot_eax 110 movl %ebx, multiboot_ebx 106 111 107 112 pm_status $status_prot … … 149 154 150 155 #include "vesa_prot.inc" 151 152 /*153 * Protected 32-bit. We want to reuse the code-seg descriptor,154 * the Default operand size must not be 1 when entering long mode.155 */156 156 157 157 pm2_status $status_prot2 … … 422 422 long_status $status_long 423 423 424 /* Call arch_pre_main( grub_eax, grub_ebx) */424 /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */ 425 425 xorq %rdi, %rdi 426 movl grub_eax, %edi426 movl multiboot_eax, %edi 427 427 xorq %rsi, %rsi 428 movl grub_ebx, %esi428 movl multiboot_ebx, %esi 429 429 430 430 movabsq $arch_pre_main, %rax … … 645 645 .section K_DATA_START, "aw", @progbits 646 646 647 .global bootstrap_gdtr 647 648 bootstrap_gdtr: 648 649 .word GDT_SELECTOR(GDT_ITEMS) 649 650 .long KA2PA(gdt) 650 651 651 grub_eax: 652 .global multiboot_eax 653 multiboot_eax: 652 654 .long 0 653 655 654 grub_ebx: 656 .global multiboot_ebx 657 multiboot_ebx: 655 658 .long 0 656 659 … … 670 673 status_vesa_copy: 671 674 .asciz "[vesa_copy] " 672 status_ grub_cmdline:673 .asciz "[ grub_cmdline] "675 status_multiboot_cmdline: 676 .asciz "[multiboot_cmdline] " 674 677 status_vesa_real: 675 678 .asciz "[vesa_real] "
Note:
See TracChangeset
for help on using the changeset viewer.