I've made some changes to my local copy of the repo to support remote rebooting from DriveWire. This allows the DriveWire server to send a command (in response to an OP_SERPOLL) to a NitrOS-9 system to tell it to reboot.
The support for this goes into the F$Debug system call. Passing a value of $FF in the A register to this system call will cause a spontaneous reboot of the system.
As a bonus, the reboot command could also reboot the system by doing:
This would be supported in Level 1 and Level 2.
The reason I'm overloading os9 F$Debug for this reason is that under Level 1, there is precious little space left for system call allocations in the system call table and F$Debug, which is already part of the table, is a perfect vector for rebooting.
To prevent just anyone from rebooting, the system call checks the process descriptor's P$User value, and if not $0000 (super user), returns an error #208 (E$UnkSvc); otherwise, the system reboots.
Rebooting on Level 1 is simple:
In Level 2, it's a little more involved because we need to setup MMU registers and ROM mode to get the environment right for the jump.
All of this code exists and works. It has not been pushed to the central repo.
You seem to have CSS turned off.
Please don't fill out this field.
Boisy, When you changed the repo around and modified krnp2.asm for the reboot function, you forgot to add the "fdebug.asm" to the "level1/modules/kernel" folder. The one in the "level2/modules/kernel" is Coco 3 specific and will not work.
Also, you added the "reboot" cmd to the "level1/cmds/makefile" but didn't add the source to the "level1/cmds" and the one in"level2/cmds" is Coco 3 specific also.
The whole process errors throughout the build because the cmds in level1/cmds are built no further than the reboot error. Krnp2 is never built in level 1 so no bootfiles can be built.
Just thought you would like to know :-)
With regards to Bill's observations, is it necessary to modify line #12 in Level1/coco1/modules/kernel
SYSCALLS = fcmpnam.asm fprsnam.asm
SYSCALLS = fcmpnam.asm fprsnam.asm fdebug.asm
In the Level2 equivalents, all the included syscalls get listed.
Also, I think you need to 'un-comment' a line in that level1 syscall and add a new one.
REBOOT orcc #IntMasks turn off IRQ's
clrb !!!!!!!!! you need this !!!!!
stb >$FFA0 map in block 0
stb >$0071 cold reboot
lda #$38 bottom of DECB block mapping
* sta >$FFA0 map in block zero
stb >$0071 and cold reboot here, too
clr >$FFD8 go to low speed
Sign up for the SourceForge newsletter: