Exemplo n.º 1
0
// Entry point for Power On Self Test (POST) - the BIOS initilization
// phase.  This function makes the memory at 0xc0000-0xfffff
// read/writable and then calls dopost().
void VISIBLE32FLAT
handle_post(void)
{
#if CONFIG_PRINT_TIMESTAMPS
    u64 tscval;
#endif

    if (!CONFIG_QEMU && !CONFIG_COREBOOT)
        return;

    serial_debug_preinit();
    debug_banner();
#if CONFIG_PRINT_TIMESTAMPS
    tscval = rdtscll();
    dprintf(1, "TSC: Start of seabios: 0x%08lx_%08lx\n",
        (unsigned long)(tscval >> 32),
        (unsigned long)tscval);
#endif

    // Check if we are running under Xen.
    xen_preinit();

    // Allow writes to modify bios area (0xf0000)
    make_bios_writable();

    // Now that memory is read/writable - start post process.
    dopost();
}
Exemplo n.º 2
0
void
qemu_prep_reset(void)
{
    if (CONFIG_COREBOOT)
        return;
    // QEMU doesn't map 0xc0000-0xfffff back to the original rom on a
    // reset, so do that manually before invoking a hard reset.
    make_bios_writable();
    extern u8 code32flat_start[], code32flat_end[];
    memcpy(code32flat_start, code32flat_start + BIOS_SRC_OFFSET
           , code32flat_end - code32flat_start);
}
Exemplo n.º 3
0
// Entry point for Power On Self Test (POST) - the BIOS initilization
// phase.  This function makes the memory at 0xc0000-0xfffff
// read/writable and then calls dopost().
void VISIBLE32FLAT
handle_post(void)
{
    if (!CONFIG_QEMU && !CONFIG_COREBOOT)
        return;

    serial_debug_preinit();
    debug_banner();

    // Check if we are running under Xen.
    xen_preinit();

    // Allow writes to modify bios area (0xf0000)
    make_bios_writable();

    // Now that memory is read/writable - start post process.
    dopost();
}
Exemplo n.º 4
0
// Entry point for Power On Self Test (POST) - the BIOS initilization
// phase.  This function makes the memory at 0xc0000-0xfffff
// read/writable and then calls dopost().
void VISIBLE32FLAT
handle_post(void)
{
    debug_serial_setup();
    dprintf(1, "Start bios (version %s)\n", VERSION);

    // Enable CPU caching
    setcr0(getcr0() & ~(CR0_CD|CR0_NW));

    // Clear CMOS reboot flag.
    outb_cmos(0, CMOS_RESET_CODE);

    // Make sure legacy DMA isn't running.
    init_dma();

    // Check if we are running under Xen.
    xen_probe();

    // Allow writes to modify bios area (0xf0000)
    make_bios_writable();

    // Now that memory is read/writable - start post process.
    dopost();
}