All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Thorpe <thorpej@me.com>
To: qemu-devel@nongnu.org
Cc: Jason Thorpe <thorpej@me.com>, richard.henderson@linaro.org
Subject: [PATCH 4/4] alpha: Provide console information to the PALcode at start-up.
Date: Sun, 13 Jun 2021 14:15:49 -0700	[thread overview]
Message-ID: <20210613211549.18094-5-thorpej@me.com> (raw)
In-Reply-To: <20210613211549.18094-1-thorpej@me.com>

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 <thorpej@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



  parent reply	other threads:[~2021-06-13 21:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 21:15 [PATCH 0/4] Emulator fixes to enable running NetBSD/alpha Jason Thorpe
2021-06-13 21:15 ` [PATCH 1/4] mc146818rtc: Make PF independent of PIE Jason Thorpe
2021-06-15  4:17   ` Richard Henderson
2021-06-16 17:34     ` Jason Thorpe
2021-06-19 15:56       ` Philippe Mathieu-Daudé
2021-06-19 16:25         ` Jason Thorpe
2021-06-13 21:15 ` [PATCH 2/4] alpha: Set minimum PCI device ID to 1 to match Clipper IRQ mappings Jason Thorpe
2021-06-15  4:03   ` Richard Henderson
2021-06-13 21:15 ` [PATCH 3/4] alpha: Provide a PCI-ISA bridge device node for guest OS's that expect it Jason Thorpe
2021-06-15  4:20   ` Richard Henderson
2021-06-15  4:24     ` Jason Thorpe
2021-06-16 13:53       ` Jason Thorpe
2021-06-16 16:55         ` Richard Henderson
2021-06-13 21:15 ` Jason Thorpe [this message]
2021-06-15  4:08   ` [PATCH 4/4] alpha: Provide console information to the PALcode at start-up Richard Henderson
2021-06-14 22:09 ` [PATCH 0/4] Emulator fixes to enable running NetBSD/alpha no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210613211549.18094-5-thorpej@me.com \
    --to=thorpej@me.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.