Redefine the a2 register passed by Qemu at start-up to also include some configuration flags, in addition to the CPU count, and define a flag to mirror the "-nographics" option.
Signed-off-by: Jason Thorpe <thor...@me.com> --- hw/alpha/dp264.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index ac97104464..d86dcb1d81 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -72,9 +72,20 @@ static void clipper_init(MachineState *machine) cpus[i] = ALPHA_CPU(cpu_create(machine->cpu_type)); } + /* arg0 -> memory size + arg1 -> kernel entry point + arg2 -> config word + + Config word: bits 0-5 -> ncpus + bit 6 -> nographics option (for HWRPB CTB) + + See init_hwrpb() in the PALcode. */ + cpus[0]->env.trap_arg0 = ram_size; cpus[0]->env.trap_arg1 = 0; cpus[0]->env.trap_arg2 = smp_cpus; + if (!machine->enable_graphics) + cpus[0]->env.trap_arg2 |= (1 << 6); /* Init the chipset. Because we're using CLIPPER IRQ mappings, the minimum PCI device IdSel is 1. */ -- 2.30.2