KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
flash.h File Reference

BIOS replacement flashrom support. More...

#include <arch/types.h>

Go to the source code of this file.

Functions

int nvflash_detect ()
 Try to detect a compatible flashrom. More...
 
int nvflash_erase_block (uint32 addr)
 Erase a single block of flashrom. More...
 
int nvflash_write_block (uint32 addr, void *data, uint32 len)
 Write data to the flashrom. More...
 
int nvflash_erase_all ()
 Erase the whole flashrom. More...
 

Detailed Description

BIOS replacement flashrom support.

This file is involved with accessing an flashrom chip soldered in place to replace the BIOS ROM. Specifically, this driver is for accessing a STMicro M29W800B, but should also work with other chips like the M29W160B or equivalent AMD chips.

Author
Dan Potter

Function Documentation

int nvflash_detect ( )

Try to detect a compatible flashrom.

Returns
0 if a compatible flashrom is detected, <0 if the normal Dreamcast BIOS is detected.
int nvflash_erase_all ( )

Erase the whole flashrom.

Returns
0 on success, <0 on error.
int nvflash_erase_block ( uint32  addr)

Erase a single block of flashrom.

Parameters
addrThe block of the flashrom to erase.
Returns
0 on success, <0 on error.
int nvflash_write_block ( uint32  addr,
void *  data,
uint32  len 
)

Write data to the flashrom.

Parameters
addrThe block of the flashrom to write to.
dataThe data to write.
lenThe length of the data, in bytes.
Returns
0 on success, <0 on error.