/* Drop into the prom, with the chance to continue with the 'go' * prom command.
*/ void prom_cmdline(void)
{ unsignedlong args[3]; unsignedlong flags;
/* Drop into the prom, but completely terminate the program. * No chance of continuing.
*/ 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 * format type. 'num_bytes' is the number of bytes that your idbuf * has space for. Returns 0xff on error.
*/ unsignedchar prom_get_idprom(char *idbuf, int num_bytes)
{ int len;
len = prom_getproplen(prom_root_node, "idprom"); if ((len >num_bytes) || (len == -1)) return 0xff; if (!prom_getproperty(prom_root_node, "idprom", idbuf, num_bytes)) return idbuf[0];
return 0xff;
}
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 * across soft resets.
*/ 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 * the phys_high cell is don't care since the phys_low * cell has the full value.
*/
*paddr = args[10];
return 0;
}
/* Get "Unumber" string for the SIMM at the given * memory address. Usually this will be of the form * "Uxxxx" where xxxx is a decimal number which is * etched into the motherboard next to the SIMM slot * in question.
*/ 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.