lkml.org 
[lkml]   [2008]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] x86_32: trim memory by updating e820 v3
    On Sat, Apr 26, 2008 at 3:56 AM, Andrew Morton
    <akpm@linux-foundation.org> wrote:
    > On Tue, 22 Jan 2008 16:23:20 -0800 Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
    >
    > > [PATCH] x86_32: trim memory by updating e820 v3
    > >
    > > when mtrr is not covering all e820 table, need to trim the ram, need to update e820
    > >
    > > reuse some code for x86_64
    > >
    > > here need to add early_get_cap and use it in early_cpu_detect, and move mtrr_bp_init early
    > >
    > > need Justine to test with his special system with bug bios.
    > >
    > > Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
    >
    > Speaking of mtrr and e820....
    >
    > Could someone please take a peek at
    > http://bugzilla.kernel.org/show_bug.cgi?id=10508 ?
    >
    > For some reason we seem to have turned this:
    >
    > [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
    > [ 0.000000] BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
    > [ 0.000000] BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved)
    > [ 0.000000] BIOS-e820: 0000000000100000 - 00000000bf6d0000 (usable)
    > [ 0.000000] BIOS-e820: 00000000bf6d0000 - 00000000bf6e3000 (ACPI NVS)
    > [ 0.000000] BIOS-e820: 00000000bf6e3000 - 00000000c0000000 (reserved)
    > [ 0.000000] BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
    > [ 0.000000] BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
    > [ 0.000000] BIOS-e820: 00000000fed00000 - 00000000fed00400 (reserved)
    > [ 0.000000] BIOS-e820: 00000000fed14000 - 00000000fed1a000 (reserved)
    > [ 0.000000] BIOS-e820: 00000000fed1c000 - 00000000fed90000 (reserved)
    > [ 0.000000] BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
    > [ 0.000000] BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
    > [ 0.000000] BIOS-e820: 0000000100000000 - 0000000140000000 (usable)
    >
    > into this:
    >
    > reg00: base=0xc0000000 (3072MB), size=1024MB: uncachable, count=1
    > reg01: base=0x00000000 ( 0MB), size=4096MB: write-back, count=1
    > reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1
    > reg03: base=0xbf700000 (3063MB), size= 1MB: uncachable, count=1
    > reg04: base=0xbf800000 (3064MB), size= 8MB: uncachable, count=1
    >
    > which screws up the X server's attempt to map the video memory at
    > 0xd0000000.
    >

    the BIOS should have set memhole to 2048MB or 2560M instead of 1033MB

    good mtrr should

    > reg00: base=0x00000000 (0MB), size=2048MB: write-back, count=1
    > reg01: base=0x100000000 (4096MB), size=2048MB: write-back, count=1

    or

    > reg00: base=0x00000000 (0MB), size=2048MB: write-back, count=1
    > reg01: base=0x80000000 (2048MB), size=512MB: write-back, count=1
    > reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1
    > reg03: base=0x140000000 (4096MB), size=512MB: write-back, count=1

    so please talk to your HW esp CPU vendor to fix the BIOS problem.

    AMD Rev F and Quadcore should get

    > reg00: base=0x00000000 (0MB), size=2048MB: write-back, count=1

    or

    > reg00: base=0x00000000 (0MB), size=2048MB: write-back, count=1
    > reg01: base=0x80000000 (2048MB), size=512MB: write-back, count=1

    because [4G, TOM2) is WB by default.

    YH


    \
     
     \ /
      Last update: 2008-04-27 03:25    [W:0.025 / U:210.156 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site