qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Jason Thorpe <thorpej@me.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 7/8] Provide a Console Terminal Block in the HWRPB.
Date: Sun, 6 Jun 2021 12:27:23 -0700	[thread overview]
Message-ID: <00e68b2d-0f5e-8c3b-f7b4-91977e5bb60f@linaro.org> (raw)
In-Reply-To: <20210603035317.6814-8-thorpej@me.com>

On 6/2/21 8:53 PM, Jason Thorpe wrote:
> +  hwrpb.hwrpb.ctbt_offset = offsetof(struct hwrpb_combine, ctb);
> +  hwrpb.hwrpb.ctb_size = sizeof(hwrpb.ctb);
> +  if (have_vga && !CONFIG_NOGRAPHICS(config))
> +    {
> +      hwrpb.ctb.term_type = CTB_GRAPHICS;
> +      hwrpb.ctb.turboslot = (CTB_TURBOSLOT_TYPE_PCI << 16) |
> +			    (pci_vga_bus << 8) | pci_vga_dev;
> +    }
> +  else
> +    {
> +      hwrpb.ctb.term_type = CTB_PRINTERPORT;
> +    }

I'm concerned that you're initializing only 1 or 2 slots of 34.

It would seem that at a bare minimum the struct should be zeroed, and the 
device-independent header (4 slots) should be set.

I notice you're setting term_type (offset 56) and not type (offset 0), which is 
where my documentation says that CTB_GRAPHICS goes (Console Interface 
Architecture 2.3.8.2 Console Terminal Block Table).

I'm also confused that this

> + * Format of the Console Terminal Block Type 4 `turboslot' field:

says "type 4", but you're actually using type 3 (GRAPHICS) above.

But I do see that what you're filling in is exactly what netbsd examines -- no 
header checks, no size checks, or anything.  And that openbsd has an exact copy 
of that code.


r~


  reply	other threads:[~2021-06-06 19:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  3:53 [PATCH 0/8] PALcode fixes required to run NetBSD/alpha Jason Thorpe
2021-06-03  3:53 ` [PATCH 1/8] Make qemu-palcode build environment standalone. NFC Jason Thorpe
2021-06-05 23:27   ` Richard Henderson
2021-06-03  3:53 ` [PATCH 2/8] Fix delivery of unaligned access exceptions Jason Thorpe
2021-06-05 23:28   ` Richard Henderson
2021-06-03  3:53 ` [PATCH 3/8] Fix initialization of the hwrpb.hwrpb.cpuid field Jason Thorpe
2021-06-06  0:28   ` Richard Henderson
2021-06-03  3:53 ` [PATCH 4/8] Make some PCI macros available to other files. NFC Jason Thorpe
2021-06-06  0:32   ` Richard Henderson
2021-06-03  3:53 ` [PATCH 5/8] Fix incorrect initialization of PCI BARs Jason Thorpe
2021-06-03  9:24   ` Philippe Mathieu-Daudé
2021-06-04 18:23     ` Jason Thorpe
2021-06-06  0:41   ` Richard Henderson
2021-06-03  3:53 ` [PATCH 6/8] Provide interrupt mapping information in PCI config registers Jason Thorpe
2021-06-06  1:49   ` Richard Henderson
2021-06-03  3:53 ` [PATCH 7/8] Provide a Console Terminal Block in the HWRPB Jason Thorpe
2021-06-06 19:27   ` Richard Henderson [this message]
2021-06-06 20:12     ` Jason Thorpe
2021-06-03  3:53 ` [PATCH 8/8] Fixes for seconday CPU start-up Jason Thorpe
2021-06-06 20:27   ` Richard Henderson
2021-06-03  9:26 ` [PATCH 0/8] PALcode fixes required to run NetBSD/alpha Philippe Mathieu-Daudé
2021-06-06 20:30 ` Richard Henderson

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=00e68b2d-0f5e-8c3b-f7b4-91977e5bb60f@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thorpej@me.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).