mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Add CPU reg node from PIR if available
git-svn-id: svn://coreboot.org/openbios/openbios-devel@328 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -229,26 +229,50 @@ cpu_generic_init(const struct cpudef *cpu)
|
||||
fword("encode-string");
|
||||
push_str("state");
|
||||
fword("property");
|
||||
}
|
||||
|
||||
fword("finish-device");
|
||||
static void
|
||||
cpu_add_pir_property(void)
|
||||
{
|
||||
unsigned long pir;
|
||||
|
||||
asm("mfspr %0, 1023\n"
|
||||
: "=r"(pir) :);
|
||||
PUSH(pir);
|
||||
fword("encode-int");
|
||||
push_str("reg");
|
||||
fword("property");
|
||||
}
|
||||
|
||||
static void
|
||||
cpu_604_init(const struct cpudef *cpu)
|
||||
{
|
||||
cpu_generic_init(cpu);
|
||||
cpu_add_pir_property();
|
||||
|
||||
fword("finish-device");
|
||||
}
|
||||
|
||||
static void
|
||||
cpu_750_init(const struct cpudef *cpu)
|
||||
{
|
||||
cpu_generic_init(cpu);
|
||||
|
||||
PUSH(0);
|
||||
fword("encode-int");
|
||||
push_str("reg");
|
||||
fword("property");
|
||||
|
||||
fword("finish-device");
|
||||
}
|
||||
|
||||
static void
|
||||
cpu_g4_init(const struct cpudef *cpu)
|
||||
{
|
||||
cpu_generic_init(cpu);
|
||||
cpu_add_pir_property();
|
||||
|
||||
fword("finish-device");
|
||||
}
|
||||
|
||||
static const struct cpudef ppc_defs[] = {
|
||||
|
||||
Reference in New Issue
Block a user