printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / cpu / amd / model_fxx / init_cpus.c
index 435167e94ab8c6392c0a9d903edb7e93d818d1ef..847a8a7fa6865e7b4d45e1a445fdd5250728cf35 100644 (file)
 
 static inline void print_initcpu8 (const char *strval, unsigned val)
 {
-#if CONFIG_USE_PRINTK_IN_CAR
-        printk_debug("%s%02x\r\n", strval, val);
-#else
-        print_debug(strval); print_debug_hex8(val); print_debug("\r\n");
-#endif
+        printk(BIOS_DEBUG, "%s%02x\r\n", strval, val);
 }
 
 static inline void print_initcpu8_nocr (const char *strval, unsigned val)
 {
-#if CONFIG_USE_PRINTK_IN_CAR
-        printk_debug("%s%02x", strval, val);
-#else
-        print_debug(strval); print_debug_hex8(val);
-#endif
+        printk(BIOS_DEBUG, "%s%02x", strval, val);
 }
 
 
 static inline void print_initcpu16 (const char *strval, unsigned val)
 {
-#if CONFIG_USE_PRINTK_IN_CAR
-        printk_debug("%s%04x\r\n", strval, val);
-#else
-        print_debug(strval); print_debug_hex16(val); print_debug("\r\n");
-#endif
+        printk(BIOS_DEBUG, "%s%04x\r\n", strval, val);
 }
 
 static inline void print_initcpu(const char *strval, unsigned val)
 {
-#if CONFIG_USE_PRINTK_IN_CAR
-        printk_debug("%s%08x\r\n", strval, val);
-#else
-        print_debug(strval); print_debug_hex32(val); print_debug("\r\n");
-#endif
+        printk(BIOS_DEBUG, "%s%08x\r\n", strval, val);
 }
 
 typedef void (*process_ap_t)(unsigned apicid, void *gp);
@@ -171,14 +155,7 @@ static void init_fidvid_ap(unsigned bsp_apicid, unsigned apicid);
 
 static inline __attribute__((always_inline)) void print_apicid_nodeid_coreid(unsigned apicid, struct node_core_id id, const char *str)
 {
-       #if CONFIG_USE_PRINTK_IN_CAR
-                printk_debug("%s --- {  APICID = %02x NODEID = %02x COREID = %02x} ---\r\n", str, apicid, id.nodeid, id.coreid);
-       #else
-               print_debug(str);
-               print_debug(" ---- {APICID = "); print_debug_hex8(apicid);
-               print_debug(" NODEID = "), print_debug_hex8(id.nodeid); print_debug(" COREID = "), print_debug_hex8(id.coreid);
-               print_debug("} --- \r\n");
-        #endif
+                printk(BIOS_DEBUG, "%s --- {  APICID = %02x NODEID = %02x COREID = %02x} ---\r\n", str, apicid, id.nodeid, id.coreid);
 }
 
 
@@ -238,11 +215,6 @@ static void STOP_CAR_AND_CPU(void)
        stop_this_cpu(); // inline, it will stop all cores except node0/core0 the bsp ....
 }
 
-#ifndef CONFIG_MEM_TRAIN_SEQ
-#define CONFIG_MEM_TRAIN_SEQ 0
-#endif
-
-
 #if CONFIG_MEM_TRAIN_SEQ == 1
 static inline void train_ram_on_node(unsigned nodeid, unsigned coreid, struct sys_info *sysinfo, unsigned retcall); 
 #endif
@@ -345,9 +317,10 @@ static unsigned init_cpus(unsigned cpu_init_detectedx)
                                print_initcpu8("while waiting for BSP signal to STOP, timeout in ap ", apicid);
                        }
                         lapic_write(LAPIC_MSG_REG, (apicid<<24) | 0x44); // bsp can not check it before stop_this_cpu
-                        set_init_ram_access();
+                       set_var_mtrr(0, 0x00000000, CONFIG_RAMTOP, MTRR_TYPE_WRBACK);
        #if CONFIG_MEM_TRAIN_SEQ == 1
-                       train_ram_on_node(id.nodeid, id.coreid, sysinfo, STOP_CAR_AND_CPU);
+                       train_ram_on_node(id.nodeid, id.coreid, sysinfo,
+                                         (unsigned) STOP_CAR_AND_CPU);
        #endif
 
                        STOP_CAR_AND_CPU();