All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/7] x86: fsp: Don't program MTRR for DRAM
Date: Sun, 1 Aug 2021 13:19:23 -0600	[thread overview]
Message-ID: <CAPnjgZ3xQOREpeO4_HecyOUUaMTChVHP9W_Wyc3-WhJmqLU51A@mail.gmail.com> (raw)
In-Reply-To: <20210731084529.7524-2-bmeng.cn@gmail.com>

Hi Bin,

On Sat, 31 Jul 2021 at 02:45, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> This actually reverts the following 2 commits:
>
> commit 427911001809 ("x86: Set up the MTRR for SDRAM")
> commit d46c0932a9d4 ("x86: fsp: Adjust calculations for MTRR range and DRAM top")
>
> There are several outstanding issues as to why:
>
> * For FSP1, the system memory and reserved memory used by FSP are
>   already programmed in the MTRR by FSP.
> * The 'mtrr_top' mistakenly includes TSEG memory range that has the
>   same RES_MEM_RESERVED resource type. Its address is programmed
>   and reported by FSP to be near the top of 4 GiB space, which is
>   not what we want for SDRAM.
> * The call to mtrr_add_request() is not guaranteed to have its size
>   to be exactly the power of 2. This causes reserved bits of the
>   IA32_MTRR_PHYSMASK register to be written which generates #GP.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/lib/fsp/fsp_dram.c | 35 ++++++++++-------------------------
>  1 file changed, 10 insertions(+), 25 deletions(-)

Unfortunately this makes coral (FSP2) go *very* slowly. Can you
perhaps do this change just for FSP1?

Regards,
Simon

  reply	other threads:[~2021-08-01 19:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31  8:45 [PATCH 0/7] x86: Various fixes to MTRR and FSP codes Bin Meng
2021-07-31  8:45 ` [PATCH 1/7] x86: fsp: Don't program MTRR for DRAM Bin Meng
2021-08-01 19:19   ` Simon Glass [this message]
2021-08-02  2:53     ` Bin Meng
2021-07-31  8:45 ` [PATCH 2/7] x86: mtrr: Do not clear the unused ones in mtrr_commit() Bin Meng
2021-08-01 19:19   ` Simon Glass
2021-08-02  2:50     ` Bin Meng
2021-07-31  8:45 ` [PATCH 3/7] x86: mtrr: Skip MSRs that were already programmed " Bin Meng
2021-08-01 19:19   ` Simon Glass
2021-08-02  2:50     ` Bin Meng
2021-07-31  8:45 ` [PATCH 4/7] x86: mtrr: Abort if requested size is not power of 2 Bin Meng
2021-08-01 19:19   ` Simon Glass
2021-08-02  2:50     ` Bin Meng
2021-07-31  8:45 ` [PATCH 5/7] x86: cmd: hob: Fix the command usage and help messages Bin Meng
2021-08-01 19:19   ` Simon Glass
2021-08-02  2:50     ` Bin Meng
2021-07-31  8:45 ` [PATCH 6/7] x86: cmd: hob: Fix display of resource type for system memory Bin Meng
2021-08-01 19:19   ` Simon Glass
2021-08-02  2:50     ` Bin Meng
2021-07-31  8:45 ` [PATCH 7/7] x86: fsp: Only FSP2 has INIT_PHASE_END_FIRMWARE Bin Meng
2021-08-01 19:19   ` Simon Glass
2021-08-02  2:53     ` Bin Meng

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=CAPnjgZ3xQOREpeO4_HecyOUUaMTChVHP9W_Wyc3-WhJmqLU51A@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.