Exemplo n.º 1
0
IOReturn
MolNVRAM::read( IOByteCount offset, UInt8 *buffer, IOByteCount length )
{
	unsigned int i;
	// SIZE = kIODTNVRAMImageSize ?

	//printm("MolNVRAM::read %08lx\n", length);
	for( i=0; i<length; i++ )
		*buffer++ = OSI_ReadNVRamByte( offset++ );
	return kIOReturnSuccess;
}
Exemplo n.º 2
0
Arquivo: mol.c Projeto: tycho/openbios
void
arch_nvram_get( char *buf )
{
	int i, size = arch_nvram_size();

	/* support for zapping the nvram */
	if( get_bool_res("zap_nvram") == 1 ) {
		memset( buf, 0, size );
		return;
	}

	for( i=0; i<size; i++ )
		buf[i] = OSI_ReadNVRamByte( i );
}