Changeset 5d8d71e in mainline for kernel/arch/amd64/src/amd64.c


Ignore:
Timestamp:
2009-03-03T21:17:45Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
06f96234
Parents:
c22e964
Message:

Move multiboot parsing to genarch/*/multiboot and adapt it for use with both ia32 and amd64. Multiboot info parsing now supported on amd64, too.

File:
1 edited

Legend:

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

    rc22e964 r5d8d71e  
    4040
    4141#include <proc/thread.h>
     42#include <genarch/multiboot/multiboot.h>
    4243#include <genarch/drivers/legacy/ia32/io.h>
    4344#include <genarch/drivers/ega/ega.h>
     
    4647#include <arch/drivers/i8254.h>
    4748#include <arch/drivers/i8259.h>
     49#include <arch/boot/boot.h>
    4850
    4951#ifdef CONFIG_SMP
     
    6668#include <sysinfo/sysinfo.h>
    6769
    68 
    6970/** Disable I/O on non-privileged levels
    7071 *
     
    9596                ::: "%rax"
    9697        );
     98}
     99
     100/** Perform amd64-specific initialization before main_bsp() is called.
     101 *
     102 * @param signature Should contain the multiboot signature.
     103 * @param mi        Pointer to the multiboot information structure.
     104 */
     105void arch_pre_main(uint32_t signature, const multiboot_info_t *mi)
     106{
     107        /* Parse multiboot information obtained from the bootloader. */
     108        multiboot_info_parse(signature, mi);
     109       
     110#ifdef CONFIG_SMP
     111        /* Copy AP bootstrap routines below 1 MB. */
     112        memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET,
     113            (size_t) &_hardcoded_unmapped_size);
     114#endif
    97115}
    98116
Note: See TracChangeset for help on using the changeset viewer.