{cpu,drivers,nb,soc}/intel: Use CACHE_ROM_BASE where appropriate
Change-Id: Ibc2392cd2a00fde3e15dda4d44c8b6874d7ac8a3 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/26574 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
This commit is contained in:
@ -74,7 +74,7 @@ void *setup_stack_and_mtrrs(void)
|
|||||||
postcar_frame_init_lowmem(&pcf);
|
postcar_frame_init_lowmem(&pcf);
|
||||||
|
|
||||||
/* Cache the ROM as WP just below 4GiB. */
|
/* Cache the ROM as WP just below 4GiB. */
|
||||||
postcar_frame_add_mtrr(&pcf, -CACHE_ROM_SIZE, CACHE_ROM_SIZE,
|
postcar_frame_add_mtrr(&pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE,
|
||||||
MTRR_TYPE_WRPROT);
|
MTRR_TYPE_WRPROT);
|
||||||
|
|
||||||
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
||||||
|
@ -62,8 +62,7 @@ static void enable_rom_caching(void)
|
|||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
disable_cache();
|
disable_cache();
|
||||||
set_var_mtrr(1, 0xffffffff - CACHE_ROM_SIZE + 1,
|
set_var_mtrr(1, CACHE_ROM_BASE, CACHE_ROM_SIZE, MTRR_TYPE_WRPROT);
|
||||||
CACHE_ROM_SIZE, MTRR_TYPE_WRPROT);
|
|
||||||
enable_cache();
|
enable_cache();
|
||||||
|
|
||||||
/* Enable Variable MTRRs */
|
/* Enable Variable MTRRs */
|
||||||
|
@ -112,7 +112,7 @@ fake_fsp_stack:
|
|||||||
CAR_init_params:
|
CAR_init_params:
|
||||||
.long dummy_microcode
|
.long dummy_microcode
|
||||||
.long 0
|
.long 0
|
||||||
.long 0xFFFFFFFF - CACHE_ROM_SIZE + 1 /* Firmware Location */
|
.long CACHE_ROM_BASE /* Firmware Location */
|
||||||
.long CACHE_ROM_SIZE /* Total Firmware Length */
|
.long CACHE_ROM_SIZE /* Total Firmware Length */
|
||||||
|
|
||||||
CAR_init_stack:
|
CAR_init_stack:
|
||||||
|
@ -129,7 +129,7 @@ void *setup_stack_and_mtrrs(void)
|
|||||||
die("Unable to initialize postcar frame.\n");
|
die("Unable to initialize postcar frame.\n");
|
||||||
|
|
||||||
/* Cache the ROM as WP just below 4GiB. */
|
/* Cache the ROM as WP just below 4GiB. */
|
||||||
postcar_frame_add_mtrr(&pcf, -CACHE_ROM_SIZE, CACHE_ROM_SIZE,
|
postcar_frame_add_mtrr(&pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE,
|
||||||
MTRR_TYPE_WRPROT);
|
MTRR_TYPE_WRPROT);
|
||||||
|
|
||||||
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
||||||
|
@ -91,7 +91,7 @@ void *setup_stack_and_mtrrs(void)
|
|||||||
die("Unable to initialize postcar frame.\n");
|
die("Unable to initialize postcar frame.\n");
|
||||||
|
|
||||||
/* Cache the ROM as WP just below 4GiB. */
|
/* Cache the ROM as WP just below 4GiB. */
|
||||||
postcar_frame_add_mtrr(&pcf, -CACHE_ROM_SIZE, CACHE_ROM_SIZE,
|
postcar_frame_add_mtrr(&pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE,
|
||||||
MTRR_TYPE_WRPROT);
|
MTRR_TYPE_WRPROT);
|
||||||
|
|
||||||
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
||||||
|
@ -50,7 +50,7 @@ void *setup_stack_and_mtrrs(void)
|
|||||||
die("Unable to initialize postcar frame.\n");
|
die("Unable to initialize postcar frame.\n");
|
||||||
|
|
||||||
/* Cache the ROM as WP just below 4GiB. */
|
/* Cache the ROM as WP just below 4GiB. */
|
||||||
postcar_frame_add_mtrr(&pcf, -CACHE_ROM_SIZE, CACHE_ROM_SIZE,
|
postcar_frame_add_mtrr(&pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE,
|
||||||
MTRR_TYPE_WRPROT);
|
MTRR_TYPE_WRPROT);
|
||||||
|
|
||||||
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
||||||
|
@ -118,7 +118,7 @@ void *setup_stack_and_mtrrs(void)
|
|||||||
die("Unable to initialize postcar frame.\n");
|
die("Unable to initialize postcar frame.\n");
|
||||||
|
|
||||||
/* Cache the ROM as WP just below 4GiB. */
|
/* Cache the ROM as WP just below 4GiB. */
|
||||||
postcar_frame_add_mtrr(&pcf, -CACHE_ROM_SIZE, CACHE_ROM_SIZE,
|
postcar_frame_add_mtrr(&pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE,
|
||||||
MTRR_TYPE_WRPROT);
|
MTRR_TYPE_WRPROT);
|
||||||
|
|
||||||
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
||||||
|
@ -57,7 +57,7 @@ void *setup_stack_and_mtrrs(void)
|
|||||||
die("Unable to initialize postcar frame.\n");
|
die("Unable to initialize postcar frame.\n");
|
||||||
|
|
||||||
/* Cache the ROM as WP just below 4GiB. */
|
/* Cache the ROM as WP just below 4GiB. */
|
||||||
postcar_frame_add_mtrr(&pcf, -CACHE_ROM_SIZE, CACHE_ROM_SIZE,
|
postcar_frame_add_mtrr(&pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE,
|
||||||
MTRR_TYPE_WRPROT);
|
MTRR_TYPE_WRPROT);
|
||||||
|
|
||||||
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
||||||
|
@ -116,7 +116,7 @@ void *setup_stack_and_mtrrs(void)
|
|||||||
die("Unable to initialize postcar frame.\n");
|
die("Unable to initialize postcar frame.\n");
|
||||||
|
|
||||||
/* Cache the ROM as WP just below 4GiB. */
|
/* Cache the ROM as WP just below 4GiB. */
|
||||||
postcar_frame_add_mtrr(&pcf, -CACHE_ROM_SIZE, CACHE_ROM_SIZE,
|
postcar_frame_add_mtrr(&pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE,
|
||||||
MTRR_TYPE_WRPROT);
|
MTRR_TYPE_WRPROT);
|
||||||
|
|
||||||
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
/* Cache RAM as WB from 0 -> CACHE_TMP_RAMTOP. */
|
||||||
|
@ -70,8 +70,7 @@ static void enable_rom_caching(void)
|
|||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
disable_cache();
|
disable_cache();
|
||||||
set_var_mtrr(1, 0xffffffff - CACHE_ROM_SIZE + 1,
|
set_var_mtrr(1, CACHE_ROM_BASE, CACHE_ROM_SIZE, MTRR_TYPE_WRPROT);
|
||||||
CACHE_ROM_SIZE, MTRR_TYPE_WRPROT);
|
|
||||||
enable_cache();
|
enable_cache();
|
||||||
|
|
||||||
/* Enable Variable MTRRs */
|
/* Enable Variable MTRRs */
|
||||||
|
Reference in New Issue
Block a user