summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/apollolake/meminit.c7
-rw-r--r--src/soc/intel/apollolake/mmap_boot.c29
-rw-r--r--src/soc/intel/apollolake/romstage.c7
3 files changed, 15 insertions, 28 deletions
diff --git a/src/soc/intel/apollolake/meminit.c b/src/soc/intel/apollolake/meminit.c
index 038fa9fb2b..219b661042 100644
--- a/src/soc/intel/apollolake/meminit.c
+++ b/src/soc/intel/apollolake/meminit.c
@@ -12,7 +12,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#include <arch/early_variables.h>
#include <console/console.h>
#include <fsp/util.h>
#include <memory_info.h>
@@ -21,11 +20,11 @@
#include <fsp/soc_binding.h>
#include <string.h>
-static size_t memory_size_mib CAR_GLOBAL;
+static size_t memory_size_mib;
size_t memory_in_system_in_mib(void)
{
- return car_get_var(memory_size_mib);
+ return memory_size_mib;
}
static void accumulate_channel_memory(int density, int dual_rank)
@@ -61,7 +60,7 @@ static void accumulate_channel_memory(int density, int dual_rank)
sz *= GiB / MiB;
- car_set_var(memory_size_mib, car_get_var(memory_size_mib) + sz);
+ memory_size_mib += sz;
}
size_t iohole_in_mib(void)
diff --git a/src/soc/intel/apollolake/mmap_boot.c b/src/soc/intel/apollolake/mmap_boot.c
index 1c3077ed91..614b6031c4 100644
--- a/src/soc/intel/apollolake/mmap_boot.c
+++ b/src/soc/intel/apollolake/mmap_boot.c
@@ -16,7 +16,6 @@
* GNU General Public License for more details.
*/
-#include <arch/early_variables.h>
#include <boot_device.h>
#include <cbfs.h>
#include <commonlib/region.h>
@@ -57,17 +56,17 @@
*
*/
-static size_t bios_size CAR_GLOBAL;
+static size_t bios_size;
-static struct mem_region_device shadow_dev CAR_GLOBAL;
-static struct xlate_region_device real_dev CAR_GLOBAL;
+static struct mem_region_device shadow_dev;
+static struct xlate_region_device real_dev;
static void bios_mmap_init(void)
{
size_t size, start, bios_mapped_size;
uintptr_t base;
- size = car_get_var(bios_size);
+ size = bios_size;
/* If bios_size is initialized, then bail out. */
if (size != 0)
@@ -83,34 +82,25 @@ static void bios_mmap_init(void)
*/
bios_mapped_size = size - 256 * KiB;
- struct mem_region_device *shadow_dev_ptr;
- struct xlate_region_device *real_dev_ptr;
- shadow_dev_ptr = car_get_var_ptr(&shadow_dev);
- real_dev_ptr = car_get_var_ptr(&real_dev);
-
- mem_region_device_ro_init(shadow_dev_ptr, (void *)base,
+ mem_region_device_ro_init(&shadow_dev, (void *)base,
bios_mapped_size);
- xlate_region_device_ro_init(real_dev_ptr, &shadow_dev_ptr->rdev,
+ xlate_region_device_ro_init(&real_dev, &shadow_dev.rdev,
start, bios_mapped_size,
CONFIG_ROM_SIZE);
- car_set_var(bios_size, size);
+ bios_size = size;
}
const struct region_device *boot_device_ro(void)
{
bios_mmap_init();
- struct xlate_region_device *real_dev_ptr;
- real_dev_ptr = car_get_var_ptr(&real_dev);
-
- return &real_dev_ptr->rdev;
+ return &real_dev.rdev;
}
static int iafw_boot_region_properties(struct cbfs_props *props)
{
- struct xlate_region_device *real_dev_ptr;
struct region *real_dev_reg;
struct region regn;
@@ -123,8 +113,7 @@ static int iafw_boot_region_properties(struct cbfs_props *props)
/* Check that we are within the memory mapped area. It's too
easy to forget the SRAM mapping when crafting an FMAP file. */
- real_dev_ptr = car_get_var_ptr(&real_dev);
- real_dev_reg = &real_dev_ptr->sub_region;
+ real_dev_reg = &real_dev.sub_region;
if (region_is_subregion(real_dev_reg, &regn)) {
printk(BIOS_DEBUG, "CBFS @ %zx size %zx\n",
props->offset, props->size);
diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c
index c976ac2d6f..5bf501dcfa 100644
--- a/src/soc/intel/apollolake/romstage.c
+++ b/src/soc/intel/apollolake/romstage.c
@@ -17,7 +17,6 @@
*/
#include <arch/cpu.h>
-#include <arch/early_variables.h>
#include <device/pci_ops.h>
#include <arch/symbols.h>
#include <assert.h>
@@ -57,7 +56,7 @@ static const uint8_t hob_variable_guid[16] = {
0x8d, 0xe6, 0xc0, 0x44, 0x64, 0x1d, 0xe9, 0x42,
};
-static uint32_t fsp_version CAR_GLOBAL;
+static uint32_t fsp_version;
/* High Performance Event Timer Configuration */
#define P2SB_HPTC 0x60
@@ -236,7 +235,7 @@ asmlinkage void car_stage_entry(void)
&var_size);
if (new_var_data)
mrc_cache_stash_data(MRC_VARIABLE_DATA,
- car_get_var(fsp_version), new_var_data,
+ fsp_version, new_var_data,
var_size);
else
printk(BIOS_ERR, "Failed to determine variable data\n");
@@ -410,7 +409,7 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
mupd->FspmConfig.VariableNvsBufferPtr = rdev_mmap_full(&rdev);
}
- car_set_var(fsp_version, version);
+ fsp_version = version;
}