Re: [PATCH] x86-64: disable the GART in shutdown

Andi Kleen
2007-06-23T11:08:41Z

On Saturday 23 June 2007 04:34:59 Yinghai Lu wrote:
> [PATCH] x86-64: disable the GART in shutdown
>
> For K8 system: 4G RAM with memory hole remapping enabled, or more than 4G RAM
> installed. when mem is allocated for GART, it will do the memset for clear.
> and for kexec case, the first kernel already enable that, the memset in second
> kernel will cause the system restart. solution will be:
> in second kernel: disable that at first before we try to allocate mem for it.
> or in the first kernel: do disable that before shutdown.

I thought we agreed it wasn't needed for the kdump case? Or rather
the only way to fix kdump was to reserve or better not use GART. Just disabling
it is not enough because it could be eventually reenabled and any
in flight DMAs could hit innocent memory.

For kexec it would be sufficient to do it in a platform device hook.

Also I'm a little uneasy in doing PCI access that late in reboot.
While there is luckily no bridge involved here it is still risky
after possibly other PCI hardware has been disabled.

So my suggestion would be:

(1) implement sysfs platform device based shutdown hooks (preferable
before PCI shutdown)
(2) make sure GART is never enabled in kernels that are all < 4GB (as
in the kdump kernel). But what to do about AGP?

-Andi