Inverting the sense of ProtectStationID
Sprow (202) 1158 posts |
I’ve forgotten now what I was originally looking for, but ended up on a path of investigation that has concluded in a proposal to set this kernel switch to {FALSE} or at least toning it down a bit. This is CMOS byte 0, where the Econet station number is held. The switch prevents you from writing to CMOS byte 0 using the OS_Byte 162 mechanism and also the OS_NVMemory mechanism. Its origins hark back to the BBC Master I think, which also protects that location (the BBC B used 8 jumpers on the motherboard), presumably because in a school environment letting school kids change the value generally broke Econet. Fast forward 30 years and the location is still (slightly) relevant. At some point in RISC OS’ set top box phase an extra 3 bytes were allocated at 108-110 to hold the top 3 octects of an IPv4 address. This fits in with the addressing scheme described in PRM5a-287 where the Econet station number becomes the bottom byte of an IPv4 address when in a mixed AUN. The !InetSetup configure plugin has a ‘from CMOS’ radio icon in it to allow the IP address to be got from there, this runs the ReadCMOSIP utility on startup to shove the 4 CMOS values into a Inet$ variable to configure the network card. That probably reflects that a set top box would probably have its boot sequence in ResourceFS, but still want to be able to customise the IP address (but not being able to write the !Internet startup file). Fortunately none of this matters for the IPv6 stack that ROOL are using internally since link local addresses for that are generated by mashing the EUI48 (MAC address) around a bit. That’s the background, but the current problem is you can’t set the value. Prior to the HAL, Acorn produced ‘SetStation’, whose sources are long lost but the binary is trivial to recreate since aside from command line parsing it just goes straight to the bare metal and bit bashes out some IIC commands using the IOMD control register. Clearly that makes no sense in a 32 bit memory map (IOC not at 0×03200000!) or using a HAL. I propose turning off the ProtectStationID code in the HAL kernel so that SetStation can be adapted to just deal with pre-HAL stuff needing to poke IOC/IOMD and current stuff where it just uses OS_Byte. A few options for robustness
|