Changeset 7aaed09 in mainline for kernel/arch/amd64/src


Ignore:
Timestamp:
2011-12-18T14:02:30Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge mainline changes.

Location:
kernel/arch/amd64/src
Files:
1 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/amd64.c

    r3b71e84d r7aaed09  
    3434
    3535#include <arch.h>
    36 
    3736#include <typedefs.h>
    38 
    39 #include <config.h>
    40 
    41 #include <proc/thread.h>
    42 #include <genarch/multiboot/multiboot.h>
    43 #include <genarch/drivers/legacy/ia32/io.h>
    44 #include <genarch/drivers/ega/ega.h>
    45 #include <arch/drivers/vesa.h>
    46 #include <genarch/drivers/i8042/i8042.h>
    47 #include <genarch/kbrd/kbrd.h>
     37#include <errno.h>
     38#include <memstr.h>
     39#include <interrupt.h>
     40#include <console/console.h>
     41#include <syscall/syscall.h>
     42#include <sysinfo/sysinfo.h>
     43#include <arch/bios/bios.h>
     44#include <arch/boot/boot.h>
     45#include <arch/debugger.h>
    4846#include <arch/drivers/i8254.h>
    4947#include <arch/drivers/i8259.h>
    50 #include <arch/boot/boot.h>
     48#include <arch/syscall.h>
     49#include <genarch/acpi/acpi.h>
     50#include <genarch/drivers/ega/ega.h>
     51#include <genarch/drivers/i8042/i8042.h>
     52#include <genarch/drivers/legacy/ia32/io.h>
     53#include <genarch/fb/bfb.h>
     54#include <genarch/kbrd/kbrd.h>
     55#include <genarch/multiboot/multiboot.h>
     56#include <genarch/multiboot/multiboot2.h>
    5157
    5258#ifdef CONFIG_SMP
    5359#include <arch/smp/apic.h>
    5460#endif
    55 
    56 #include <arch/bios/bios.h>
    57 #include <arch/cpu.h>
    58 #include <print.h>
    59 #include <arch/cpuid.h>
    60 #include <genarch/acpi/acpi.h>
    61 #include <panic.h>
    62 #include <interrupt.h>
    63 #include <arch/syscall.h>
    64 #include <arch/debugger.h>
    65 #include <syscall/syscall.h>
    66 #include <console/console.h>
    67 #include <ddi/irq.h>
    68 #include <sysinfo/sysinfo.h>
    69 #include <memstr.h>
    7061
    7162/** Disable I/O on non-privileged levels
     
    10192/** Perform amd64-specific initialization before main_bsp() is called.
    10293 *
    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)
     94 * @param signature Multiboot signature.
     95 * @param info      Multiboot information structure.
     96 *
     97 */
     98void arch_pre_main(uint32_t signature, void *info)
    10799{
    108100        /* Parse multiboot information obtained from the bootloader. */
    109         multiboot_info_parse(signature, mi);
     101        multiboot_info_parse(signature, (multiboot_info_t *) info);
     102        multiboot2_info_parse(signature, (multiboot2_info_t *) info);
    110103       
    111104#ifdef CONFIG_SMP
     
    153146               
    154147#if (defined(CONFIG_FB) || defined(CONFIG_EGA))
    155                 bool vesa = false;
     148                bool bfb = false;
    156149#endif
    157150               
    158151#ifdef CONFIG_FB
    159                 vesa = vesa_init();
     152                bfb = bfb_init();
    160153#endif
    161154               
    162155#ifdef CONFIG_EGA
    163                 if (!vesa) {
     156                if (!bfb) {
    164157                        outdev_t *egadev = ega_init(EGA_BASE, EGA_VIDEORAM);
    165158                        if (egadev)
     
    261254 * we need not to go to CPL0 to read it.
    262255 */
    263 sysarg_t sys_tls_set(sysarg_t addr)
     256sysarg_t sys_tls_set(uintptr_t addr)
    264257{
    265258        THREAD->arch.tls = addr;
    266259        write_msr(AMD_MSR_FS, addr);
    267260       
    268         return 0;
     261        return EOK;
    269262}
    270263
  • kernel/arch/amd64/src/boot/memmap.c

    r3b71e84d r7aaed09  
    3535#include <arch/boot/memmap.h>
    3636
    37 uint8_t e820counter = 0xffU;
     37uint8_t e820counter = 0;
    3838e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS];
    3939
  • kernel/arch/amd64/src/boot/multiboot.S

    r3b71e84d r7aaed09  
    3030
    3131#include <arch/boot/boot.h>
    32 #include <arch/boot/memmap.h>
    3332#include <arch/mm/page.h>
    3433#include <arch/mm/ptl.h>
    3534#include <arch/pm.h>
     35#include <genarch/multiboot/multiboot.h>
     36#include <arch/cpuid.h>
    3637#include <arch/cpu.h>
    37 #include <arch/cpuid.h>
    3838
    3939#define START_STACK  (BOOT_OFFSET - BOOT_STACK_SIZE)
     
    101101        multiboot_meeting_point:
    102102       
    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
    106111       
    107112        pm_status $status_prot
     
    149154       
    150155#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          */
    156156       
    157157        pm2_status $status_prot2
     
    422422        long_status $status_long
    423423       
    424         /* Call arch_pre_main(grub_eax, grub_ebx) */
     424        /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */
    425425        xorq %rdi, %rdi
    426         movl grub_eax, %edi
     426        movl multiboot_eax, %edi
    427427        xorq %rsi, %rsi
    428         movl grub_ebx, %esi
     428        movl multiboot_ebx, %esi
    429429       
    430430        movabsq $arch_pre_main, %rax
     
    645645.section K_DATA_START, "aw", @progbits
    646646
     647.global bootstrap_gdtr
    647648bootstrap_gdtr:
    648649        .word GDT_SELECTOR(GDT_ITEMS)
    649650        .long KA2PA(gdt)
    650651
    651 grub_eax:
     652.global multiboot_eax
     653multiboot_eax:
    652654        .long 0
    653655
    654 grub_ebx:
     656.global multiboot_ebx
     657multiboot_ebx:
    655658        .long 0
    656659
     
    670673status_vesa_copy:
    671674        .asciz "[vesa_copy] "
    672 status_grub_cmdline:
    673         .asciz "[grub_cmdline] "
     675status_multiboot_cmdline:
     676        .asciz "[multiboot_cmdline] "
    674677status_vesa_real:
    675678        .asciz "[vesa_real] "
Note: See TracChangeset for help on using the changeset viewer.