[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/8] Provide a Console Terminal Block in the HWRPB.
From: |
Richard Henderson |
Subject: |
Re: [PATCH 7/8] Provide a Console Terminal Block in the HWRPB. |
Date: |
Sun, 6 Jun 2021 12:27:23 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
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~
- Re: [PATCH 2/8] Fix delivery of unaligned access exceptions., (continued)
- [PATCH 4/8] Make some PCI macros available to other files. NFC., Jason Thorpe, 2021/06/02
- [PATCH 5/8] Fix incorrect initialization of PCI BARs., Jason Thorpe, 2021/06/02
- [PATCH 6/8] Provide interrupt mapping information in PCI config registers., Jason Thorpe, 2021/06/02
- [PATCH 7/8] Provide a Console Terminal Block in the HWRPB., Jason Thorpe, 2021/06/02
- Re: [PATCH 7/8] Provide a Console Terminal Block in the HWRPB.,
Richard Henderson <=
- [PATCH 8/8] Fixes for seconday CPU start-up., Jason Thorpe, 2021/06/02
- Re: [PATCH 0/8] PALcode fixes required to run NetBSD/alpha., Philippe Mathieu-Daudé, 2021/06/03
- Re: [PATCH 0/8] PALcode fixes required to run NetBSD/alpha., Richard Henderson, 2021/06/06