3590 |
env->gdt.base = (void *)params->gdt_table; |
env->gdt.base = (void *)params->gdt_table; |
3591 |
env->gdt.limit = sizeof(params->gdt_table) - 1; |
env->gdt.limit = sizeof(params->gdt_table) - 1; |
3592 |
|
|
3593 |
cpu_x86_load_seg(env, R_CS, KERNEL_CS); |
cpu_x86_load_seg_cache(env, R_CS, KERNEL_CS, NULL, 0xffffffff, 0x00cf9a00); |
3594 |
cpu_x86_load_seg(env, R_DS, KERNEL_DS); |
cpu_x86_load_seg_cache(env, R_DS, KERNEL_DS, NULL, 0xffffffff, 0x00cf9200); |
3595 |
cpu_x86_load_seg(env, R_ES, KERNEL_DS); |
cpu_x86_load_seg_cache(env, R_ES, KERNEL_DS, NULL, 0xffffffff, 0x00cf9200); |
3596 |
cpu_x86_load_seg(env, R_SS, KERNEL_DS); |
cpu_x86_load_seg_cache(env, R_SS, KERNEL_DS, NULL, 0xffffffff, 0x00cf9200); |
3597 |
cpu_x86_load_seg(env, R_FS, KERNEL_DS); |
cpu_x86_load_seg_cache(env, R_FS, KERNEL_DS, NULL, 0xffffffff, 0x00cf9200); |
3598 |
cpu_x86_load_seg(env, R_GS, KERNEL_DS); |
cpu_x86_load_seg_cache(env, R_GS, KERNEL_DS, NULL, 0xffffffff, 0x00cf9200); |
3599 |
|
|
3600 |
env->eip = KERNEL_LOAD_ADDR; |
env->eip = KERNEL_LOAD_ADDR; |
3601 |
env->regs[R_ESI] = KERNEL_PARAMS_ADDR; |
env->regs[R_ESI] = KERNEL_PARAMS_ADDR; |
3627 |
env->ldt.limit = 0xffff; |
env->ldt.limit = 0xffff; |
3628 |
|
|
3629 |
/* not correct (CS base=0xffff0000) */ |
/* not correct (CS base=0xffff0000) */ |
3630 |
cpu_x86_load_seg(env, R_CS, 0xf000); |
cpu_x86_load_seg_cache(env, R_CS, 0xf000, (uint8_t *)0x000f0000, 0xffff, 0); |
3631 |
cpu_x86_load_seg(env, R_DS, 0); |
cpu_x86_load_seg_cache(env, R_DS, 0, NULL, 0xffff, 0); |
3632 |
cpu_x86_load_seg(env, R_ES, 0); |
cpu_x86_load_seg_cache(env, R_ES, 0, NULL, 0xffff, 0); |
3633 |
cpu_x86_load_seg(env, R_SS, 0); |
cpu_x86_load_seg_cache(env, R_SS, 0, NULL, 0xffff, 0); |
3634 |
cpu_x86_load_seg(env, R_FS, 0); |
cpu_x86_load_seg_cache(env, R_FS, 0, NULL, 0xffff, 0); |
3635 |
cpu_x86_load_seg(env, R_GS, 0); |
cpu_x86_load_seg_cache(env, R_GS, 0, NULL, 0xffff, 0); |
3636 |
|
|
3637 |
env->eip = 0xfff0; |
env->eip = 0xfff0; |
3638 |
env->regs[R_EDX] = 0x600; /* indicate P6 processor */ |
env->regs[R_EDX] = 0x600; /* indicate P6 processor */ |