Non-volatile RAM vector

Under earlier versions of the operating system the non-volatile RAM ('NVRAM', also referred to as CMOS RAM, or battery backed RAM) was handled entirely by the Kernel. From Kernel 9.48, the handling of NVRAM is delegated to hardware support modules. The Kernel communicates with these modules through the vector NVRAMV.

Vector NVRAMV (&3E)
On entry
   R0 = reason code :
         0 = fill cache with values
         1 = read single value
         2 = write single value
         Others reserved
   R1 = parameters
On exit
   R0 = -1 if handled,
   Others according to reason code

This vector is called by the Kernel to control the configuration data stored in the NVRAM.

NVRAMV 0 (Fill cache)
On entry
   R0 = 0
   R1 = pointer to cache block to fill
   R2 = number of bytes to fill On exit
   R2 = amount of NVRAM available

This vector is called by the Kernel to fill in its cache of NVRAM values. A cache is provided in order to reduce the impact of repeated reading of configuration data by clients. Clients should write 0 to the cache for unsupported values. The number of bytes to fill may take any value. The total amount of NVRAM should be returned, not the amount of NVRAM filled. Only the first 240 bytes of NVRAM will be used by the Kernel initially.

NVRAMV 1 (Read single value)
On entry
   R0 = 1
   R1 = byte to read On exit
   R1 = value read, or 0 if byte is out of range

This vector is called by the Kernel to read a single value. It will usually only be used before the NVRAM cache has been populated during system initialisation.

NVRAMV 2 (Write single value)
On entry
   R0 = 2
   R1 = byte to write
   R2 = value to write

This vector is called by the Kernel to write a single value to the NVRAM.

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