Exemplo n.º 1
0
void cmd_pmu_nvram(int argc, char** argv) {
	uint8_t reg;

	pmu_get_gpmem_reg(PMU_IBOOTSTATE, &reg);
	bufferPrintf("0: [iBootState] %02x\r\n", reg);
	pmu_get_gpmem_reg(PMU_IBOOTDEBUG, &reg);
	bufferPrintf("1: [iBootDebug] %02x\r\n", reg);
	pmu_get_gpmem_reg(PMU_IBOOTSTAGE, &reg);
	bufferPrintf("2: [iBootStage] %02x\r\n", reg);
	pmu_get_gpmem_reg(PMU_IBOOTERRORCOUNT, &reg);
	bufferPrintf("3: [iBootErrorCount] %02x\r\n", reg);
	pmu_get_gpmem_reg(PMU_IBOOTERRORSTAGE, &reg);
	bufferPrintf("4: [iBootErrorStage] %02x\r\n", reg);
}
Exemplo n.º 2
0
void pmu_set_iboot_stage(uint8_t stage) {
	int8_t state;
	pmu_get_gpmem_reg(PMU_IBOOTSTATE, (uint8_t*) &state);

	if(state >= 0) {
		pmu_set_gpmem_reg(PMU_IBOOTSTAGE, stage);
	}
}
Exemplo n.º 3
0
void pmu_set_iboot_stage(uint8_t stage) {
	uint8_t state = 0;
	
	pmu_get_gpmem_reg(PMU_IBOOTSTATE, &state);
	
	if ((state & 0xD0) != 0x80) {
		// There was some check here, omitted for now. -Oranav
		pmu_set_gpmem_reg(PMU_IBOOTSTAGE, stage);
	}
}