The OS_ReadSysInfo SWI has been extended and modified since the calls documented in the PRMs. The full list of OS_ReadSysInfo reason codes currently supported is :
OS_ReadSysInfo 0 - Read configured screen size
(Read configured screen size
R0 = 0
R0 = 0
This SWI no longer returns any configured screen size details. The screen size is managed entirely at the discretion of the video driver modules. Originally this SWI returned the size of the configured screen memory in bytes.
Read configured mode, monitor type and sync
R0 = 1
R0 = configured mode R1 = configured monitor type R2 = configured sync
This SWI reads the configured mode, monitor type and sync type as previously. Whilst the values are configurable, it is recommended that they be set to Auto except where this is a problem. The automatic detection of monitor type will be performed by the video hardware as necessary.
Read chip presence and unique machine ID
R0 = 2
R0 = hardware configuration word 0 : bits 0-7 = special functions chip type: 0 = none 1 = IOEB bits 8-15 = I/O controller chip type: 0 = IOC 1 = IOMD 255 = undefined bits 16-23 = Memory controller chip type: 0 = MEMC1/MEMC1a 1 = IOMD 255 = undefined bits 24-31 = video controller chip type: 0 = VIDC1a 1 = VIDC20 255 = undefined R1 = hardware configuration word 1 : bits 0-7 = I/O chip type: 0 = none 1 = 82C710/711, or SMC'665 or similar bits 8-31 = reserved R2 = hardware configuration word 2 : bits 0-7 = LCD controller type: 0 = none 1 = A4 controller 2 = 'Stork' controller bits 8-15 = IOMD type: 0 = IOMD 1 = IOMDL 255 = none bits 16-23 = VIDC20 type: 0 = VIDC20 1 = VIDC2L 255 = none bit 24 = IIC bus speed (unset = 100kHz, set = 400kHz) bit 25 = IO clock state when idling (unset = running, set = stopped) bits 26-31 = reserved R3 = unique machine ID word 0 R4 = unique machine ID word 1
This SWI is used to read information on the hardware used within the system. In many cases this will be determined by the hardware drivers rather than the Kernel, and it is therefore prudent to interrogate the specific hardware driver modules rather than the Kernel. The Kernel restricts itself, in general, to those tasks which it is vital to perform for system start up and management. The operation of the hardware devices outside of this is the domain of the hardware drivers and correspondingly many of the fields may appear as 'undefined'.
Read features mask for 82C710-compatible chip family
R0 = 3
R0 = basic features mask : bits 0-3 = IDE interface: 0 = absent 1 = present bits 4-7 = floppy disc interface 0 = absent 1 = present bits 8-11 = parallel port 0 = absent 1 = present, original device number assignment 2 = present, alternate device number assignment bits 12-15 = 1st serial port 0 = absent 1 = present, original device number assignment 2 = present, alternate device number assignment bits 16-19 = 2nd serial port 0 = absent 1 = present, original device number assignment 2 = present, alternate device number assignment bits 20-23 = chip configuration type 0 = no chip present, or largely incompatible 1 = 82C710 2 = 82C711 3 = SMC'665 4 = SMC'669 5 = UMC'669 bits 24-31 = reserved R1 = extra features mask : bits 0-3 = IDE interface features (all reserved) bits 4-7 = floppy interface features (all reserved) bits 8-11 = parallel port features : bit 8 = fast parallel present bits 9-11 reserved bits 12-15 = 1st serial port features : bit 12 = FIFOs available bits 13-15 reserved bits 16-19 = 2nd serial port features : bit 16 = FIFOs available bits 17-19 reserved bits 20-23 = chip configuration (all reserved) bits 24-31 = reserved R2-R4 = 0
This SWI has been updated to reflect the modern usage of the hardware IO chips used in RISC OS systems to date. It will return 0 in all fields for non-82710-compatible chipsets. See PRM 1-723 and PRM 5a-221 for more details.
Read machine ethernet address
R0 = 4
R0 = Ethernet MAC address word 0, or 0 if not known R1 = Ethernet MAC address word 1, or 0 if not known
This SWI is used to read the machine's ethernet address. It should only be used within constrained environments where only a single ethernet network interface is available. This SWI was introduced to allow simpler expansion of systems with only a single network interface. It is recommended that network drivers should only use their own unique MAC address in preference to this value.
Read raw machine ID
R0 = 5
R0 = raw machine ID word 0 R1 = raw machine ID word 1
This SWI is used to read the raw machine ID as read from the system hardware. No interpretation should be placed upon the value by clients.
Read kernel values
R0 = 6 R1 = pointer to list of kernel values to read R2 = pointer to block to fill in with values
block at R2 filled in
R0 = 6 R1 = 0 R2 = single kernel value to read
R2 = value of single item
This SWI can be used to obtain information about the Kernel's internal variables which it chooses to export. The variables are subject to change and may have caveats on their use. They are only expected to be used by components where the operation required is not supported by defined interfaces. In such cases, using the information provided by OS_ReadSysInfo 6 is preferred over using hard-coded values. Using information provided by more structured interfaces which the OS provides is preferred over using OS_ReadSysInfo 6.
The following values are defined. Strictly they are reserved for internal use, but are provided for completeness.
0 Address of OS page table
Any item may return an error, or the value 0 when being read to indicate that it is unavailable.
Read last abort details
R0 = 7
R0 preserved R1 = 32-bit PC of last abort R2 = 32-bit PSR of last abort R3 = fault address of last abort
This SWI returns the details about the last failing abort. The fault address is the same as the 32bit PC for a pre-fetch abort. For a data abort, it contains the address whose access caused the abort. Aborts which are handled by other components may occur, and do not update these details. Such aborts are handled by the OS_AbortTrap interface, or the DynamicArea abort handlers. See documents OS_AbortTrap, OSDynamicArea, and AbortableDAs for more details.
Read platform class
R0 = 8
R0 = platform class : 0 = unknown 1 = RiscPC 2 = A7000 3 = A7000+ (including RiscStation) 4 = allocated to Phoebe 5 = allocated to Pace abstracted kernel based systems 6 = allocated to VirtualRPC 7 = A9 R1 = platform feature flags : bit 0 = supports podule devices bit 1 = supports PCI devices bit 2 = supports additional processors bit 3 = allocated for external use bit 4 = operating system is RAM loaded R2 = platform feature support. Bits set in line with values in R0 if feature defined
This SWI is used to read details about the platform upon which the OS is running.
Read ROM information
R0 = 9 R1 = item to return : 0 = OS name 1 = Release part number 2 = Build date 3 = Dealer name 4 = User name 5 = User address 6 = Printable OS description other values reserved
R0 = pointer to requested string or 0 if item is not defined
This SWI is used to read details about the ROM build and details. It may be used to read additional information about the system in order to provide diagnostics. It is important that privacy concerns be addressed if such information is distributed, particularly if the user name and address fields are to be exported.
Read OS version
R0 = 10
R0 = OS version number * 100 R1 = Kernel version number * 100 R2 = SystemInit version number and system type: bits 0-15 = version number bits 16-31 = init type: 0 = RiscPC other = reserved R3 = Reserved (0)
This SWI is used to read the version number of the Operating System and Kernel. In order to differentiate between the OS as a whole and the Kernel itself, this SWI provides a mechanism for reading the version number of both.
The operating system version is contained within the help string for the UtilityModule. This describes the system as a whole. It should be used when checking for the general level of compatibility is required.
The Kernel version has, in the past, only been returned by the return from OS_Byte 0 as part of the error report. This interface defines a mechanism by which the version can be obtained without needing to parse a free-format string.
The SystemInit version number and system type are returned by the initialisation code and indicate the basic loader which is used to enter the Operating System.
The value returned in R3 will be defined in a future version of this call, and should not be interpreted by software.
This SWI call is available from Kernel 9.03.
Read debug information
R0 = 11
R0 = pointer to function for debug character output R1 = pointer to function for debug character input
This SWI is used to read the diagnostic functions provided by the SystemInit code in order to debug the system. Usually this is a simple serial I/O stream which is managed by the SystemInit code, although other mechanisms may be employed dependant on hardware. The functions are expected to be called from a privileged mode, although operation in non-privileged modes is at that discretion of the SystemInit code. The functions have the following parameters:
Debug output function
R0 = character to write to debug stream
R0-R3, PSR corrupt
Debug input function
R0 = character read from debug stream, or -1 if no character available R1-R3, PSR corrupt
Both routines expect a small amount of stack to be available.
This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holders permission. RISC OS is subject to continuous development and improvement as such all information is reproduced by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.
HTML document version 1.03 3rd November 2015