Changeset 7aaed09 in mainline for kernel/arch/ia32/src
- Timestamp:
- 2011-12-18T14:02:30Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c868e2d
- Parents:
- 3b71e84d (diff), 1761268 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- kernel/arch/ia32/src
- Files:
-
- 1 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/memmap.c
r3b71e84d r7aaed09 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/ia32/src/boot/multiboot.S
r3b71e84d r7aaed09 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/pm.h> 34 #include <genarch/multiboot/multiboot.h> 35 35 #include <arch/cpuid.h> 36 36 … … 92 92 multiboot_meeting_point: 93 93 94 /* Save GRUBarguments */95 movl %eax, grub_eax96 movl %ebx, grub_ebx94 /* Save multiboot arguments */ 95 movl %eax, multiboot_eax 96 movl %ebx, multiboot_ebx 97 97 98 98 pm_status $status_prot … … 135 135 pm2_status $status_prot3 136 136 137 /* Call arch_pre_main( grub_eax, grub_ebx) */138 pushl grub_ebx139 pushl grub_eax137 /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */ 138 pushl multiboot_ebx 139 pushl multiboot_eax 140 140 call arch_pre_main 141 141 … … 196 196 * 197 197 */ 198 .global map_kernel_non_pse 198 199 map_kernel_non_pse: 199 200 /* Paging features */ … … 299 300 find_mem_for_pt: 300 301 /* Check if multiboot info is present */ 301 cmpl $MULTIBOOT_LOADER_MAGIC, grub_eax302 cmpl $MULTIBOOT_LOADER_MAGIC, multiboot_eax 302 303 je check_multiboot_map 303 304 … … 307 308 308 309 /* Copy address of the multiboot info to ebx */ 309 movl grub_ebx, %ebx310 movl multiboot_ebx, %ebx 310 311 311 312 /* Check if memory map flag is present */ … … 701 702 .space 4096, 0 702 703 704 .global bootstrap_gdtr 703 705 bootstrap_gdtr: 704 706 .word GDT_SELECTOR(GDT_ITEMS) 705 707 .long KA2PA(gdt) 706 708 707 grub_eax: 709 .global multiboot_eax 710 multiboot_eax: 708 711 .long 0 709 grub_ebx: 712 713 .global multiboot_ebx 714 multiboot_ebx: 710 715 .long 0 711 716 … … 725 730 status_vesa_copy: 726 731 .asciz "[vesa_copy] " 727 status_ grub_cmdline:728 .asciz "[ grub_cmdline] "732 status_multiboot_cmdline: 733 .asciz "[multiboot_cmdline] " 729 734 status_vesa_real: 730 735 .asciz "[vesa_real] " -
kernel/arch/ia32/src/boot/vesa_prot.inc
r3b71e84d r7aaed09 1 1 #ifdef CONFIG_FB 2 2 3 #define MULTIBOOT_LOADER_MAGIC 0x2BADB0024 3 #define MBINFO_BIT_CMDLINE 2 5 4 #define MBINFO_OFFSET_CMDLINE 16 … … 14 13 rep movsb 15 14 16 /* Check for GRUBcommand line */15 /* Check for multiboot command line */ 17 16 18 pm_status $status_ grub_cmdline17 pm_status $status_multiboot_cmdline 19 18 20 mov grub_eax, %eax19 mov multiboot_eax, %eax 21 20 cmp $MULTIBOOT_LOADER_MAGIC, %eax 22 21 jne no_cmdline 23 22 24 mov grub_ebx, %ebx23 mov multiboot_ebx, %ebx 25 24 mov (%ebx), %eax 26 25 bt $MBINFO_BIT_CMDLINE, %eax … … 89 88 /* Returned back to protected mode */ 90 89 91 mov %ax, KA2PA(vesa_scanline) 90 movzx %ax, %ecx 91 mov %ecx, KA2PA(bfb_scanline) 92 92 93 shr $16, %eax 93 mov %ax, KA2PA( vesa_bpp)94 mov %ax, KA2PA(bfb_bpp) 94 95 95 mov %bx, KA2PA(vesa_height) 96 movzx %bx, %ecx 97 mov %ecx, KA2PA(bfb_height) 98 96 99 shr $16, %ebx 97 mov % bx, KA2PA(vesa_width)100 mov %ebx, KA2PA(bfb_width) 98 101 99 mov %dl, KA2PA(vesa_green_pos) 102 mov %dl, KA2PA(bfb_green_pos) 103 100 104 shr $8, %edx 101 mov %dl, KA2PA(vesa_green_mask) 105 mov %dl, KA2PA(bfb_green_size) 106 102 107 shr $8, %edx 103 mov %dl, KA2PA(vesa_red_pos) 108 mov %dl, KA2PA(bfb_red_pos) 109 104 110 shr $8, %edx 105 mov %dl, KA2PA( vesa_red_mask)111 mov %dl, KA2PA(bfb_red_size) 106 112 107 113 mov %esi, %edx 108 mov %dl, KA2PA(vesa_blue_pos) 114 mov %dl, KA2PA(bfb_blue_pos) 115 109 116 shr $8, %edx 110 mov %dl, KA2PA( vesa_blue_mask)117 mov %dl, KA2PA(bfb_blue_size) 111 118 112 mov %edi, KA2PA( vesa_ph_addr)119 mov %edi, KA2PA(bfb_addr) 113 120 #endif -
kernel/arch/ia32/src/boot/vesa_real.inc
r3b71e84d r7aaed09 304 304 /* 305 305 * Store mode parameters: 306 * eax = bpp[ 8] scanline[16]306 * eax = bpp[16] scanline[16] 307 307 * ebx = width[16] height[16] 308 308 * edx = red_mask[8] red_pos[8] green_mask[8] green_pos[8] … … 328 328 shl $8, %edx 329 329 mov VESA_MODE_RED_POS_OFFSET(%di), %dl 330 330 331 shl $8, %edx 331 332 mov VESA_MODE_GREEN_MASK_OFFSET(%di), %dl … … 369 370 mov $0x0003, %ax 370 371 int $0x10 371 mov $0xffffffff, %edi 372 xor %ax, %ax 372 373 xor %eax, %eax 374 xor %ebx, %ebx 375 xor %edx, %edx 376 xor %edi, %edi 377 373 378 jz vesa_leave_real /* force relative jump */ 374 379 … … 386 391 387 392 default_mode: 388 .ascii STRING(CONFIG_ VESA_MODE)393 .ascii STRING(CONFIG_BFB_MODE) 389 394 .ascii "-" 390 .asciz STRING(CONFIG_ VESA_BPP)395 .asciz STRING(CONFIG_BFB_BPP) 391 396 .fill 24 392 397 -
kernel/arch/ia32/src/ia32.c
r3b71e84d r7aaed09 36 36 37 37 #include <arch.h> 38 39 38 #include <typedefs.h> 40 41 #include < arch/pm.h>42 43 #include < genarch/multiboot/multiboot.h>44 #include < genarch/drivers/legacy/ia32/io.h>45 #include < genarch/drivers/ega/ega.h>46 #include <arch/ drivers/vesa.h>47 #include < genarch/drivers/i8042/i8042.h>48 #include < genarch/kbrd/kbrd.h>39 #include <errno.h> 40 #include <memstr.h> 41 #include <interrupt.h> 42 #include <console/console.h> 43 #include <syscall/syscall.h> 44 #include <sysinfo/sysinfo.h> 45 #include <arch/bios/bios.h> 46 #include <arch/boot/boot.h> 47 #include <arch/debugger.h> 49 48 #include <arch/drivers/i8254.h> 50 49 #include <arch/drivers/i8259.h> 51 52 #include <arch/context.h>53 54 #include <config.h>55 56 #include <arch/interrupt.h>57 #include <arch/asm.h>58 50 #include <genarch/acpi/acpi.h> 59 60 #include <arch/bios/bios.h> 61 62 #include <interrupt.h> 63 #include <ddi/irq.h> 64 #include <arch/debugger.h> 65 #include <proc/thread.h> 66 #include <syscall/syscall.h> 67 #include <console/console.h> 68 #include <sysinfo/sysinfo.h> 69 #include <arch/boot/boot.h> 70 #include <memstr.h> 51 #include <genarch/drivers/ega/ega.h> 52 #include <genarch/drivers/i8042/i8042.h> 53 #include <genarch/drivers/legacy/ia32/io.h> 54 #include <genarch/fb/bfb.h> 55 #include <genarch/kbrd/kbrd.h> 56 #include <genarch/multiboot/multiboot.h> 57 #include <genarch/multiboot/multiboot2.h> 71 58 72 59 #ifdef CONFIG_SMP … … 76 63 /** Perform ia32-specific initialization before main_bsp() is called. 77 64 * 78 * @param signature Should contain the multiboot signature. 79 * @param mi Pointer to the multiboot information structure. 80 */ 81 void arch_pre_main(uint32_t signature, const multiboot_info_t *mi) 65 * @param signature Multiboot signature. 66 * @param info Multiboot information structure. 67 * 68 */ 69 void arch_pre_main(uint32_t signature, void *info) 82 70 { 83 71 /* Parse multiboot information obtained from the bootloader. */ 84 multiboot_info_parse(signature, mi); 72 multiboot_info_parse(signature, (multiboot_info_t *) info); 73 multiboot2_info_parse(signature, (multiboot2_info_t *) info); 85 74 86 75 #ifdef CONFIG_SMP … … 114 103 115 104 #if (defined(CONFIG_FB) || defined(CONFIG_EGA)) 116 bool vesa= false;105 bool bfb = false; 117 106 #endif 118 107 119 108 #ifdef CONFIG_FB 120 vesa = vesa_init();109 bfb = bfb_init(); 121 110 #endif 122 111 123 112 #ifdef CONFIG_EGA 124 if (! vesa) {113 if (!bfb) { 125 114 outdev_t *egadev = ega_init(EGA_BASE, EGA_VIDEORAM); 126 115 if (egadev) … … 216 205 * selector, and the descriptor->base is the correct address. 217 206 */ 218 sysarg_t sys_tls_set( sysarg_t addr)207 sysarg_t sys_tls_set(uintptr_t addr) 219 208 { 220 209 THREAD->arch.tls = addr; 221 210 set_tls_desc(addr); 222 211 223 return 0;212 return EOK; 224 213 } 225 214
Note:
See TracChangeset
for help on using the changeset viewer.