forked from S7rizh/phantomuserland
-
Notifications
You must be signed in to change notification settings - Fork 1
KernelVM86
Sambura edited this page Mar 27, 2024
·
1 revision
i386/vm86.c
void phantom_v86_run(void *code, int size) - runs given (8086) code, copying it to low (below 1MB) memory first.
Usage example: see in i386/vesa.c
- Runs code by switching to VM86_TSS
- IO access is unrestricted
- Memory access is restriced by check_ua()
- VME is not used. Partially implemented, but not even tried.
- GPF handler is overridden, so no multithreading supposed while running 86 code.
See phantom_ret_from_vm86() - longjmp is a hack. Normally we must return by jmp to main TSS.
If you going to fix:
To check what's going on first find out which TSS is current when we get to phantom_ret_from_vm86() - I suspect that it is already MAIN_TSS.
:: Home :: RoadMap :: History :: ChangeLog :: ScreenShots :: Phantom Developer's Guide