RS2030 MIPS workstation

Maciej W. Rozycki macro at linux-mips.org
Mon Aug 19 18:55:10 CDT 2019


On Tue, 2 Jul 2019, Patrick Mackinlay via cctalk wrote:

> For the MIPS Rx3230 systems, which use an M48T02, the mac address should 
> be in the first 6 bytes of NVRAM. You can read/write the NVRAM through 
> the boot monitor using the “g” (get) and “p” (put) commands. You also 
> need to provide the “-b” argument to specify byte width, and the 
> relevant address. The NVRAM is mapped at 0x1d000000-0x1d001fff in the 
> physical address space, but must also set the high bit to access it 
> through kseg0. Each 32-bit word in that range corresponds to a single 
> byte in the NVRAM, so the resulting commands will be something like:
> 
> 
>   *   g -b 0x9d000003 (read first byte of NVRAM)
>   *   g -b 0x9d000007 (read second byte of NVRAM)
>   *   ...
> 
> Or conversely:
> 
> 
>   *   p -b 0x9d000003 0xff (write 0xff to first byte of NVRAM)

 You probably want to use KSEG1 instead to access an MMIO resource, such 
as an NVRAM chip, especially with actual hardware and given that the chip 
is not linearly mapped in the address space in particular, or otherwise 
rubbish will be transferred through unused byte lanes as cache lines are 
read or written.

 With MAME it will of course depend on how accurate it is in reproducing 
the cache, although as a good measure I think correct access addresses 
ought to be always used.

 So:

  *   g -b 0xbd000003 (read first byte of NVRAM)
  *   g -b 0xbd000007 (read second byte of NVRAM)

and:

  *   p -b 0xbd000003 0xff (write 0xff to first byte of NVRAM)

respectively.

  Maciej


More information about the cctech mailing list