From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 8/8] drm/i915: Determine the stolen memory base address on gen2
Date: Thu, 28 Nov 2013 20:01:10 +0200 [thread overview]
Message-ID: <20131128180110.GC10036@intel.com> (raw)
In-Reply-To: <20131128163214.GA27806@nuc-i3427.alporthouse.com>
On Thu, Nov 28, 2013 at 04:32:14PM +0000, Chris Wilson wrote:
> On Thu, Nov 28, 2013 at 05:15:10PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > There doesn't seem to an explicit stolen memory base register on gen2.
> > Some old comment in the code suggests we should get it via
> > max_low_pfn_mapped, but that's clearly a bad idea on my MGM.
> >
> > The e820 map in said machine looks like this:
> > [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
> > [ 0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
> > [ 0.000000] BIOS-e820: [mem 0x00000000000ce000-0x00000000000cffff] reserved
> > [ 0.000000] BIOS-e820: [mem 0x00000000000dc000-0x00000000000fffff] reserved
> > [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f6effff] usable
> > [ 0.000000] BIOS-e820: [mem 0x000000001f6f0000-0x000000001f6f7fff] ACPI data
> > [ 0.000000] BIOS-e820: [mem 0x000000001f6f8000-0x000000001f6fffff] ACPI NVS
> > [ 0.000000] BIOS-e820: [mem 0x000000001f700000-0x000000001fffffff] reserved
> > [ 0.000000] BIOS-e820: [mem 0x00000000fec10000-0x00000000fec1ffff] reserved
> > [ 0.000000] BIOS-e820: [mem 0x00000000ffb00000-0x00000000ffbfffff] reserved
> > [ 0.000000] BIOS-e820: [mem 0x00000000fff00000-0x00000000ffffffff] reserved
> >
> > That makes max_low_pfn_mapped = 1f6f0000, so assuming our stolen memory
> > would start there would place it on top of some ACPI memory regions.
> > So not a good idea as already stated.
> >
> > The 9MB region after the ACPI regions at 0x1f700000 however looks
> > promising given that the macine reports the stolen memory size to be
> > 8MB. Looking at the PGTBL_CTL register, the GTT entries are at offset
> > 0x1fee00000, and given that the GTT entries occupy 128KB, it looks like
> > the stolen memory could start at 0x1f700000 and the GTT entries would
> > occupy the last 128KB of the stolen memory. I have no idea about the
> > extra 1MB after the GTT entries.
>
> The base address for stolen memory is explicitly Top of Memory on gen2,
> at least in 830/845 cspecs that I found (and recall). But this idea is
> interesting...
I have a hard time beliveing people would be nuts enough to place
the GTT entries somewhere the middle of the stolen memory area rather
than at the end. But I suppose I could be wrong.
There's also one additional reason why I suspect the last 1MB (or .5MB
on Daniel's machine) must be something else; it's covered by a UC MTRR,
whereas the presumed stolen memory range is not.
--
Ville Syrjälä
Intel OTC
prev parent reply other threads:[~2013-11-28 18:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 15:15 [PATCH 0/8] Gen2 stolen/local memory support ville.syrjala
2013-11-28 15:15 ` [PATCH 1/8] x86: Add vfunc for Intel graphics stolen memory base address ville.syrjala
2013-11-28 15:15 ` [PATCH 2/8] x86: Add Intel graphics stolen memory quirk for gen2 platforms ville.syrjala
2013-11-30 12:58 ` Ingo Molnar
2013-11-28 15:15 ` [PATCH 3/8] intel-gtt: Return whether we have local memory or not ville.syrjala
2013-11-28 15:15 ` [PATCH 4/8] intel-gtt: Assume last 128KB of stolen contains the GTT entries on gen2 ville.syrjala
2013-11-28 15:15 ` [PATCH 5/8] intel-gtt: Use i810_write_entry() on gen2 platforms ville.syrjala
2013-11-28 15:15 ` [PATCH 6/8] drm/i915: Add I915_CACHE_LOCAL to indicate local memory ville.syrjala
2013-11-28 15:15 ` [PATCH 7/8] drm/i915: Keep track if we have " ville.syrjala
2013-11-28 15:15 ` [PATCH 8/8] drm/i915: Determine the stolen memory base address on gen2 ville.syrjala
2013-11-28 16:32 ` Chris Wilson
2013-11-28 18:01 ` Ville Syrjälä [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=20131128180110.GC10036@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.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