Terminating the device / fdconfig.sys process crashes the system
ecm-pushbx opened this issue · 0 comments
By loading lDebug as a device driver I inspected the system state during device init. It turns out that the kernel sets up an init PSP at segment 60h. This process is self-owned, but its Parent Return Address / int 22h vector appears to be uninitialised:
&; Welcome to dev mode lDebug
-r psp .
PSP 0060
-r parent .
PARENT 0060
-r pra .
PRA 00D91289
-u ptr pra l 1
00D9:1289 CF iret
-
The same iret
is used as the handler for eg int 2Dh. When the kernel returns from a termination, it will branch to the PRA with the parent's last int 21h stack, which generally will not contain a valid far return address for this iret
to use.
I fixed my application to not try to terminate the init process in https://hg.pushbx.org/ecm/ldebug/rev/5740dcb40620 However, I think the kernel should handle its init process being terminated. Control-C and Critical Error Abort could possibly terminate the init process, too.