New IOMD softload
Pages: 1 2
Jeffrey Lee (213) 6048 posts |
I’ve uploaded a new IOMD softload to my site which has the following improvements:
Grab the softload over here: http://www.phlamethrower.co.uk/misc2/IOMDHALDev.zip Also included in the archive is an improved version of the softload tool. The only new feature that regular users might be interested in is the ‘-dummyrun’ option, which is useful if you need to get a look at the debug output that’s produced before it boots the new ROM (it causes the tool to exit just short of starting the new ROM). There’s also a ‘PhysRAM’ basic file in the archive; if any Kinetic users could run it and report back here with the values it prints out then that should allow us to add Kinetic softload support to the ROM. With any luck the official 5.18 release will be out soon and it’ll be safe for me to check all these changes into CVS. |
Steve Revill (20) 1361 posts |
Nice work! Sounds promising. Will this have some benefits for RPCemu RO5 users? |
Jeffrey Lee (213) 6048 posts |
I think everything on that list will help RPCEmu users, except the rewritten RAM detection (the old code seemed to work OK) and the monitor detection (not really sure what monitor type, if any, RPCEmu will emulate) |
Jeffrey Lee (213) 6048 posts |
I’ve found the cause of the Maestro crash. SoundControl has the following code in its SWI handler: PHPSEI R14,R0 Pull R0 After macro expansion, this becomes: MRS R14,CPSR TST R14,#&80 ORRREQ R0,R14,#&80 MSREQ CPSR_c,R0 LDR R0,[R13],#4 Which is the perfect code sequence to trigger the StrongARM MSR bug and cause the LDR to be executed twice, popping two items off the stack instead of one. Now I just have to decide how best to fix it – the PHPSEI macro is defined in Hdr:CPU.Generic32, which contains lots of other macros which can be made to perform conditional MSR’s. I think I’ll go with the following approach:
Since objasm doesn’t seem to produce a warning for the code (something ROOL could add, pretty please?) I’m thinking that adding the warning/error to mymsr is our best defence against the conditional MSR bug. Anyone else have any ideas? |
Sprow (202) 1158 posts |
Blunt axe solution: emit a NOP after conditional MSR in mymsr? |
Colin Ferris (399) 1818 posts |
tst r14,#&80 tst r14,#&80 |
Colin Ferris (399) 1818 posts |
tst r14,#&80 |
Jeffrey Lee (213) 6048 posts |
Colin: All perfectly valid solutions, but I think for performance reasons it’s better to have a NOP (or some other safe instruction) after the MSR rather than add a branch or make the MSR unconditional. It looks like there were only 56 potentially dangerous uses of mymsr in the ROM image. Since this is a fairly low number I’ve gone with a hybrid of mine and Sprow’s ideas; by default mymsr will emit both a warning and a NOP if it’s asked to produce a conditional MSR CPSR_c. But there’s a new parameter to the macro which you can use to either suppress the warning, or suppress both the warning and the NOP. After modifying Generic32 to pass the new parameter to mymsr the ROM built without any warnings, so it looks like Generic32 is the only place where that macro is getting used.A search through the ROM disassembly revealed a handful of dangerous MSRs which still needed fixing, including three in MbufManager (aka MManager in CVS). Since this is still closed source I’ll have to leave it to ROOL to fix these (although if push comes to shove it looks like I could just reorder a couple of instructions in the binary):
Once I’ve checked the disc image I think I should be OK to check in these MSR fixes (except those MbufManager ones). |
Jeffrey Lee (213) 6048 posts |
Did anyone get a chance to try this softload? All the changes are now in CVS, so you can’t blame me (much) if you find it doesn’t work! |
Steve Revill (20) 1361 posts |
I’ve not got a system I could usefully test it on – assuming you mean the IOMD softload, unless RPCemu with 5.17 would do? |
Jeffrey Lee (213) 6048 posts |
The main thing I’m interested in getting tested is the RAM setup/detection. Although some of it’s been run through a testbed, there’s a fair amount which hasn’t, so it wouldn’t surprise me if there are one or two situations in which it will fail. I’ve already tested it under RPCEmu, so it would be testing with real IOMD machines that I’m most interested in. |
Steve Revill (20) 1361 posts |
I think Sprow has a working RiscPC… ;) |
Jeffrey Lee (213) 6048 posts |
Hmm, OK. Maybe you can check in a StrongARM-safe version of MbufManager then? :) (see the list of MSR’s a few posts up – the code needs tweaking so it won’t fail badly when the StrongARM conditional MSR bug is triggered) |
Sprow (202) 1158 posts |
ROM of 27-Feb-12 loaded just fine (previously I’ve never managed to get the softload tool to work), detected 65MB of RAM (64 in a single SIMM, then 1 of VRAM) and booted into the desktop just fine. Numbers in task manager all seemed to add up, allowing for the 4MB lost to the softload. |
Jeffrey Lee (213) 6048 posts |
Sounds good.
Judging by the ROM date you must be using ROOL’s one – in which case that will have contained an older version of the softload tool. So either I fixed the problems you were having with the softload tool a while ago, or some/all of your problems were being caused by the old HAL code. Anyway, I’ve now checked in updated softload binaries, so tomorrows ROMs should work even better. |
Sprow (202) 1158 posts |
That softload tool now reports “softload failed; out of memory”, however if I let the boot sequence complete normally then go and run !!Softload manually it works as before. Presumably that’s something simple like the free pool isn’t big enough?
You did, I just forgot to retest. |
Jeffrey Lee (213) 6048 posts |
Yes, that’s probably it. I’m a bit surrpised though; the memory usage shouldn’t be much higher than before. However, I will need to change it to allocate the decompression workspace from somewhere else. |
Ronald May (387) 407 posts |
I tried the !!Softload on my RiscPc 3.7 and it wanted a newer SharedClibrary. Ron M. |
Jeffrey Lee (213) 6048 posts |
It looks like there are three potential causes of this:
You don’t want to use the Iyonix version on a 26bit OS. Try the version in the “System resources” archive from this page
Not exactly. I’m only interested in the output of the PhysRam program when a Kinetic user runs it. And since you’d need RISC OS 4 to be using a Kinetic card, there wasn’t much point making sure the program works on 3.×. I’ve updated the archive on my site to contain a copy of the latest softload tool and a newer ROM. So you can give that one ago, or wait for the latest ROOL ones in the morning (which should be pretty much the same as my one). |
Sprow (202) 1158 posts |
Yup – that softload tool runs fine with 29-Feb-2012 IOMD ROM. |
Ronald May (387) 407 posts |
I upgraded the !System Rebooted/Powered Down a few times but still got |
Jeffrey Lee (213) 6048 posts |
That’ll most likely be a !Boot sequence issue. Hopefully by the time we have networking drivers sorted out we’ll also have a RISC OS 5 boot sequence which can easily be merged with peoples existing 3.x/4.x !Boot. But the important thing for now is that the ROM image seems to be working OK on your machine. |
Jess Hampshire (158) 865 posts |
Is a resourcesfs live version viable? (Obviously unlikely to be much good on machines with under 64M RAM) |
Jeffrey Lee (213) 6048 posts |
Yes, it’s viable. |
Jess Hampshire (158) 865 posts |
Could I request it, please? (I’d like to try it on the local club RPC) Do you still need your test prog run on more Kinetics? |
Pages: 1 2