Softload detection?
Martin Avison (27) 1494 posts |
The RPC, Iyonix and Titanium have the facility to softload a new ROM from disc, and then re-boot using that new ROM rather than the firmware ROM. I realise that in use it should be transparent, but is there any way to discover if the ROM being used is a firmware ROM or a softload ROM? ISTR some obscure info call for this information, but I have been unable to find it! |
Dave Higton (1515) 3526 posts |
Just to satisfy my curiosity, why do you need to know? |
Martin Avison (27) 1494 posts |
I am contemplating some changes to the softload Prompt program, and it would be useful to know. |
Jeffrey Lee (213) 6048 posts |
Unfortunately there’s no call for this, and it’s a non-trivial thing to detect. RiscPC and Titanium should be relatively easy to get working; you can read the checksum from the ROM file and compare against the live ROM. examine_rom is the function the softload tool uses for getting the checksum. Iyonix is harder, since the softload tool will typically patch the ROM when loading it, changing the checksum in the process. So if you wanted to compare against a ROM file you’d have to replicate the same patching process that the main softload tool uses. However you could tackle it from the opposite direction, by getting the address of the motherboard ROM (either by scanning the physical memory table or via HAL_PhysInfo op 2) and comparing that ROM’s checksum against the live ROM. At this point you might be wondering “Why doesn’t the softload tool implement the prompt itself?” – I’m not sure of the answer to that one. |
Martin Avison (27) 1494 posts |
Thanks Jeffrey – confirms my fears and gives me something to look at. |
Simon Willcocks (1499) 513 posts |
Am I alone in thinking this is the sort of question a programmer should not be having to ask? |
Julie Stamp (8365) 474 posts |
Simon, do you mean you wish there was an entry in OS_ReadSysInfo for it? |
Martin Avison (27) 1494 posts |
While following up Jeffrey’s references, I came across OS_Memory,8 with flags of 3 and 5, which gives the number of pages used by ROM and Soft ROM. I thought this might give me an easy Hard/Soft status. However, on a Titanium, pages are always allocated to Soft ROM never normal ROM – presumably because the physical ROM is loaded into RAM on reset, which is another confusion factor. I am thinking I should look to doing something totally different! |
David Pitt (3386) 1248 posts |
From a Titanium. 1 DRAM: 523647 pages of 4096 bytes 2045MB 2 VRAM: 0 pages of 4096 bytes 0MB 3 ROM: 0 pages of 4096 bytes 0MB 4 I/O: 264192 pages of 4096 bytes 1032MB 5 Soft ROM: 1280 pages of 4096 bytes 5MB
I also came to that view. At startup a soft copy of the ROM image in the flash device is placed in RAM. This can subsequently be overwritten from a file. It’s always a soft ROM. (My understanding of memory maps has not got much further than the BBC Micro where physical devices are mapped in with copper track.) |