lkml.org 
[lkml]   [2007]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] x86-64: disable the GART before allocate aperture
    [PATCH] x86-64: disable the GART before allocate aperture

    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. So disable that at first before we try to
    allocate mem for it.

    Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

    diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c
    index a3d450d..7a1b072 100644
    --- a/arch/x86_64/kernel/aperture.c
    +++ b/arch/x86_64/kernel/aperture.c
    @@ -270,6 +270,19 @@ void __init iommu_hole_init(void)
    printk("This costs you %d MB of RAM\n",
    32 << fallback_aper_order);

    + /*
    + * disable it in case it is enabled before, esp for kexec/kdump,
    + * previous kernel already enable that. otherwise memset called
    + * by allocate_aperture/__alloc_bootmem_nopanic cause restart.
    + */
    + for (num = 24; num < 32; num++) {
    + if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00)))
    + continue;
    +
    + write_pci_config(0, num, 3, 0x90, 0);
    + write_pci_config(0, num, 3, 0x94, 0);
    + }
    +
    aper_order = fallback_aper_order;
    aper_alloc = allocate_aperture();
    if (!aper_alloc) {
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-06-22 21:21    [W:0.020 / U:0.436 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site