summaryrefslogtreecommitdiff
path: root/src/cpu/amd/car/copy_and_run.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/amd/car/copy_and_run.c')
-rw-r--r--src/cpu/amd/car/copy_and_run.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/cpu/amd/car/copy_and_run.c b/src/cpu/amd/car/copy_and_run.c
index e0fa098833..437b91d4ac 100644
--- a/src/cpu/amd/car/copy_and_run.c
+++ b/src/cpu/amd/car/copy_and_run.c
@@ -3,6 +3,31 @@
2006/05/02 - stepan: move nrv2b to an extra file.
*/
+#if CONFIG_CBFS == 1
+void cbfs_and_run_core(char*, unsigned ebp);
+
+static void copy_and_run(void)
+{
+# if USE_FALLBACK_IMAGE == 1
+ cbfs_and_run_core("fallback/coreboot_ram", 0);
+# else
+ cbfs_and_run_core("normal/coreboot_ram", 0);
+# endif
+}
+
+#if CONFIG_AP_CODE_IN_CAR == 1
+
+static void copy_and_run_ap_code_in_car(unsigned ret_addr)
+{
+# if USE_FALLBACK_IMAGE == 1
+ cbfs_and_run_core("fallback/coreboot_apc", ret_addr);
+# else
+ cbfs_and_run_core("normal/coreboot_apc", ret_addr);
+# endif
+}
+#endif
+
+#else
void copy_and_run_core(u8 *src, u8 *dst, unsigned long ilen, unsigned ebp);
extern u8 _liseg, _iseg, _eiseg;
@@ -35,3 +60,4 @@ static void copy_and_run_ap_code_in_car(unsigned ret_addr)
copy_and_run_core(src, dst, ilen, ret_addr);
}
#endif
+#endif