示例#1
0
文件: vbe.c 项目: Snake2k/OS-Zero
void
vbeint10(void)
{
#if (SMP)
    long id = k_curcpu->id;
#endif
    static int       first = 1;
    uint64_t        *gdt;
    struct m_farptr *farptr;
    if (first) {
        kmemcpy((void *)BOOTREALBASE,
                &realstart,
                (unsigned long)&realend - (unsigned long)&realstart);
        first = 0;
    }
    realint10();
#if (SMP)
    gdt = &kerngdt[id][0];
#else
    gdt = kerngdt;
#endif
    farptr = &realgdtptr;
    farptr->lim = NGDT * sizeof(uint64_t) - 1;
    farptr->adr = (uint32_t)gdt;
    gdtinit(farptr);

    return;
}
示例#2
0
文件: vbe.c 项目: hongbochen/OS-Zero
void
vbeint10(struct realregs *regs)
{
    static int first = 1;

    if (first) {
        kmemcpy((void *)KERNREALBASE,
                &realstart,
                (unsigned long)&realend - (unsigned long)&realstart);
        first = 0;
    }
#if 0
    kmemcpy((void *)(KERNREALSTK - sizeof(struct realregs)),
            regs,
            sizeof(struct realregs));
#endif
    realint10();
    gdtinit();

    return;
}