qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Chad Jablonski" <chad@jablonski.xyz>
To: "BALATON Zoltan" <balaton@eik.bme.hu>,
	"Chad Jablonski" <chad@jablonski.xyz>
Cc: <qemu-devel@nongnu.org>, "Gerd Hoffmann" <kraxel@redhat.com>,
	<marcandre.lureau@redhat.com>
Subject: Re: [PATCH] ati-vga: Fix framebuffer mapping by using hardware-correct aperture sizes
Date: Fri, 17 Oct 2025 09:56:30 -0400	[thread overview]
Message-ID: <DDKNDZRDU96I.22RLY22ASJ5TL@jablonski.xyz> (raw)
In-Reply-To: <93a93652-0203-47f0-6179-edfa543990fa@eik.bme.hu>

>
> For this R100 card APER_SIZE matches MEMSIZE but the BAR length is twice 
> that. Maybe the other card you get will shed some light on what's going on 
> with Radeon. I've looked up what the FCode ROM I've tested was doing. This 
> is from a Card#109-85500-00 Rom#113-85501-226 according to the IDs it sets 
> in the device tree, probably from a PowerMac but I don't have the card 
> just found this ROM. The detokenized part of this Radeon 7000/RV100 ROM 
> that accesses CONFIG_APER_SIZE looks like this:
>
>    7321: const_REG_CONFIG_APER_SIZE
>    7323: ati-reg-l@
>    7325: dup
>    7326: b(to) var_aper_size
>    7329: 2*
>    7330: b(to) var_ram_size
>    7333: const_REG_CONFIG_REG_APER_SIZE
>    7335: ati-reg-l@
>    7337: 2*
>    7338: b(to) var_mmio_size
>
> The variable names were invented by me so it's possible that it actually 
> means vram and mmio BAR size but it does 2* for both the VRAM and REG 
> APERS and this is the size it then uses for map-in and map-out calls so 
> this suggests these registers are half of the BAR size at least for this 
> card.
>

I got the card! It looks like it was exactly as you suspected and I
think this matches with what you're seeing in the FCode. The
CONFIG_APER_SIZE is half of BAR0 for both Rage 128 and R100:

Card                              VRAM    PCI BAR0   CONFIG_MEMSIZE  CONFIG_APER_SIZE  AGP_APER_OFFSET
-----------------------           ----    --------   --------------  ----------------  ---------------
Rage 128 Pro Ultra TF             32MB     64MB       0x02000000      0x02000000        0x02000000
Rage 128 RF/SG AGP                16MB     64MB       0x01000000      0x02000000        0x02000000
Radeon R100 QD [Radeon 7200]      64MB    128MB       0x04000000      0x04000000        N/A
Radeon RV100 QY [Radeon 7000/VE]  32MB    128MB       0x02000000      0x04000000        N/A

>
> I only have a Rage Mobility M6 Design Guide (M6 is another name for RV100) 
> that talks about memory size and it says that it's minimum 8MB maximum 
> 64MB but could be R100 supported more. It's still possible that the BAR 
> size is twice the VRAM size for some reason but we don't have enough 
> evidence for that.
>

Oh! I didn't realize that! That's good to know, I'll dig that up.

I'll include what I learned from the new card and send along a v3 shortly.

- Chad


      reply	other threads:[~2025-10-17 13:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01  3:46 [PATCH] ati-vga: Fix framebuffer mapping by using hardware-correct aperture sizes Chad Jablonski
2025-10-07 20:52 ` BALATON Zoltan
2025-10-07 20:57   ` BALATON Zoltan
2025-10-13 14:52   ` Chad Jablonski
2025-10-13 16:24     ` BALATON Zoltan
2025-10-13 20:04       ` Chad Jablonski
2025-10-14 23:26         ` BALATON Zoltan
2025-10-15 14:34           ` Chad Jablonski
2025-10-15 23:51             ` BALATON Zoltan
2025-10-17 13:56               ` Chad Jablonski [this message]

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=DDKNDZRDU96I.22RLY22ASJ5TL@jablonski.xyz \
    --to=chad@jablonski.xyz \
    --cc=balaton@eik.bme.hu \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.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 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).