提交 42791100 编写于 作者: S Simon Glass 提交者: Bin Meng

x86: Set up the MTRR for SDRAM

Set up MTRRs for the FSP SDRAM regions to improve performance.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 ea4e97a5
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <asm/fsp/fsp_support.h> #include <asm/fsp/fsp_support.h>
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/mrccache.h> #include <asm/mrccache.h>
#include <asm/mtrr.h>
#include <asm/post.h> #include <asm/post.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
...@@ -61,6 +62,8 @@ int dram_init_banksize(void) ...@@ -61,6 +62,8 @@ int dram_init_banksize(void)
gd->bd->bi_dram[bank].start = res_desc->phys_start; gd->bd->bi_dram[bank].start = res_desc->phys_start;
gd->bd->bi_dram[bank].size = res_desc->len; gd->bd->bi_dram[bank].size = res_desc->len;
mtrr_add_request(MTRR_TYPE_WRBACK, res_desc->phys_start,
res_desc->len);
log_debug("ram %llx %llx\n", gd->bd->bi_dram[bank].start, log_debug("ram %llx %llx\n", gd->bd->bi_dram[bank].start,
gd->bd->bi_dram[bank].size); gd->bd->bi_dram[bank].size);
} }
...@@ -69,6 +72,8 @@ int dram_init_banksize(void) ...@@ -69,6 +72,8 @@ int dram_init_banksize(void)
gd->bd->bi_dram[0].start = 0; gd->bd->bi_dram[0].start = 0;
gd->bd->bi_dram[0].size = low_end; gd->bd->bi_dram[0].size = low_end;
mtrr_add_request(MTRR_TYPE_WRBACK, 0, low_end);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册