Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8197
-gerrit
commit 582d0c45f33b31ed0268ed7fc1af2de0642a7bbe
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Tue Jan 13 04:15:29 2015 +1100
Makefile: clang - ramp up some more warnings
Back out '-Wno-unused-variable'.
Change-Id: Icd15b03d3a41f4933c9ae0a4c497ccadcccbefb5
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 51c0c58..eda36e7 100644
--- a/Makefile
+++ b/Makefile
@@ -119,7 +119,7 @@ ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
# this means the triple is i386-linux-elf instead of i386-none-elf
CFLAGS_x86_32 = -no-integrated-as -Qunused-arguments -target i386-linux-elf -m32
# Tone down some clang warnings
-CFLAGS_x86_32 += -Wno-unused-variable -Wno-tautological-compare -Wno-shift-overflow
+CFLAGS_x86_32 += -Wno-tautological-compare -Wno-shift-overflow
CC_x86_32:=clang
HOSTCC := clang
Martin Roth (gaumless(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8196
-gerrit
commit 649e35d4a4ebeee6dd80ccc753f7ff26dfbef125
Author: Martin Roth <gaumless(a)gmail.com>
Date: Sun Jan 11 14:29:29 2015 -0700
FSP & CBMEM: Fix broken cbmem CAR transition.
1) Save the pointer to the FSP HOB list to low memory at address 0x614.
This is the same location as CBMEM_RESUME_BACKUP - the two aren't used
in the same platform, so overlapping should be OK. I didn't see any
documentation that actually said that this location was free to use, and
didn't need to be restored after use in S3 resume, but it looks like
the DOS boot vector gets loaded juat above this location, so it SHOULD
be ok. The alternative is to copy the memory out and store it in cbmem
until we're ready to restore it.
2) When a request for the pointer to a CAR variable comes in, pass back
the location *INSIDE* the FSP hob structure.
3) Skip the memcopy of the CAR Data. The CAR variables do not
get transitioned back into cbmem, but used out of the HOB structure.
4) Remove the BROKEN_CAR_MIGRATE Kconfig option from the FSP platform.
Change-Id: Iaf566dce1b41a3bcb17e4134877f68262b5e113f
Signed-off-by: Martin Roth <gaumless(a)gmail.com>
---
src/cpu/intel/fsp_model_206ax/Kconfig | 1 -
src/cpu/intel/fsp_model_406dx/Kconfig | 1 -
src/cpu/x86/car.c | 36 +++++++++++++++++++---
src/include/cbmem.h | 1 +
.../intel/fsp_rangeley/fsp/chipset_fsp_util.c | 2 ++
.../intel/fsp_sandybridge/fsp/chipset_fsp_util.c | 1 +
src/soc/intel/fsp_baytrail/Kconfig | 1 -
src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.c | 2 ++
8 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/src/cpu/intel/fsp_model_206ax/Kconfig b/src/cpu/intel/fsp_model_206ax/Kconfig
index e9cbe43..c05b12b 100644
--- a/src/cpu/intel/fsp_model_206ax/Kconfig
+++ b/src/cpu/intel/fsp_model_206ax/Kconfig
@@ -40,7 +40,6 @@ config CPU_SPECIFIC_OPTIONS
select PARALLEL_CPU_INIT
select TSC_SYNC_MFENCE
select LAPIC_MONOTONIC_TIMER
- select BROKEN_CAR_MIGRATE
config BOOTBLOCK_CPU_INIT
string
diff --git a/src/cpu/intel/fsp_model_406dx/Kconfig b/src/cpu/intel/fsp_model_406dx/Kconfig
index 5cd4c65..c090b84 100644
--- a/src/cpu/intel/fsp_model_406dx/Kconfig
+++ b/src/cpu/intel/fsp_model_406dx/Kconfig
@@ -35,7 +35,6 @@ config CPU_SPECIFIC_OPTIONS
select PARALLEL_CPU_INIT
select TSC_SYNC_MFENCE
select LAPIC_MONOTONIC_TIMER
- select BROKEN_CAR_MIGRATE
choice
prompt "Rangeley CPU Stepping"
diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c
index cca9afd..da351c5 100644
--- a/src/cpu/x86/car.c
+++ b/src/cpu/x86/car.c
@@ -41,13 +41,16 @@ extern char _car_data_end[];
*/
static int car_migrated CAR_GLOBAL;
-
+/** @brief returns pointer to a CAR variable, before or after migration.
+ *
+ * @param var pointer to the CAR variable
+ */
void *car_get_var_ptr(void *var)
{
char *migrated_base;
- int offset;
void * _car_start = &_car_data_start;
void * _car_end = &_car_data_end;
+ int offset = (char *)var - (char *)_car_start;
/* If the cache-as-ram has not been migrated return the pointer
* passed in. */
@@ -61,6 +64,31 @@ void *car_get_var_ptr(void *var)
return var;
}
+#if IS_ENABLED(CONFIG_PLATFORM_USES_FSP)
+ /* Avoid including fsp_util.h and everything that goes with it */
+ void * find_saved_temp_mem(void *hob_list_ptr);
+
+ /* Before memory is initialized:
+ * CBMEM_FSP_HOB_PTR == 0xffffffff
+ * Use CAR - handled above.
+ *
+ * After memory is initialized, but before the migration:
+ * CBMEM_FSP_HOB_PTR is a pointer to the start of the FSP HOB list.
+ * Use saved CAR area in HOB - handled here.
+ */
+
+ if (*(uint32_t *)CBMEM_FSP_HOB_PTR != 0xffffffff) {
+ /* find the saved temp memory so we can recover cbmem */
+ char *saved_tmp_mem_location=(char *)find_saved_temp_mem(
+ *(void **)CBMEM_FSP_HOB_PTR);
+
+ if (saved_tmp_mem_location == NULL)
+ die("Error: Could not locate Saved CAR memory.");
+
+ return (void *)(saved_tmp_mem_location + offset);
+ }
+#endif
+
migrated_base = cbmem_find(CBMEM_ID_CAR_GLOBALS);
if (migrated_base == NULL) {
@@ -68,8 +96,6 @@ void *car_get_var_ptr(void *var)
return var;
}
- offset = (char *)var - (char *)_car_start;
-
return &migrated_base[offset];
}
@@ -121,7 +147,9 @@ static void do_car_migrate_variables(void)
return;
}
+#if !IS_ENABLED(PLATFORM_USES_FSP)
memcpy(migrated_base, &_car_data_start[0], car_data_size);
+#endif
/* Mark that the data has been moved. */
car_migrated = ~0;
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index ca7a5f4..2f86b85 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -40,6 +40,7 @@
*/
#define CBMEM_BOOT_MODE 0x610
#define CBMEM_RESUME_BACKUP 0x614
+#define CBMEM_FSP_HOB_PTR 0x614
#define CBMEM_ID_FREESPACE 0x46524545
#define CBMEM_ID_GDT 0x4c474454
diff --git a/src/northbridge/intel/fsp_rangeley/fsp/chipset_fsp_util.c b/src/northbridge/intel/fsp_rangeley/fsp/chipset_fsp_util.c
index ae95087..18c947f 100644
--- a/src/northbridge/intel/fsp_rangeley/fsp/chipset_fsp_util.c
+++ b/src/northbridge/intel/fsp_rangeley/fsp/chipset_fsp_util.c
@@ -167,6 +167,8 @@ void chipset_fsp_early_init(FSP_INIT_PARAMS *pFspInitParams,
void ChipsetFspReturnPoint(EFI_STATUS Status,
VOID *HobListPtr)
{
+ *(void **)CBMEM_FSP_HOB_PTR=HobListPtr;
+
if (Status == 0xFFFFFFFF) {
soft_reset();
}
diff --git a/src/northbridge/intel/fsp_sandybridge/fsp/chipset_fsp_util.c b/src/northbridge/intel/fsp_sandybridge/fsp/chipset_fsp_util.c
index a666d70..716873c 100644
--- a/src/northbridge/intel/fsp_sandybridge/fsp/chipset_fsp_util.c
+++ b/src/northbridge/intel/fsp_sandybridge/fsp/chipset_fsp_util.c
@@ -107,6 +107,7 @@ void chipset_fsp_early_init(FSP_INIT_PARAMS *FspInitParams,
void ChipsetFspReturnPoint(EFI_STATUS Status,
VOID *HobListPtr)
{
+ *(void **)CBMEM_FSP_HOB_PTR=HobListPtr;
if (Status == 0xFFFFFFFF) {
hard_reset();
}
diff --git a/src/soc/intel/fsp_baytrail/Kconfig b/src/soc/intel/fsp_baytrail/Kconfig
index 081ea09..3b6d093 100644
--- a/src/soc/intel/fsp_baytrail/Kconfig
+++ b/src/soc/intel/fsp_baytrail/Kconfig
@@ -49,7 +49,6 @@ config CPU_SPECIFIC_OPTIONS
select SUPPORT_CPU_UCODE_IN_CBFS if INCLUDE_MICROCODE_IN_BUILD
select CPU_MICROCODE_ADDED_DURING_BUILD if INCLUDE_MICROCODE_IN_BUILD
select ROMSTAGE_RTC_INIT
- select BROKEN_CAR_MIGRATE
config BOOTBLOCK_CPU_INIT
string
diff --git a/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.c b/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.c
index c6b5f9c..b8c1bf6 100644
--- a/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.c
+++ b/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.c
@@ -329,6 +329,8 @@ void chipset_fsp_early_init(FSP_INIT_PARAMS *pFspInitParams,
void ChipsetFspReturnPoint(EFI_STATUS Status,
VOID *HobListPtr)
{
+ *(void **)CBMEM_FSP_HOB_PTR=HobListPtr;
+
if (Status == 0xFFFFFFFF) {
warm_reset();
}
Martin Roth (gaumless(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8195
-gerrit
commit 335a819c06c5927d20afc37e4d6a98138403f7d5
Author: Martin Roth <gaumless(a)gmail.com>
Date: Sun Jan 11 14:58:47 2015 -0700
FSP platforms: Clear area in CAR for cbmem
cbmem requires that the memory at DCACHE_RAM_BASE be cleared or it
does not get used.
This patch just clears CAR memory, leaving 4k untouched for stack. The
stack is very small at this point, and obviously doesn't care whether
the memory is cleared or not. The FSP has loaded a pattern into CAR,
which helps to see the stack usage (and poisons the stack as well).
Change-Id: I829ddc26133353a784dfc01729af9b3bf427e889
Signed-off-by: Martin Roth <gaumless(a)gmail.com>
---
src/mainboard/intel/cougar_canyon2/romstage.c | 3 +++
src/soc/intel/fsp_baytrail/romstage/romstage.c | 2 ++
src/southbridge/intel/fsp_rangeley/romstage.c | 3 +++
3 files changed, 8 insertions(+)
diff --git a/src/mainboard/intel/cougar_canyon2/romstage.c b/src/mainboard/intel/cougar_canyon2/romstage.c
index 72832ea..e836bfa 100644
--- a/src/mainboard/intel/cougar_canyon2/romstage.c
+++ b/src/mainboard/intel/cougar_canyon2/romstage.c
@@ -180,6 +180,9 @@ void main(FSP_INFO_HEADER *fsp_info_header)
u32 pm1_cnt;
u16 pm1_sts;
+ /* Clear CAR Memory for CBMEM */
+ memset((void *)CONFIG_DCACHE_RAM_BASE,0,CONFIG_DCACHE_RAM_SIZE - 0x1000);
+
post_code(0x40);
#if CONFIG_COLLECT_TIMESTAMPS
diff --git a/src/soc/intel/fsp_baytrail/romstage/romstage.c b/src/soc/intel/fsp_baytrail/romstage/romstage.c
index b0b8133..8ba0886 100644
--- a/src/soc/intel/fsp_baytrail/romstage/romstage.c
+++ b/src/soc/intel/fsp_baytrail/romstage/romstage.c
@@ -158,6 +158,8 @@ void main(FSP_INFO_HEADER *fsp_info_header)
uint32_t fd_mask = 0;
uint32_t fd2_mask = 0;
+ /* Clear CAR Memory for CBMEM */
+ memset((void *)CONFIG_DCACHE_RAM_BASE,0,CONFIG_DCACHE_RAM_SIZE - 0x1000);
post_code(0x40);
program_base_addresses();
diff --git a/src/southbridge/intel/fsp_rangeley/romstage.c b/src/southbridge/intel/fsp_rangeley/romstage.c
index fba9eb6..62cb567 100644
--- a/src/southbridge/intel/fsp_rangeley/romstage.c
+++ b/src/southbridge/intel/fsp_rangeley/romstage.c
@@ -44,6 +44,9 @@ void main(FSP_INFO_HEADER *fsp_info_header)
uint32_t fd_mask = 0;
uint32_t func_dis = DEFAULT_PBASE + PBASE_FUNC_DIS;
+ /* Clear CAR Memory for CBMEM */
+ memset((void *)CONFIG_DCACHE_RAM_BASE,0,CONFIG_DCACHE_RAM_SIZE - 0x1000);
+
/*
* Do not use the Serial Console before it is setup.
* This causes the I/O to clog and a side effect is
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8189
-gerrit
commit 277fb2f4a8af9227712247c8fdc1d461453b3978
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Sun Jan 11 01:15:41 2015 +1100
mainboard: Kill off dead usage of ATi/RageXL driver
Change-Id: Ib51287326af1af15155ee37336d3795137001686
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/mainboard/iwill/dk8s2/Kconfig | 1 -
src/mainboard/tyan/s2850/devicetree.cb | 1 -
src/mainboard/tyan/s2882/devicetree.cb | 2 --
src/mainboard/tyan/s2891/devicetree.cb | 1 -
src/mainboard/tyan/s2892/devicetree.cb | 2 --
src/mainboard/tyan/s4882/devicetree.cb | 2 --
6 files changed, 9 deletions(-)
diff --git a/src/mainboard/iwill/dk8s2/Kconfig b/src/mainboard/iwill/dk8s2/Kconfig
index c4de3a1..6bb4c76 100644
--- a/src/mainboard/iwill/dk8s2/Kconfig
+++ b/src/mainboard/iwill/dk8s2/Kconfig
@@ -12,7 +12,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select HAVE_OPTION_TABLE
select HAVE_MP_TABLE
select SB_HT_CHAIN_UNITID_OFFSET_ONLY
- select DRIVERS_ATI_RAGEXL
select BOARD_ROMSIZE_KB_512
select RAMINIT_SYSINFO
select QRANK_DIMM_SUPPORT
diff --git a/src/mainboard/tyan/s2850/devicetree.cb b/src/mainboard/tyan/s2850/devicetree.cb
index 85c6384..5e80a87 100644
--- a/src/mainboard/tyan/s2850/devicetree.cb
+++ b/src/mainboard/tyan/s2850/devicetree.cb
@@ -17,7 +17,6 @@ chip northbridge/amd/amdk8/root_complex
device pci 0.1 on end
device pci 0.2 off end
device pci 1.0 off end
- #chip drivers/ati/ragexl
device pci b.0 on end
end
device pci 1.0 on
diff --git a/src/mainboard/tyan/s2882/devicetree.cb b/src/mainboard/tyan/s2882/devicetree.cb
index 4074695..3391567 100644
--- a/src/mainboard/tyan/s2882/devicetree.cb
+++ b/src/mainboard/tyan/s2882/devicetree.cb
@@ -31,9 +31,7 @@ chip northbridge/amd/amdk8/root_complex
device pci 0.2 off end
device pci 1.0 off end
device pci 5.0 on end
- # chip drivers/ati/ragexl
device pci 6.0 on end
- # end
device pci 8.0 on end #intel 10/100
end
device pci 1.0 on
diff --git a/src/mainboard/tyan/s2891/devicetree.cb b/src/mainboard/tyan/s2891/devicetree.cb
index 8442ec8..f9185ef 100644
--- a/src/mainboard/tyan/s2891/devicetree.cb
+++ b/src/mainboard/tyan/s2891/devicetree.cb
@@ -103,7 +103,6 @@ chip northbridge/amd/amdk8/root_complex # Root complex
device pci 7.0 on end # SATA 1
device pci 8.0 on end # SATA 0
device pci 9.0 on # PCI
- # chip drivers/ati/ragexl
device pci 7.0 on end
end
device pci a.0 off end # NIC
diff --git a/src/mainboard/tyan/s2892/devicetree.cb b/src/mainboard/tyan/s2892/devicetree.cb
index 3edc156..5100dcc 100644
--- a/src/mainboard/tyan/s2892/devicetree.cb
+++ b/src/mainboard/tyan/s2892/devicetree.cb
@@ -104,9 +104,7 @@ chip northbridge/amd/amdk8/root_complex # Root complex
device pci 7.0 on end # SATA 1
device pci 8.0 on end # SATA 0
device pci 9.0 on # PCI
- # chip drivers/ati/ragexl
device pci 6.0 on end
- # end
device pci 8.0 on end
end
device pci a.0 off end # NIC
diff --git a/src/mainboard/tyan/s4882/devicetree.cb b/src/mainboard/tyan/s4882/devicetree.cb
index 44da2c2..e65a975 100644
--- a/src/mainboard/tyan/s4882/devicetree.cb
+++ b/src/mainboard/tyan/s4882/devicetree.cb
@@ -33,9 +33,7 @@ chip northbridge/amd/amdk8/root_complex
device pci 0.1 on end
device pci 0.2 off end
device pci 1.0 off end
- #chip drivers/ati/ragexl
device pci 6.0 on end
- #end
device pci 5.0 on end #SiI
end
device pci 1.0 on