Messages in this thread | | | Date | Tue, 7 Apr 2015 14:34:57 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH] x86, aperture: Check for GART before accessing GART registers |
| |
On Mon, Apr 06, 2015 at 06:10:22PM -0500, Aravind Gopalakrishnan wrote: > >So what happens if !early_pci_allowed() but the GART is present? We'll > >set amd_northbridges.flags |= AMD_NB_GART, but won't run any of the > >setup code in aperture_64.c, right? Is that a valid setup? > > It might be a valid setup. But it would work correctly only if BIOS did the > right thing with setting up aperture space. > > If !early_pci_allowed() and BIOS did not setup aperture correctly, that > would have caused problems already. > But it has not been an issue so far right?
I think the right question to ask is:
What are we doing when there's no GART?
So what you probably want to do is:
if (!amd_gart_present()) return -ENODEV;
*before* the compound check.
Now, if we have detected a GART, i.e., amd_gart_present() is TRUE, the code will behave as it used to behave before.
This should be the least intrusive change going forward IMHO.
-- Regards/Gruss, Boris.
ECO tip #101: Trim your mails when you reply. --
| |