From 85f94c96c190fbf614dc9089a4b857692593f077 Mon Sep 17 00:00:00 2001 From: Corey Osgood Date: Thu, 11 Dec 2008 06:33:29 +0000 Subject: [PATCH] Check that the CAR and ROM areas don't collide. Signed-off-by: Corey Osgood Acked-by: Carl-Daniel Hailfinger git-svn-id: svn://coreboot.org/repository/coreboot-v3@1071 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- include/arch/x86/cpu.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/arch/x86/cpu.h b/include/arch/x86/cpu.h index 43f5e0b07f..88793cfb90 100644 --- a/include/arch/x86/cpu.h +++ b/include/arch/x86/cpu.h @@ -26,6 +26,14 @@ #include #include #include +#include + +/* Check that the CAR and ROM areas aren't going to collide */ +#if ((0x100000000 - (CONFIG_COREBOOT_ROMSIZE_KB * 1024)) < (CONFIG_CARBASE + CONFIG_CARSIZE)) +#error Your current Cache-As-Ram base does not allow room to map the selected\ + chip size to memory. Please select a different chip size or move the CAR\ + base to another sane location. +#endif #define X86_VENDOR_INTEL 0 #define X86_VENDOR_CYRIX 1