/* Drop into the prom, but completely terminate the program. *Nochanceofcontinuing.
*/ void notrace prom_halt(void)
{ unsignedlong args[3];
#ifdef CONFIG_SUN_LDOMS if (ldom_domaining_enabled)
ldom_power_off(); #endif
again:
args[0] = (unsignedlong) "exit";
args[1] = 0;
args[2] = 0;
p1275_cmd_direct(args); goto again; /* PROM is out to get me -DaveM */
}
/* if nothing else helps, we just halt */
prom_halt();
}
/* Get the idprom and stuff it into buffer 'idbuf'. Returns the *formattype.'num_bytes'isthenumberofbytesthatyouridbuf *hasspacefor.Returns0xffonerror.
*/ unsignedchar prom_get_idprom(char *idbuf, int num_bytes)
{ int len;
len = prom_getproplen(prom_root_node, "idprom"); if ((len >num_bytes) || (len == -1)) return0xff; if (!prom_getproperty(prom_root_node, "idprom", idbuf, num_bytes)) return idbuf[0];
return0xff;
}
staticint prom_get_mmu_ihandle(void)
{
phandle node; int ret;
if (prom_mmu_ihandle_cache != 0) return prom_mmu_ihandle_cache;
node = prom_finddevice(prom_chosen_path);
ret = prom_getint(node, prom_mmu_name); if (ret == -1 || ret == 0)
prom_mmu_ihandle_cache = -1; else
prom_mmu_ihandle_cache = ret;
return ret;
}
staticint prom_get_memory_ihandle(void)
{ staticint memory_ihandle_cache;
phandle node; int ret;
if (memory_ihandle_cache != 0) return memory_ihandle_cache;
node = prom_finddevice("/chosen");
ret = prom_getint(node, "memory"); if (ret == -1 || ret == 0)
memory_ihandle_cache = -1; else
memory_ihandle_cache = ret;
/* Set aside physical memory which is not touched or modified *acrosssoftresets.
*/ int prom_retain(constchar *name, unsignedlong size, unsignedlong align, unsignedlong *paddr)
{ unsignedlong args[11];
/* Next we get "phys_high" then "phys_low". On 64-bit *thephys_highcellisdon'tcaresincethephys_low *cellhasthefullvalue.
*/
*paddr = args[10];
return0;
}
/* Get "Unumber" string for the SIMM at the given *memoryaddress.Usuallythiswillbeoftheform *"Uxxxx"wherexxxxisadecimalnumberwhichis *etchedintothemotherboardnexttotheSIMMslot *inquestion.
*/ int prom_getunumber(int syndrome_code, unsignedlong phys_addr, char *buf, int buflen)
{ unsignedlong args[12];
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.