www.riscos.com Technical Support: |
|
The FSLock module (added in RISC OS 3.5) provides protection against inadvertent or malicious changing of the CMOS RAM and hard disc contents. To do this it intercepts the calls that update the contents of the hard disc and CMOS RAM, and returns an error instead.
The Reset behaviour has been further changed in two ways. Firstly, it has been simplified both to reduce the confusing range of options that were available in earlier versions of RISC OS and to ensure a reset always really starts the machine afresh. Secondly, a link can be set on the machine's circuit board to prevent resetting the CMOS RAM by a Delete power-on or similar combination.
Earlier versions of RISC OS allowed users to reset some or all of CMOS RAM by holding down various keys whilst the machine was powered on. However, any resultant accidental or deliberate alteration of CMOS RAM could be a nuisance in some environments. To counteract this, RISC OS 3.5 has added support for a CMOS protection connector inside the machine.
With the connector in the protected position, the CMOS RAM cannot be cleared as a part of a power-on or reset sequence, no matter what keys are held down. With it in the unprotected position, CMOS RAM clearing works just as in earlier versions of RISC OS.
The power-on and reset combinations for RISC OS 3.5 have been changed to rationalise a previously confusing set of options.
Under earlier versions of RISC OS a reset had many variations depending on whether it was a power-on reset, ordinary reset or break style reset, whether *FX200,2 had been done before the reset, and so on. To most users this degree of flexibility was never useful simply because it was so complex.
Under RISC OS 3.5 the hardware generates the same type of reset at power-on and when the reset button is pressed. Both are now effectively hard resets; the previous concept of hard and soft resets is no more. In both cases RISC OS 3.5 goes through the full sequence of reset operations. It:
You can still use the Break key as part of a reset combination (see below). This performs a partial reset that omits the self test and CMOS RAM clearing.
The following scheme is now used.
Key combination | Function |
---|---|
Power-on | Normal reset, use boot options |
Ctrl-break | Partial reset (no self-test or CMOS RAM reset), |
use boot options | |
Reset | Normal reset, use boot options |
The following modifiers can be used in conjunction with the above resets to change the boot behaviour:
Modifier | Function |
---|---|
Shift | Reverse action of configured boot option |
* (on keypad) | Use boot options, but boot to command line |
instead of the configured language |
For backward compatibility, pressing Shift-Break causes the same action as Shift-Ctrl-Break.
The following modifiers can be used to reset some or all of CMOS RAM, provided the CMOS protection connector is in the unprotected position:
The FSLock module protects the CMOS RAM and hard disc against unwanted modification. It does so by intercepting any SWIs that alter the hard disc contents or CMOS RAM, and returning an error instead.
FSLock cannot protect all discs on all filing systems; it can only protect drives 4 - 7 on any one filing system. By default, the Configure application sets FSLock to protect the ADFS hard discs 4-7.
Of course, a machine which allows no hard disc updates is not very useful, so two areas of a protected disc have been left unprotected:
FSLock operates in three states:
A fully unlocked machine has no password allocated to it, and can have its hard discs or configuration modified. This state persists over any sort of reset, and is the default selected after the CMOS RAM has been successfully cleared.
A partially unlocked machine has a password allocated to it, but can still have its hard discs and configuration modified. If reset the machine reverts to being locked.
A locked machine has a password allocated to it, and cannot have its hard discs or configuration modified. The machine stays in this state if it is reset.
The lock states are passed to commands using a lock status:
Status | Meaning |
---|---|
0 | Fully unlocked |
1 | Partially unlocked |
2 | Locked |
The password is case sensitive. The Configure application restricts the password to at least five non-space characters that are acceptable in a writable icon. Although the SWIs will accept any null terminated string, we strongly recommend you stay within the restrictions imposed by the Configure application's interface, otherwise users may find the machine locked with an untypable password.
--
R0 = version number × 100
R1 = pointer to module's workspace
Interrupt status is not altered
Fast interrupts are enabled
Processor is in SVC mode
SWI is re-entrant
This call returns information describing the FSLock module. R0 gives the module's version number, and R1 gives a pointer to the module's workspace.
This call is available from RISC OS 3.5 onwards.
None
None
Returns the current lock status, and the locked filing system's number
--
R0 = Lock status
R1 = locked filing system number (undefined if lock status = 0)
Interrupt status is not altered
Fast interrupts are enabled
Processor is in SVC mode
SWI is not re-entrant
This call returns the current lock status, and the locked filing system's number.
This SWI can only be called by number; not by name.
This call is available from RISC OS 3.5 onwards.
None
None
Changes one or more of the lock status, the password and the locked filing system
R0 = new Lock status
R1 = pointer to current file locking password
R2 = pointer to new file locking password
R3 = new locked filing system number
R0 - R3 preserved
Interrupts are enabled
Fast interrupts are enabled
Processor is in SVC mode
SWI is not re-entrant
This call changes one or more of the lock status, the password and the locked filing system. The new lock status must always be passed in R0; other parameters may be required depending on its value, and the current lock status:
Current lock status | ||||
---|---|---|---|---|
0 | 1 | 2 | ||
New lock status | 0 | - | R1 | R1 |
1 | R2, R3 | R1, R2, R3 | R1 | |
2 | R2, R3 | - | R1, R2, R3 |
If the old password is needed and not given correctly an error will be returned. If a filing system number is needed then a check will be made for that filing system's existence.
This SWI can only be called by number; not by name.
This call is available from RISC OS 3.5 onwards.
None
Changes the locked filing system and password
*FSLock_ChangePassword fs_name [new_password [new_password [old_password]]]
fs_name - a filing system name
new_password - new file locking password
old_password - current file locking password
*FSLock_ChangePassword changes the locked filing system and password. If the machine was fully unlocked then the old password need not be given. If any of the passwords aren't given then a prompt appears where the password can be entered without it being seen, since each character typed is displayed on the screen as a hyphen ('-').
This command is available from RISC OS 3.5 onwards.
*FSLock_ChangePassword scsifs New password: ------ New password again: ------ Old password: --------
*FSLock_Lock
*FSLock_Lock locks the machine from the partially unlocked state.
If the machine is fully unlocked or locked then an error message is given.
This command is available from RISC OS 3.5 onwards.
None
FSLock_Status
*FSLock_Status displays the machine's current lock state.
This command is available from RISC OS 3.5 onwards.
*FSLock_Status
No filing system is currently locked
None
*FSLock_Unlock [-full] [password]
password - current file locking password
*FSLock_Unlock unlocks the computer.
If the -full switch is given then the machine will be fully unlocked, otherwise a partial unlock will be done. If the password isn't given then a prompt appears where the password can be entered without it being seen, since each character typed is displayed on the screen as a hyphen ('-').
If the machine is already in the required state (partially or fully unlocked) then an appropriate error will be given.
This command is available from RISC OS 3.5 onwards.
*FSLock_Unlock -full gOL9pGbH