This patch drops arch/i386/lib/console.c and arch/i386/lib/console_print.c and
authorStefan Reinauer <stepan@coresystems.de>
Wed, 31 Mar 2010 14:34:40 +0000 (14:34 +0000)
committerStefan Reinauer <stepan@openbios.org>
Wed, 31 Mar 2010 14:34:40 +0000 (14:34 +0000)
makes include/console/console.h and console/console.c usable both in
__PRE_RAM__ and coreboot_ram stages.

While debugging this, I removed an indirection from the e7520 ram init code
(same as we did on a couple of other chipsets, removes some register pressure
  from romcc)

Also, drop remainders of CONFIG_USE_INIT (except the one odd piece of dead code
in cache_as_ram.inc)

Then some ap_romstage.c fixes, at least the nvidia/l1_2pvv compiled for me with
CONFIG_AP_CODE_IN_CAR set in Kconfig which it did not before.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5341 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

141 files changed:
src/Kconfig
src/arch/i386/lib/console.c [deleted file]
src/arch/i386/lib/console_print.c [deleted file]
src/console/Makefile.inc
src/console/console.c
src/include/console/console.h
src/mainboard/a-trend/atc-6220/romstage.c
src/mainboard/a-trend/atc-6240/romstage.c
src/mainboard/abit/be6-ii_v2_0/romstage.c
src/mainboard/advantech/pcm-5820/romstage.c
src/mainboard/amd/db800/romstage.c
src/mainboard/amd/dbm690t/romstage.c
src/mainboard/amd/mahogany/romstage.c
src/mainboard/amd/mahogany_fam10/romstage.c
src/mainboard/amd/norwich/romstage.c
src/mainboard/amd/pistachio/romstage.c
src/mainboard/amd/rumba/romstage.c
src/mainboard/amd/serengeti_cheetah/ap_romstage.c
src/mainboard/amd/serengeti_cheetah/romstage.c
src/mainboard/amd/serengeti_cheetah_fam10/romstage.c
src/mainboard/arima/hdama/romstage.c
src/mainboard/artecgroup/dbe61/romstage.c
src/mainboard/asi/mb_5blgp/romstage.c
src/mainboard/asi/mb_5blmp/romstage.c
src/mainboard/asus/a8n_e/romstage.c
src/mainboard/asus/a8v-e_se/romstage.c
src/mainboard/asus/m2v-mx_se/romstage.c
src/mainboard/asus/mew-am/romstage.c
src/mainboard/asus/mew-vm/romstage.c
src/mainboard/asus/p2b-d/romstage.c
src/mainboard/asus/p2b-ds/romstage.c
src/mainboard/asus/p2b-f/romstage.c
src/mainboard/asus/p2b-ls/romstage.c
src/mainboard/asus/p2b/romstage.c
src/mainboard/asus/p3b-f/romstage.c
src/mainboard/axus/tc320/romstage.c
src/mainboard/azza/pt-6ibd/romstage.c
src/mainboard/bcom/winnet100/romstage.c
src/mainboard/bcom/winnetp680/romstage.c
src/mainboard/biostar/m6tba/romstage.c
src/mainboard/broadcom/blast/romstage.c
src/mainboard/compaq/deskpro_en_sff_p600/romstage.c
src/mainboard/dell/s1850/romstage.c
src/mainboard/digitallogic/adl855pc/romstage.c
src/mainboard/digitallogic/msm586seg/romstage.c
src/mainboard/digitallogic/msm800sev/romstage.c
src/mainboard/eaglelion/5bcm/romstage.c
src/mainboard/emulation/qemu-x86/romstage.c
src/mainboard/gigabyte/ga-6bxc/romstage.c
src/mainboard/gigabyte/ga_2761gxdk/ap_romstage.c
src/mainboard/gigabyte/ga_2761gxdk/romstage.c
src/mainboard/gigabyte/m57sli/ap_romstage.c
src/mainboard/gigabyte/m57sli/romstage.c
src/mainboard/hp/dl145_g3/romstage.c
src/mainboard/hp/e_vectra_p2706t/romstage.c
src/mainboard/ibm/e325/romstage.c
src/mainboard/ibm/e326/romstage.c
src/mainboard/iei/juki-511p/romstage.c
src/mainboard/iei/nova4899r/romstage.c
src/mainboard/iei/pcisa-lx-800-r10/romstage.c
src/mainboard/intel/d945gclf/romstage.c
src/mainboard/intel/eagleheights/romstage.c
src/mainboard/intel/jarrell/romstage.c
src/mainboard/intel/mtarvon/romstage.c
src/mainboard/intel/truxton/romstage.c
src/mainboard/intel/xe7501devkit/romstage.c
src/mainboard/iwill/dk8_htx/romstage.c
src/mainboard/iwill/dk8s2/romstage.c
src/mainboard/iwill/dk8x/romstage.c
src/mainboard/jetway/j7f24/romstage.c
src/mainboard/kontron/986lcd-m/romstage.c
src/mainboard/kontron/kt690/romstage.c
src/mainboard/lippert/frontrunner/romstage.c
src/mainboard/lippert/roadrunner-lx/romstage.c
src/mainboard/lippert/spacerunner-lx/romstage.c
src/mainboard/mitac/6513wu/romstage.c
src/mainboard/msi/ms6119/romstage.c
src/mainboard/msi/ms6147/romstage.c
src/mainboard/msi/ms6156/romstage.c
src/mainboard/msi/ms6178/romstage.c
src/mainboard/msi/ms7135/romstage.c
src/mainboard/msi/ms7260/ap_romstage.c
src/mainboard/msi/ms7260/romstage.c
src/mainboard/msi/ms9185/romstage.c
src/mainboard/msi/ms9282/romstage.c
src/mainboard/msi/ms9652_fam10/romstage.c
src/mainboard/nec/powermate2000/romstage.c
src/mainboard/newisys/khepri/romstage.c
src/mainboard/nvidia/l1_2pvv/ap_romstage.c
src/mainboard/nvidia/l1_2pvv/romstage.c
src/mainboard/olpc/btest/romstage.c
src/mainboard/olpc/rev_a/romstage.c
src/mainboard/pcengines/alix1c/romstage.c
src/mainboard/rca/rm4100/romstage.c
src/mainboard/roda/rk886ex/romstage.c
src/mainboard/soyo/sy-6ba-plus-iii/romstage.c
src/mainboard/sunw/ultra40/romstage.c
src/mainboard/supermicro/h8dme/ap_romstage.c
src/mainboard/supermicro/h8dme/romstage.c
src/mainboard/supermicro/h8dmr/ap_romstage.c
src/mainboard/supermicro/h8dmr/romstage.c
src/mainboard/supermicro/h8dmr_fam10/romstage.c
src/mainboard/supermicro/h8qme_fam10/romstage.c
src/mainboard/supermicro/x6dai_g/romstage.c
src/mainboard/supermicro/x6dhe_g/romstage.c
src/mainboard/supermicro/x6dhe_g2/romstage.c
src/mainboard/supermicro/x6dhr_ig/romstage.c
src/mainboard/supermicro/x6dhr_ig2/romstage.c
src/mainboard/technexion/tim5690/romstage.c
src/mainboard/technexion/tim8690/romstage.c
src/mainboard/technologic/ts5300/romstage.c
src/mainboard/televideo/tc7020/romstage.c
src/mainboard/thomson/ip1000/romstage.c
src/mainboard/tyan/s1846/romstage.c
src/mainboard/tyan/s2735/romstage.c
src/mainboard/tyan/s2850/romstage.c
src/mainboard/tyan/s2875/romstage.c
src/mainboard/tyan/s2880/romstage.c
src/mainboard/tyan/s2881/romstage.c
src/mainboard/tyan/s2882/romstage.c
src/mainboard/tyan/s2885/romstage.c
src/mainboard/tyan/s2891/romstage.c
src/mainboard/tyan/s2892/romstage.c
src/mainboard/tyan/s2895/romstage.c
src/mainboard/tyan/s2912/ap_romstage.c
src/mainboard/tyan/s2912/romstage.c
src/mainboard/tyan/s2912_fam10/romstage.c
src/mainboard/tyan/s4880/romstage.c
src/mainboard/tyan/s4882/romstage.c
src/mainboard/via/epia-cn/romstage.c
src/mainboard/via/epia-m/romstage.c
src/mainboard/via/epia-m700/romstage.c
src/mainboard/via/epia-n/romstage.c
src/mainboard/via/epia/romstage.c
src/mainboard/via/pc2500e/romstage.c
src/mainboard/via/vt8454c/romstage.c
src/mainboard/winent/pl6064/romstage.c
src/northbridge/amd/amdk8/raminit_test.c
src/northbridge/intel/e7520/raminit.c
src/northbridge/intel/e7520/raminit.h
src/northbridge/via/vx800/examples/romstage.c

index 05173ac90caf43fce528b7f561cce16a64fbf286..2eb8cd82031921894eece2f37e4b667773827fed 100644 (file)
@@ -796,10 +796,6 @@ config AP_CODE_IN_CAR
        bool
        default n
 
-config USE_INIT
-       bool
-       default n
-
 config ENABLE_APIC_EXT_ID
        bool
        default n
diff --git a/src/arch/i386/lib/console.c b/src/arch/i386/lib/console.c
deleted file mode 100644 (file)
index 69b5a66..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <build.h>
-#include <console/loglevel.h>
-
-#if CONFIG_USE_PRINTK_IN_CAR == 0
-#include "console_print.c"
-#else  /* CONFIG_USE_PRINTK_IN_CAR == 1 */
-#include <console/console.h>
-#endif /* CONFIG_USE_PRINTK_IN_CAR */
-
-void console_init(void)
-{
-       static const char console_test[] = 
-               "\r\n\r\ncoreboot-"
-               COREBOOT_VERSION
-               COREBOOT_EXTRA_VERSION
-               " "
-               COREBOOT_BUILD
-               " starting...\r\n";
-       print_info(console_test);
-}
-
-
-void post_code(u8 value)
-{
-#if !defined(CONFIG_NO_POST) || CONFIG_NO_POST==0
-#if CONFIG_SERIAL_POST==1
-       print_emerg("POST: 0x");
-       print_emerg_hex8(value);
-       print_emerg("\r\n");
-#endif
-       outb(value, 0x80);
-#endif
-}
-
-void die(const char *str)
-{
-       print_emerg(str);
-       do {
-               hlt();
-       } while(1);
-}
diff --git a/src/arch/i386/lib/console_print.c b/src/arch/i386/lib/console_print.c
deleted file mode 100644 (file)
index 2acec23..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-static void __console_tx_byte(unsigned char byte)
-{
-       uart_tx_byte(byte);
-}
-
-static void __console_tx_nibble(unsigned nibble)
-{
-       unsigned char digit;
-       digit = nibble + '0';
-       if (digit > '9') {
-               digit += 39;
-       }
-       __console_tx_byte(digit);
-}
-
-static void __console_tx_char(int loglevel, unsigned char byte)
-{
-       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
-               uart_tx_byte(byte);
-       }
-}
-
-static void __console_tx_hex8(int loglevel, unsigned char value)
-{
-       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
-               __console_tx_nibble((value >>  4U) & 0x0fU);
-               __console_tx_nibble(value & 0x0fU);
-       }
-}
-
-static void __console_tx_hex16(int loglevel, unsigned short value)
-{
-       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
-               __console_tx_nibble((value >> 12U) & 0x0fU);
-               __console_tx_nibble((value >>  8U) & 0x0fU);
-               __console_tx_nibble((value >>  4U) & 0x0fU);
-               __console_tx_nibble(value & 0x0fU);
-       }
-}
-
-static void __console_tx_hex32(int loglevel, unsigned int value)
-{
-       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
-               __console_tx_nibble((value >> 28U) & 0x0fU);
-               __console_tx_nibble((value >> 24U) & 0x0fU);
-               __console_tx_nibble((value >> 20U) & 0x0fU);
-               __console_tx_nibble((value >> 16U) & 0x0fU);
-               __console_tx_nibble((value >> 12U) & 0x0fU);
-               __console_tx_nibble((value >>  8U) & 0x0fU);
-               __console_tx_nibble((value >>  4U) & 0x0fU);
-               __console_tx_nibble(value & 0x0fU);
-       }
-}
-
-static void __console_tx_string(int loglevel, const char *str)
-{
-       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
-               unsigned char ch;
-               while((ch = *str++) != '\0') {
-                       __console_tx_byte(ch);
-               }
-       }
-}
-
-#if defined (__ROMCC__)
-#define STATIC
-#else
-#define STATIC static
-#endif
-
-STATIC void print_emerg_char(unsigned char byte) { __console_tx_char(BIOS_EMERG, byte); }
-STATIC void print_emerg_hex8(unsigned char value){ __console_tx_hex8(BIOS_EMERG, value); }
-STATIC void print_emerg_hex16(unsigned short value){ __console_tx_hex16(BIOS_EMERG, value); }
-STATIC void print_emerg_hex32(unsigned int value) { __console_tx_hex32(BIOS_EMERG, value); }
-STATIC void print_emerg(const char *str) { __console_tx_string(BIOS_EMERG, str); }
-
-STATIC void print_alert_char(unsigned char byte) { __console_tx_char(BIOS_ALERT, byte); }
-STATIC void print_alert_hex8(unsigned char value) { __console_tx_hex8(BIOS_ALERT, value); }
-STATIC void print_alert_hex16(unsigned short value){ __console_tx_hex16(BIOS_ALERT, value); }
-STATIC void print_alert_hex32(unsigned int value) { __console_tx_hex32(BIOS_ALERT, value); }
-STATIC void print_alert(const char *str) { __console_tx_string(BIOS_ALERT, str); }
-
-STATIC void print_crit_char(unsigned char byte) { __console_tx_char(BIOS_CRIT, byte); }
-STATIC void print_crit_hex8(unsigned char value) { __console_tx_hex8(BIOS_CRIT, value); }
-STATIC void print_crit_hex16(unsigned short value){ __console_tx_hex16(BIOS_CRIT, value); }
-STATIC void print_crit_hex32(unsigned int value) { __console_tx_hex32(BIOS_CRIT, value); }
-STATIC void print_crit(const char *str) { __console_tx_string(BIOS_CRIT, str); }
-
-STATIC void print_err_char(unsigned char byte) { __console_tx_char(BIOS_ERR, byte); }
-STATIC void print_err_hex8(unsigned char value) { __console_tx_hex8(BIOS_ERR, value); }
-STATIC void print_err_hex16(unsigned short value){ __console_tx_hex16(BIOS_ERR, value); }
-STATIC void print_err_hex32(unsigned int value) { __console_tx_hex32(BIOS_ERR, value); }
-STATIC void print_err(const char *str) { __console_tx_string(BIOS_ERR, str); }
-
-STATIC void print_warning_char(unsigned char byte) { __console_tx_char(BIOS_WARNING, byte); }
-STATIC void print_warning_hex8(unsigned char value) { __console_tx_hex8(BIOS_WARNING, value); }
-STATIC void print_warning_hex16(unsigned short value){ __console_tx_hex16(BIOS_WARNING, value); }
-STATIC void print_warning_hex32(unsigned int value) { __console_tx_hex32(BIOS_WARNING, value); }
-STATIC void print_warning(const char *str) { __console_tx_string(BIOS_WARNING, str); }
-
-STATIC void print_notice_char(unsigned char byte) { __console_tx_char(BIOS_NOTICE, byte); }
-STATIC void print_notice_hex8(unsigned char value) { __console_tx_hex8(BIOS_NOTICE, value); }
-STATIC void print_notice_hex16(unsigned short value){ __console_tx_hex16(BIOS_NOTICE, value); }
-STATIC void print_notice_hex32(unsigned int value) { __console_tx_hex32(BIOS_NOTICE, value); }
-STATIC void print_notice(const char *str) { __console_tx_string(BIOS_NOTICE, str); }
-
-STATIC void print_info_char(unsigned char byte) { __console_tx_char(BIOS_INFO, byte); }
-STATIC void print_info_hex8(unsigned char value) { __console_tx_hex8(BIOS_INFO, value); }
-STATIC void print_info_hex16(unsigned short value){ __console_tx_hex16(BIOS_INFO, value); }
-STATIC void print_info_hex32(unsigned int value) { __console_tx_hex32(BIOS_INFO, value); }
-STATIC void print_info(const char *str) { __console_tx_string(BIOS_INFO, str); }
-
-STATIC void print_debug_char(unsigned char byte) { __console_tx_char(BIOS_DEBUG, byte); }
-STATIC void print_debug_hex8(unsigned char value) { __console_tx_hex8(BIOS_DEBUG, value); }
-STATIC void print_debug_hex16(unsigned short value){ __console_tx_hex16(BIOS_DEBUG, value); }
-STATIC void print_debug_hex32(unsigned int value) { __console_tx_hex32(BIOS_DEBUG, value); }
-STATIC void print_debug(const char *str) { __console_tx_string(BIOS_DEBUG, str); }
-
-STATIC void print_spew_char(unsigned char byte) { __console_tx_char(BIOS_SPEW, byte); }
-STATIC void print_spew_hex8(unsigned char value) { __console_tx_hex8(BIOS_SPEW, value); }
-STATIC void print_spew_hex16(unsigned short value){ __console_tx_hex16(BIOS_SPEW, value); }
-STATIC void print_spew_hex32(unsigned int value) { __console_tx_hex32(BIOS_SPEW, value); }
-STATIC void print_spew(const char *str) { __console_tx_string(BIOS_SPEW, str); }
-
index a5dc735369dc4c8b14045b28c12759bce2740fae..8de1a7b46a970e66c260c3652ab1622fc1069176 100644 (file)
@@ -14,3 +14,5 @@ driver-$(CONFIG_CONSOLE_VGA) += vga_console.o
 driver-$(CONFIG_CONSOLE_BTEXT) += btext_console.o
 driver-$(CONFIG_CONSOLE_BTEXT) += font-8x16.o
 driver-$(CONFIG_CONSOLE_LOGBUF) += logbuf_console.o
+
+$(obj)/console/console.o : $(obj)/build.h
index 4543b0c7b39b237340a19af3fff9b6ccab15c326..ace76d902c8a6b4a9393b0ba81bc0327a6e48d78 100644 (file)
@@ -2,8 +2,12 @@
  * Bootstrap code for the INTEL 
  */
 
-#include <arch/io.h>
 #include <console/console.h>
+#include <build.h>
+#include <arch/hlt.h>
+
+#ifndef __PRE_RAM__
+#include <arch/io.h>
 #include <string.h>
 #include <pc80/mc146818rtc.h>
 
@@ -86,6 +90,42 @@ void post_code(uint8_t value)
 void __attribute__((noreturn)) die(const char *msg)
 {
        printk(BIOS_EMERG, "%s", msg);
-       post_code(0xff);
-       while (1);              /* Halt */
+       //post_code(0xff);
+       for (;;)
+               hlt();          /* Halt */
+}
+
+#else
+
+void console_init(void)
+{
+       static const char console_test[] = 
+               "\r\n\r\ncoreboot-"
+               COREBOOT_VERSION
+               COREBOOT_EXTRA_VERSION
+               " "
+               COREBOOT_BUILD
+               " starting...\r\n";
+       print_info(console_test);
+}
+
+void post_code(u8 value)
+{
+#if !defined(CONFIG_NO_POST) || CONFIG_NO_POST==0
+#if CONFIG_SERIAL_POST==1
+       print_emerg("POST: 0x");
+       print_emerg_hex8(value);
+       print_emerg("\r\n");
+#endif
+       outb(value, 0x80);
+#endif
 }
+
+void die(const char *str)
+{
+       print_emerg(str);
+       do {
+               hlt();
+       } while(1);
+}
+#endif
index 851505138d88e27be616383e12d27ddfd9a0cf66..fe7ea0b1e6b1342e3e7eb8691257f583d22216e9 100644 (file)
@@ -33,6 +33,7 @@ extern struct console_driver econsole_drivers[];
 extern int console_loglevel;
 #endif /* !__PRE_RAM__ */
 
+#ifndef __ROMCC__
 int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
 
 #undef WE_CLEANED_UP_ALL_SIDE_EFFECTS
@@ -40,6 +41,10 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf,
  * disabling cache as ram for a maximum console log level of 6 and above while
  * it worked fine without. In order to catch such issues reliably we are
  * always doing a function call to do_printk with the full number of arguments.
+ * Our favorite reason to do it this way was:
+ *   disable_car();
+ *   printk(BIOS_DEBUG, "CAR disabled\n"); // oops, garbage stack pointer
+ *   move_stack();
  * This slightly increases the code size and some unprinted strings will end
  * up in the final coreboot binary (most of them compressed). If you want to
  * avoid this, do a
@@ -66,35 +71,35 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf,
        } while(0)
 #endif
 
-#define print_emerg(STR)   printk(BIOS_EMERG,  "%s", (STR))
-#define print_alert(STR)   printk(BIOS_ALERT,  "%s", (STR))
-#define print_crit(STR)    printk(BIOS_CRIT,   "%s", (STR))
-#define print_err(STR)     printk(BIOS_ERR,    "%s", (STR))
-#define print_warning(STR) printk(BIOS_WARNING,"%s", (STR))
-#define print_notice(STR)  printk(BIOS_NOTICE, "%s", (STR))
-#define print_info(STR)    printk(BIOS_INFO,   "%s", (STR))
-#define print_debug(STR)   printk(BIOS_DEBUG,  "%s", (STR))
-#define print_spew(STR)    printk(BIOS_SPEW,   "%s", (STR))
-
-#define print_emerg_char(CH)   printk(BIOS_EMERG,  "%c", (CH))
-#define print_alert_char(CH)   printk(BIOS_ALERT,  "%c", (CH))
-#define print_crit_char(CH)    printk(BIOS_CRIT,   "%c", (CH))
-#define print_err_char(CH)     printk(BIOS_ERR,    "%c", (CH))
-#define print_warning_char(CH) printk(BIOS_WARNING,"%c", (CH))
-#define print_notice_char(CH)  printk(BIOS_NOTICE, "%c", (CH))
-#define print_info_char(CH)    printk(BIOS_INFO,   "%c", (CH))
-#define print_debug_char(CH)   printk(BIOS_DEBUG,  "%c", (CH))
-#define print_spew_char(CH)    printk(BIOS_SPEW,   "%c", (CH))
-
-#define print_emerg_hex8(HEX)   printk(BIOS_EMERG,  "%02x",  (HEX))
-#define print_alert_hex8(HEX)   printk(BIOS_ALERT,  "%02x",  (HEX))
-#define print_crit_hex8(HEX)    printk(BIOS_CRIT,   "%02x",  (HEX))
-#define print_err_hex8(HEX)     printk(BIOS_ERR,    "%02x",  (HEX))
-#define print_warning_hex8(HEX) printk(BIOS_WARNING,"%02x",  (HEX))
-#define print_notice_hex8(HEX)  printk(BIOS_NOTICE, "%02x",  (HEX))
-#define print_info_hex8(HEX)    printk(BIOS_INFO,   "%02x",  (HEX))
-#define print_debug_hex8(HEX)   printk(BIOS_DEBUG,  "%02x",  (HEX))
-#define print_spew_hex8(HEX)    printk(BIOS_SPEW,   "%02x",  (HEX))
+#define print_emerg(STR)         printk(BIOS_EMERG,  "%s", (STR))
+#define print_alert(STR)         printk(BIOS_ALERT,  "%s", (STR))
+#define print_crit(STR)          printk(BIOS_CRIT,   "%s", (STR))
+#define print_err(STR)           printk(BIOS_ERR,    "%s", (STR))
+#define print_warning(STR)       printk(BIOS_WARNING,"%s", (STR))
+#define print_notice(STR)        printk(BIOS_NOTICE, "%s", (STR))
+#define print_info(STR)          printk(BIOS_INFO,   "%s", (STR))
+#define print_debug(STR)         printk(BIOS_DEBUG,  "%s", (STR))
+#define print_spew(STR)          printk(BIOS_SPEW,   "%s", (STR))
+
+#define print_emerg_char(CH)     printk(BIOS_EMERG,  "%c", (CH))
+#define print_alert_char(CH)     printk(BIOS_ALERT,  "%c", (CH))
+#define print_crit_char(CH)      printk(BIOS_CRIT,   "%c", (CH))
+#define print_err_char(CH)       printk(BIOS_ERR,    "%c", (CH))
+#define print_warning_char(CH)   printk(BIOS_WARNING,"%c", (CH))
+#define print_notice_char(CH)    printk(BIOS_NOTICE, "%c", (CH))
+#define print_info_char(CH)      printk(BIOS_INFO,   "%c", (CH))
+#define print_debug_char(CH)     printk(BIOS_DEBUG,  "%c", (CH))
+#define print_spew_char(CH)      printk(BIOS_SPEW,   "%c", (CH))
+
+#define print_emerg_hex8(HEX)    printk(BIOS_EMERG,  "%02x",  (HEX))
+#define print_alert_hex8(HEX)    printk(BIOS_ALERT,  "%02x",  (HEX))
+#define print_crit_hex8(HEX)     printk(BIOS_CRIT,   "%02x",  (HEX))
+#define print_err_hex8(HEX)      printk(BIOS_ERR,    "%02x",  (HEX))
+#define print_warning_hex8(HEX)  printk(BIOS_WARNING,"%02x",  (HEX))
+#define print_notice_hex8(HEX)   printk(BIOS_NOTICE, "%02x",  (HEX))
+#define print_info_hex8(HEX)     printk(BIOS_INFO,   "%02x",  (HEX))
+#define print_debug_hex8(HEX)    printk(BIOS_DEBUG,  "%02x",  (HEX))
+#define print_spew_hex8(HEX)     printk(BIOS_SPEW,   "%02x",  (HEX))
 
 #define print_emerg_hex16(HEX)   printk(BIOS_EMERG,  "%04x", (HEX))
 #define print_alert_hex16(HEX)   printk(BIOS_ALERT,  "%04x", (HEX))
@@ -115,5 +120,182 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf,
 #define print_info_hex32(HEX)    printk(BIOS_INFO,   "%08x", (HEX))
 #define print_debug_hex32(HEX)   printk(BIOS_DEBUG,  "%08x", (HEX))
 #define print_spew_hex32(HEX)    printk(BIOS_SPEW,   "%08x", (HEX))
+#else
+/* __ROMCC__ */
+static void __console_tx_byte(unsigned char byte)
+{
+       uart_tx_byte(byte);
+}
+
+static void __console_tx_nibble(unsigned nibble)
+{
+       unsigned char digit;
+       digit = nibble + '0';
+       if (digit > '9') {
+               digit += 39;
+       }
+       __console_tx_byte(digit);
+}
+
+static void __console_tx_char(int loglevel, unsigned char byte)
+{
+       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
+               uart_tx_byte(byte);
+       }
+}
+
+static void __console_tx_hex8(int loglevel, unsigned char value)
+{
+       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
+               __console_tx_nibble((value >>  4U) & 0x0fU);
+               __console_tx_nibble(value & 0x0fU);
+       }
+}
+
+static void __console_tx_hex16(int loglevel, unsigned short value)
+{
+       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
+               __console_tx_nibble((value >> 12U) & 0x0fU);
+               __console_tx_nibble((value >>  8U) & 0x0fU);
+               __console_tx_nibble((value >>  4U) & 0x0fU);
+               __console_tx_nibble(value & 0x0fU);
+       }
+}
+
+static void __console_tx_hex32(int loglevel, unsigned int value)
+{
+       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
+               __console_tx_nibble((value >> 28U) & 0x0fU);
+               __console_tx_nibble((value >> 24U) & 0x0fU);
+               __console_tx_nibble((value >> 20U) & 0x0fU);
+               __console_tx_nibble((value >> 16U) & 0x0fU);
+               __console_tx_nibble((value >> 12U) & 0x0fU);
+               __console_tx_nibble((value >>  8U) & 0x0fU);
+               __console_tx_nibble((value >>  4U) & 0x0fU);
+               __console_tx_nibble(value & 0x0fU);
+       }
+}
+
+static void __console_tx_string(int loglevel, const char *str)
+{
+       if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
+               unsigned char ch;
+               while((ch = *str++) != '\0') {
+                       if (ch == '\n')
+                               __console_tx_byte('\r');
+                       __console_tx_byte(ch);
+               }
+       }
+}
+
+#define FUNCTIONS_FOR_PRINT
+#ifdef  FUNCTIONS_FOR_PRINT
+static void print_emerg_char(unsigned char byte) { __console_tx_char(BIOS_EMERG, byte); }
+static void print_emerg_hex8(unsigned char value){ __console_tx_hex8(BIOS_EMERG, value); }
+static void print_emerg_hex16(unsigned short value){ __console_tx_hex16(BIOS_EMERG, value); }
+static void print_emerg_hex32(unsigned int value) { __console_tx_hex32(BIOS_EMERG, value); }
+static void print_emerg(const char *str) { __console_tx_string(BIOS_EMERG, str); }
+
+static void print_alert_char(unsigned char byte) { __console_tx_char(BIOS_ALERT, byte); }
+static void print_alert_hex8(unsigned char value) { __console_tx_hex8(BIOS_ALERT, value); }
+static void print_alert_hex16(unsigned short value){ __console_tx_hex16(BIOS_ALERT, value); }
+static void print_alert_hex32(unsigned int value) { __console_tx_hex32(BIOS_ALERT, value); }
+static void print_alert(const char *str) { __console_tx_string(BIOS_ALERT, str); }
+
+static void print_crit_char(unsigned char byte) { __console_tx_char(BIOS_CRIT, byte); }
+static void print_crit_hex8(unsigned char value) { __console_tx_hex8(BIOS_CRIT, value); }
+static void print_crit_hex16(unsigned short value){ __console_tx_hex16(BIOS_CRIT, value); }
+static void print_crit_hex32(unsigned int value) { __console_tx_hex32(BIOS_CRIT, value); }
+static void print_crit(const char *str) { __console_tx_string(BIOS_CRIT, str); }
+
+static void print_err_char(unsigned char byte) { __console_tx_char(BIOS_ERR, byte); }
+static void print_err_hex8(unsigned char value) { __console_tx_hex8(BIOS_ERR, value); }
+static void print_err_hex16(unsigned short value){ __console_tx_hex16(BIOS_ERR, value); }
+static void print_err_hex32(unsigned int value) { __console_tx_hex32(BIOS_ERR, value); }
+static void print_err(const char *str) { __console_tx_string(BIOS_ERR, str); }
+
+static void print_warning_char(unsigned char byte) { __console_tx_char(BIOS_WARNING, byte); }
+static void print_warning_hex8(unsigned char value) { __console_tx_hex8(BIOS_WARNING, value); }
+static void print_warning_hex16(unsigned short value){ __console_tx_hex16(BIOS_WARNING, value); }
+static void print_warning_hex32(unsigned int value) { __console_tx_hex32(BIOS_WARNING, value); }
+static void print_warning(const char *str) { __console_tx_string(BIOS_WARNING, str); }
+
+static void print_notice_char(unsigned char byte) { __console_tx_char(BIOS_NOTICE, byte); }
+static void print_notice_hex8(unsigned char value) { __console_tx_hex8(BIOS_NOTICE, value); }
+static void print_notice_hex16(unsigned short value){ __console_tx_hex16(BIOS_NOTICE, value); }
+static void print_notice_hex32(unsigned int value) { __console_tx_hex32(BIOS_NOTICE, value); }
+static void print_notice(const char *str) { __console_tx_string(BIOS_NOTICE, str); }
+
+static void print_info_char(unsigned char byte) { __console_tx_char(BIOS_INFO, byte); }
+static void print_info_hex8(unsigned char value) { __console_tx_hex8(BIOS_INFO, value); }
+static void print_info_hex16(unsigned short value){ __console_tx_hex16(BIOS_INFO, value); }
+static void print_info_hex32(unsigned int value) { __console_tx_hex32(BIOS_INFO, value); }
+static void print_info(const char *str) { __console_tx_string(BIOS_INFO, str); }
+
+static void print_debug_char(unsigned char byte) { __console_tx_char(BIOS_DEBUG, byte); }
+static void print_debug_hex8(unsigned char value) { __console_tx_hex8(BIOS_DEBUG, value); }
+static void print_debug_hex16(unsigned short value){ __console_tx_hex16(BIOS_DEBUG, value); }
+static void print_debug_hex32(unsigned int value) { __console_tx_hex32(BIOS_DEBUG, value); }
+static void print_debug(const char *str) { __console_tx_string(BIOS_DEBUG, str); }
+
+static void print_spew_char(unsigned char byte) { __console_tx_char(BIOS_SPEW, byte); }
+static void print_spew_hex8(unsigned char value) { __console_tx_hex8(BIOS_SPEW, value); }
+static void print_spew_hex16(unsigned short value){ __console_tx_hex16(BIOS_SPEW, value); }
+static void print_spew_hex32(unsigned int value) { __console_tx_hex32(BIOS_SPEW, value); }
+static void print_spew(const char *str) { __console_tx_string(BIOS_SPEW, str); }
+
+#else
+#define print_emerg(STR)         __console_tx_string(BIOS_EMERG, STR)
+#define print_alert(STR)         __console_tx_string(BIOS_ALERT, STR)
+#define print_crit(STR)          __console_tx_string(BIOS_CRIT, STR)
+#define print_err(STR)           __console_tx_string(BIOS_ERR, STR)
+#define print_warning(STR)       __console_tx_string(BIOS_WARNING, STR)
+#define print_notice(STR)        __console_tx_string(BIOS_NOTICE, STR)
+#define print_info(STR)          __console_tx_string(BIOS_INFO, STR)
+#define print_debug(STR)         __console_tx_string(BIOS_DEBUG, STR)
+#define print_spew(STR)          __console_tx_string(BIOS_SPEW, STR)
+
+#define print_emerg_char(CH)     __console_tx_char(BIOS_EMERG, CH)
+#define print_alert_char(CH)     __console_tx_char(BIOS_ALERT, CH)
+#define print_crit_char(CH)      __console_tx_char(BIOS_CRIT, CH)
+#define print_err_char(CH)       __console_tx_char(BIOS_ERR, CH)
+#define print_warning_char(CH)   __console_tx_char(BIOS_WARNING, CH)
+#define print_notice_char(CH)    __console_tx_char(BIOS_NOTICE, CH)
+#define print_info_char(CH)      __console_tx_char(BIOS_INFO, CH)
+#define print_debug_char(CH)     __console_tx_char(BIOS_DEBUG, CH)
+#define print_spew_char(CH)      __console_tx_char(BIOS_SPEW, CH)
+
+#define print_emerg_hex8(HEX)    __console_tx_hex8(BIOS_EMERG, HEX)
+#define print_alert_hex8(HEX)    __console_tx_hex8(BIOS_ALERT, HEX)
+#define print_crit_hex8(HEX)     __console_tx_hex8(BIOS_CRIT, HEX)
+#define print_err_hex8(HEX)      __console_tx_hex8(BIOS_ERR, HEX)
+#define print_warning_hex8(HEX)  __console_tx_hex8(BIOS_WARNING, HEX)
+#define print_notice_hex8(HEX)   __console_tx_hex8(BIOS_NOTICE, HEX)
+#define print_info_hex8(HEX)     __console_tx_hex8(BIOS_INFO, HEX)
+#define print_debug_hex8(HEX)    __console_tx_hex8(BIOS_DEBUG, HEX)
+#define print_spew_hex8(HEX)     __console_tx_hex8(BIOS_SPEW, HEX)
+
+#define print_emerg_hex16(HEX)   __console_tx_hex16(BIOS_EMERG, HEX)
+#define print_alert_hex16(HEX)   __console_tx_hex16(BIOS_ALERT, HEX)
+#define print_crit_hex16(HEX)    __console_tx_hex16(BIOS_CRIT, HEX)
+#define print_err_hex16(HEX)     __console_tx_hex16(BIOS_ERR, HEX)
+#define print_warning_hex16(HEX) __console_tx_hex16(BIOS_WARNING, HEX)
+#define print_notice_hex16(HEX)  __console_tx_hex16(BIOS_NOTICE, HEX)
+#define print_info_hex16(HEX)    __console_tx_hex16(BIOS_INFO, HEX)
+#define print_debug_hex16(HEX)   __console_tx_hex16(BIOS_DEBUG, HEX)
+#define print_spew_hex16(HEX)    __console_tx_hex16(BIOS_SPEW, HEX)
+
+#define print_emerg_hex32(HEX)   __console_tx_hex32(BIOS_EMERG, HEX)
+#define print_alert_hex32(HEX)   __console_tx_hex32(BIOS_ALERT, HEX)
+#define print_crit_hex32(HEX)    __console_tx_hex32(BIOS_CRIT, HEX)
+#define print_err_hex32(HEX)     __console_tx_hex32(BIOS_ERR, HEX)
+#define print_warning_hex32(HEX) __console_tx_hex32(BIOS_WARNING, HEX)
+#define print_notice_hex32(HEX)  __console_tx_hex32(BIOS_NOTICE, HEX)
+#define print_info_hex32(HEX)    __console_tx_hex32(BIOS_INFO, HEX)
+#define print_debug_hex32(HEX)   __console_tx_hex32(BIOS_DEBUG, HEX)
+#define print_spew_hex32(HEX)    __console_tx_hex32(BIOS_SPEW, HEX)
+#endif
+
+#endif
 
 #endif /* CONSOLE_CONSOLE_H_ */
index 4173df22fa96f325793424cf01640cbefe1defa1..526297240570ab9e273e56bebc97791ba87bf8b4 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 25e0b3bbfca16ae87d22316eb5b087031061039e..389eea3ac8a4db85a30f17b214648ed4c3fcbd61 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 95ba4b69fd2f8d0cdcce11c5031329d6592d66f4..03ee0f414e3f84eab183c5a616e4842f6fa2c26b 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 1ee8aadf74e86bf454e43dbb0744275999a082c3..e34d3955c37ad82221b284e443dcd63911cd2a54 100644 (file)
@@ -24,7 +24,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/gx1/raminit.c"
 #include "cpu/x86/bist.h"
index 1547dc4da3482b73ebf05d588930df96ba8b9733..510b8f86f0c323169b5ab930617fa59b5edfddea 100644 (file)
@@ -24,7 +24,7 @@
 #include <device/pnp_def.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index 8decf4c7c279e859229e1d55b77b9b712d8a1546..b46ca394bef02c339b0683862d9eb607023af30e 100644 (file)
@@ -43,7 +43,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #define post_code(x) outb(x, 0x80)
 
index f9ca92fac1d559ecc1ba3e8ce01fec7366a7915b..a5991ad1eb65a95a9452e33a2a230c112c8a253e 100644 (file)
@@ -43,7 +43,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #define post_code(x) outb(x, 0x80)
 
index 332e256085a228931f18bb412246167d8026610a..a167228b4470df89e9ff24bb47e0f5f53fd9ec50 100644 (file)
@@ -47,7 +47,7 @@
 #include <cpu/x86/lapic.h>
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "pc80/serial.c"
 #include "lib/ramtest.c"
 #include <cpu/amd/model_10xxx_rev.h>
index 6337e89c2cbb39afb26ac54ee437d5056399e8e9..8c17b0affa6eb6d7396bb95a0fe1423b0982a10f 100644 (file)
@@ -24,7 +24,7 @@
 #include <device/pnp_def.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index d4dcca382283c1b7959a1dfe78d5fb2ef1a7c0d3..f8b64f1320638a80c2e33557cd4f361597b818ef 100644 (file)
@@ -37,7 +37,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #define post_code(x) outb(x, 0x80)
 
index 087fe1842ab844ceb201e820c34c68110a3414c0..e9b21ed029aa38a2fe4d05ddb98b466ffd438cbe 100644 (file)
@@ -5,7 +5,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
 #include "cpu/x86/bist.h"
index 4b8e2fe06d1682bf011f06f2491decb5b29fed73..582e93abc200cd383cb345eb5977998ff8a2ef1c 100644 (file)
 #include "pc80/serial.c"
 #include "./arch/i386/lib/printk_init.c"
 
-#if CONFIG_USE_INIT == 0
-       #include "lib/memcpy.c"
-#endif
-
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/uart8250.c"
 #include "console/vtxprintf.c"
 
-#if 0 
-static void post_code(uint8_t value) {
-#if 1
-        int i;
-        for(i=0;i<0x80000;i++) {
-                outb(value, 0x80);
-        }
-#endif
-}
-#endif
-
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
 #include "cpu/amd/model_fxx/apic_timer.c"
index 247e920b95f87c18b923384e1d38e4c1743df529..c46bdf447dcf61869dbfa8eeadd52f8767bdec11 100644 (file)
@@ -40,7 +40,7 @@ static void post_code(uint8_t value) {
 }
 #endif
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/amd/model_fxx_rev.h>
 #include "southbridge/amd/amd8111/amd8111_early_smbus.c"
 #include "northbridge/amd/amdk8/raminit.h"
index 4d86535bbe843eefb62b275e312d22704f0591ce..d7b6c63c0e985d11cec4da1819d1172894191684 100644 (file)
@@ -47,7 +47,7 @@
 #include <cpu/x86/lapic.h>
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "pc80/serial.c"
 #include "lib/ramtest.c"
 #include <cpu/amd/model_10xxx_rev.h>
index 975d259d490c1ae8f4fa8b3e7f15d8b3795ba7ab..3440e717c0485d1907c656a0332d1083ba1dc9e8 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index d55330274d177d95eaa4352bc86c8a12c3414fb3..2172338685c0cc07356d84e45f853b877cde9523 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index 427911260a79935836880099820dcfb17a865a87..3ee9241d54c4a52645c38e90975f3a4f9eb1db0f 100644 (file)
@@ -24,7 +24,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/gx1/raminit.c"
 #include "cpu/x86/bist.h"
index d4d3be9d1da12ed6df4808c856fbfb5837535e45..693e440934bd94ab2e07e46b4b9e3f3dd683f874 100644 (file)
@@ -25,7 +25,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/gx1/raminit.c"
 #include "superio/nsc/pc87351/pc87351_early_serial.c"
index 61e6b5450ceda778872033185871972b6ab77242..b64ccae0fd017ba309fc7e5423b1a57b4be34901 100644 (file)
@@ -49,7 +49,7 @@
 
 #include <cpu/amd/model_fxx_rev.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/amdk8/incoherent_ht.c"
 #include "southbridge/nvidia/ck804/ck804_early_smbus.c"
index 7e9b6fc4dd0de07aaf3b60a14e3b7ebb5c3c0219..c2390c76d117265e3bc2efb90084f4f8f7a65cdb 100644 (file)
@@ -47,7 +47,7 @@ unsigned int get_sbdn(unsigned bus);
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
 #include "cpu/amd/model_fxx/apic_timer.c"
index 81971914ce75cf8929c689e75dc5d00338a8a941..2514019aa6badb48e16bf8eb259a68737c0e260b 100644 (file)
@@ -52,7 +52,7 @@ unsigned int get_sbdn(unsigned bus);
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
 #include "cpu/amd/model_fxx/apic_timer.c"
index 2345346353d495182b3f46373fb5c5fbc607c3e4..223201971c604dae03e383f45bf96561d8ca37d7 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801ax/i82801ax_early_smbus.c"
 #include "northbridge/intel/i82810/raminit.h"
index 82076e546fbb057777862203783ab9df798b4e6c..22fa410e33e17190ac0af6603ed66009914d4a05 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/smsc/lpc47b272/lpc47b272_early_serial.c"
 #include "northbridge/intel/i82810/raminit.h"
index 3ccd8ec0969c1ba29cccb1bb6ea86c87d33e48b5..1056360a9ea97e88e6ef4d1ab20e6f7614469af5 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdlib.h>
 #include <cpu/x86/lapic.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 676c8e27e15e9c42ece016d5311b3f05fd531530..6e44048653970fd18e579cc6823d762c52f6db0c 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdlib.h>
 #include <cpu/x86/lapic.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index eeb46e0a012ea7999947ffeef86b7e9329cea948..8974174dece394d801986df8bc38a532b3191f32 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 44cfb2ca8253137649a7a42d82918fa0daa82c33..462df701512baefb9e9b04e7702fa4b47ab5426c 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index dbee44d89380bfca77fe780225b1ca76ffbbf2ea..2445b503c51cc6fcd8ef3efa350651e7f20a1f7a 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 671bde17d40f75b4d1117e96b55d5d0e80865903..5da8dbf5ca1957110e30413be857ed3633117a0d 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 0e828fe99680405d958c7b9e2c42abf5e7f65d0e..4a6cc25a10ec8ddea8a69dba2239a485b72a01ad 100644 (file)
@@ -25,7 +25,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/gx1/raminit.c"
 #include "superio/nsc/pc97317/pc97317_early_serial.c"
index dc960d8ceeb5d0049a49063ab975d0ba6d1336e2..e7ed478879efbdb28d996c02758e1a6f509de430 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 07f5ad5a923a384c49cec7e124a55041b708d3ed..744623f84a41aea4c22d5ba6a102fe764a2e9588 100644 (file)
@@ -25,7 +25,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/gx1/raminit.c"
 #include "superio/nsc/pc97317/pc97317_early_serial.c"
index 90de05a1f64091bb1c8398caab6b9764cbae1d75..2801f9e06aa28010fb32fadb2f6431ba51e9ab5b 100644 (file)
@@ -27,7 +27,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/cn700/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 525e2c561c41beb3e4ff49e70ab8a06d96993229..69f07f351bf90f0bd816eba3a2616fcfe0ca98df 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index d67b713451bc3b4790dc7154dbc9903b18fb7553..71211c587ce343706dbfc1444be818ad96b4e07f 100644 (file)
@@ -14,7 +14,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #if 0
index 1d9826dd7b2293feeab000e63e8ead5987ac1562..fbc195ab65c89f7179726bcab0c37186b7be17ae 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 37b28aace61354e227131b5d1cdccb989ce66521..17a4113afd8cc73248ef658bbced979e9df7e38c 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801ex/i82801ex_early_smbus.c"
 #include "northbridge/intel/e7520/raminit.h"
@@ -170,10 +170,12 @@ static void main(unsigned long bist)
        static const struct mem_controller mch[] = {
                {
                        .node_id = 0,
+                       /*
                        .f0 = PCI_DEV(0, 0x00, 0),
                        .f1 = PCI_DEV(0, 0x00, 1),
                        .f2 = PCI_DEV(0, 0x00, 2),
                        .f3 = PCI_DEV(0, 0x00, 3),
+                       */
                        /* the wiring on this part is really messed up */
                        /* this is my best guess so far */
                        .channel0 = {(0xa<<3)|0, (0xa<<3)|1, (0xa<<3)|2, (0xa<<3)|3, },
index 1e0a8dcc475ba152b5b48f7ca75ef38ff0bb9bcc..6bd7068a8a8789ef4175204cc7e32398facb0f42 100644 (file)
@@ -12,7 +12,7 @@
 #include <stdlib.h>
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801dx/i82801dx.h"
 #include "southbridge/intel/i82801dx/i82801dx_early_smbus.c"
index 8db527d52b24922fb885541cf3820cf3c9464082..48656221817d763acd457e0ca3621c161aa5b251 100644 (file)
@@ -7,7 +7,7 @@
 #include <arch/hlt.h>
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 //#include "lib/delay.c"
index 9d5d431f39365c63cb26fd5f472c1c98fb3a20be..1983b9678fa9ca17df2a2e7f2b6f80089563daca 100644 (file)
@@ -5,7 +5,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index 6fa43e3fe3256e87dd97d29aadc3765dad309ee2..633c23cd5a51c2aaa3c3ad248f99fe75b0f9414a 100644 (file)
@@ -6,7 +6,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 //#include "southbridge/intel/i440bx/i440bx_early_smbus.c"
 #include "superio/nsc/pc97317/pc97317_early_serial.c"
index 02d735062625918a4550e19d6c2a0be60a0613eb..1d6eeded110564631f6b1bea4053e3d276fe7edc 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/lapic/boot_cpu.c"
index d5c671fdd527dbdce8d18c203abdc063b7a2f036..721b20806ae42b01e14796e1b456bf6eafec06c7 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 452084f7c4865c5b22cb80b4ece77129891eaef5..d0a5eeb351372b973751643612be3d12661f35e0 100644 (file)
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
 
-#if CONFIG_USE_INIT == 0
-        #include "lib/memcpy.c"
-#endif
-
-#include "arch/i386/lib/console.c"
-
-#if 0
-static void post_code(uint8_t value) {
-#if 1
-        int i;
-        for(i=0;i<0x80000;i++) {
-                outb(value, 0x80);
-        }
-#endif
-}
-#endif
+#include "lib/uart8250.c"
+#include "arch/i386/lib/printk_init.c"
+#include "console/vtxprintf.c"
+#include "console/console.c"
 
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
index f55ee1b78915abd47b66ca80cdd43cd1f61a85f7..d66bf51f59c554b68945fe71f1cccd2a5f6f7898 100644 (file)
@@ -54,7 +54,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #if CONFIG_USBDEBUG_DIRECT
 #include "southbridge/sis/sis966/sis966_enable_usbdebug_direct.c"
 #include "pc80/usbdebug_direct_serial.c"
index 007dfa9a9555ac7c69d4881adc60552f11d6080c..2bd3205842b24b773bd5b5ebcc0fdab336c0510c 100644 (file)
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
 
-#if CONFIG_USE_INIT == 0
-        #include "lib/memcpy.c"
-#endif
-
-#include "arch/i386/lib/console.c"
-
-#if 0 
-static void post_code(uint8_t value) {
-#if 1
-        int i;
-        for(i=0;i<0x80000;i++) {
-                outb(value, 0x80);
-        }
-#endif
-}
-#endif
+#include "lib/uart8250.c"
+#include "arch/i386/lib/printk_init.c"
+#include "console/vtxprintf.c"
+#include "console/console.c"
 
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
index a03e839d6f45ca554d8a0ccd5bd8f7e38238072d..9ac67e465fc46396990382927fc61ff4b4185fdc 100644 (file)
@@ -52,7 +52,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #if CONFIG_USBDEBUG_DIRECT
 #include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
 #include "pc80/usbdebug_direct_serial.c"
index 6b617afdfa319d9e77670e0a3443331be5f70cc8..c70ff275563ed55b466723aa23ec872aba02c2a2 100644 (file)
@@ -58,7 +58,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index ac8d8b8a840b36682784b6f9e288c4dccbefddff..6757d76aef8a56c4a22e1581d70fea1c8b449751 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 /* TODO: It's a PC87364 actually! */
 #include "superio/nsc/pc87360/pc87360_early_serial.c"
index a9dccf0dcf30ddef8f689858652bac4ee4d93ed6..ab42a7ef9da6bdd92b439a66611df28dc8cb6229 100644 (file)
@@ -10,7 +10,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 1843a8fbba64c3d45dfe63d0f8b80b7d97ac3d20..9bbad713466914e3b5f836a81c98a0e991246063 100644 (file)
@@ -10,7 +10,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index f4a40e8b7638be15ab42105b3a7b84baa95ccdf8..7b2dfb8bf9616bc17c99a7bc604430980720cb0c 100644 (file)
@@ -25,7 +25,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/winbond/w83977f/w83977f_early_serial.c"
 #include "southbridge/amd/cs5530/cs5530_enable_rom.c"
index e25b889e3b90cd7c3e48313962f5c8c145bace3b..0873450b9d9c715199337e4646cc782c9a59633c 100644 (file)
@@ -25,7 +25,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/winbond/w83977tf/w83977tf_early_serial.c"
 #include "southbridge/amd/cs5530/cs5530_enable_rom.c"
index 3f2435d69b16d750471c298a70eee88a5fb9995c..80226a940de11c0f6187dc34a7dd8e83261c5863 100644 (file)
@@ -24,7 +24,7 @@
 #include <device/pnp_def.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index 48f3f78e7b912393b9515881ca06a92649e0b13f..7767b1cc47e4fa782a28fd02832653c7b18d4166 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <console/console.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/x86/bist.h>
 
 #if CONFIG_USBDEBUG_DIRECT
index 7eb83c9153432130c9c8f8ca23a1c162f8019c6f..13c7e951f3f912abaaa5bfbbd2a723b428a51515 100644 (file)
@@ -33,7 +33,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/x86/bist.h>
 
 #include "lib/ramtest.c"
index 04b552fb25aee4cd5313b90bdbc4d632e600de52..4255e43c21d96eeeffa01cbbbd66f725856012d3 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801ex/i82801ex_early_smbus.c"
 #include "northbridge/intel/e7520/raminit.h"
@@ -60,10 +60,12 @@ static void main(unsigned long bist)
        static const struct mem_controller mch[] = {
                {
                        .node_id = 0,
+                       /*
                        .f0 = PCI_DEV(0, 0x00, 0),
                        .f1 = PCI_DEV(0, 0x00, 1),
                        .f2 = PCI_DEV(0, 0x00, 2),
                        .f3 = PCI_DEV(0, 0x00, 3),
+                       */
                        .channel0 = { (0xa<<3)|2, (0xa<<3)|1, (0xa<<3)|0, 0 },
                        .channel1 = { (0xa<<3)|6, (0xa<<3)|5, (0xa<<3)|4, 0 },
                }
index f23169736b87a78d5c45f0cdc08c7f069802e78a..ed8e647c5326e767c8e55bf1a31b3a0ba6367c6a 100644 (file)
@@ -28,7 +28,7 @@
 #include <cpu/x86/lapic.h>
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i3100/i3100_early_smbus.c"
 #include "southbridge/intel/i3100/i3100_early_lpc.c"
index b2e04be896e6a74be8b4ad12c381f9a2e984a781..4163c873b0c40665b3fa0e736766e7915ac36956 100644 (file)
@@ -29,7 +29,7 @@
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
 #include "pc80/udelay_io.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i3100/i3100_early_smbus.c"
 #include "southbridge/intel/i3100/i3100_early_lpc.c"
index 240e91796476b9c71ce8ee31f0be92c033393e33..685f3b8700ce1b449c03851a121f1ad54ece3f91 100644 (file)
@@ -9,7 +9,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801cx/i82801cx_early_smbus.c"
 #include "northbridge/intel/e7501/raminit.h"
index 1f865adf0c568104630e0e584c10279c828f8232..fec1020dba9880acdded5d234e453befa4ea541f 100644 (file)
@@ -30,7 +30,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/amd/model_fxx_rev.h>
 #include "southbridge/amd/amd8111/amd8111_early_smbus.c"
 #include "northbridge/amd/amdk8/raminit.h"
index 55ba27a09c2586c5ec19a2b2c409e79bc1959d6d..3ceef39900662d72c8c3ea5deda16b34c140d427 100644 (file)
@@ -30,7 +30,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/amd/model_fxx_rev.h>
 #include "southbridge/amd/amd8111/amd8111_early_smbus.c"
 #include "northbridge/amd/amdk8/raminit.h"
index 55ba27a09c2586c5ec19a2b2c409e79bc1959d6d..3ceef39900662d72c8c3ea5deda16b34c140d427 100644 (file)
@@ -30,7 +30,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/amd/model_fxx_rev.h>
 #include "southbridge/amd/amd8111/amd8111_early_smbus.c"
 #include "northbridge/amd/amdk8/raminit.h"
index ac3ab97f91459d062a86679f2ffc437c42d3f9bd..4de5aa72abfea2631c1a184bf93327de41efb7c4 100644 (file)
@@ -27,7 +27,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/cn700/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 121eb143f0c4f51d1a19e39a23267f5a587f39a1..247b5eb9afb9cabe2b8065536510816da3686320 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <console/console.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/x86/bist.h>
 
 #if CONFIG_USBDEBUG_DIRECT
index 28df9b74bc6357969c61f17a6aab61456a07877c..200f7567bc4dd5ab227fbf8c9268bad0fda25f1e 100644 (file)
@@ -44,7 +44,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #define post_code(x) outb(x, 0x80)
 
index c5ed73aec65720190b232516a2e658819246626f..bc097e385d6dca467be55aa7e95d8277d973f1df 100644 (file)
@@ -5,7 +5,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
 #include "cpu/x86/bist.h"
index 3884d28c863b4eab62ef78fd4efd37b8fdd7091e..67f4c3c38187e3bf203486a805453106c8e7bfda 100644 (file)
@@ -28,7 +28,7 @@
 #include <device/pnp_def.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index e92cf7adc76b34365285d5fe91e6ce26cca041b6..7a73a1b4022a822ab1d257eba833502a3000c9f2 100644 (file)
@@ -29,7 +29,7 @@
 #include <device/pnp_def.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index d06bfdd11a241857f949ea81ec5fa9c4d44f582e..7a532e0fd526dfd258c254069d51770f7c101b86 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801ax/i82801ax_early_smbus.c"
 #include "northbridge/intel/i82810/raminit.h"
index f061cb546030a51a8c936351269f527d4f949bf3..2bf27e3e8d16d50e016fd2687d946512ee51c0e9 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index b250994939e9ad7643275bda2396d3998e13bc56..2a6dce7beb72d90d2ae0a86da232163a35304136 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index e5a6bf9fe4195c3c570515fe737128fdfff736e6..71f5de1325e05c8b6c8854de88d9e5886e792122 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 4a558eba6cf00bd7e2382d9b4d600201e40c66bf..a1096a4011102f2eb6373734d12d01cd0d0a638c 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
 #include "northbridge/intel/i82810/raminit.h"
index 80f217c363cd698f7baca16dc3e97538d6cb4ba9..2a6c6f368bef6e8d93732c70e07b42009748881e 100644 (file)
@@ -51,7 +51,7 @@
 
 #include <cpu/amd/model_fxx_rev.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/amdk8/incoherent_ht.c"
 #include "southbridge/nvidia/ck804/ck804_early_smbus.c"
index 84ba6c1dafd2a97dce1dfcc46f6dc2ab4634c528..f8ac2fec3a69f2e6745ebe827cf2f159c7f998b0 100644 (file)
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#if CONFIG_USE_INIT == 0
-#include "lib/memcpy.c"
-#endif
-#include "arch/i386/lib/console.c"
+
+#include "console/console.c"
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
 #include "cpu/amd/model_fxx/apic_timer.c"
index 9016075fb9338cfc1c965fab26ed3b2e9283a745..7e97a27e5315a0af711e22e3ffbcd3414aafff7f 100644 (file)
@@ -56,7 +56,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #if CONFIG_USBDEBUG_DIRECT
 #include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
 #include "pc80/usbdebug_direct_serial.c"
index cf625e5561d41c8ddf1f6e9f2feee0904102f569..350980e5d2e2b6afb41cefba6bce5c3d77dd42be 100644 (file)
@@ -50,7 +50,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #if 0
 static void post_code(uint8_t value) {
index 270924392af06c1b3e9bab5ad41bf4e0a2b82a98..24a307eff6c40cc16b3042a705baef9d7791eb59 100644 (file)
@@ -45,7 +45,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #include <cpu/amd/model_fxx_rev.h>
 #include "southbridge/nvidia/mcp55/mcp55_early_smbus.c"
index e11b4382e5623654491d56494c0185c7b984af3c..622dfd1058317dcf5e322dfc231e37f676882840 100644 (file)
@@ -46,7 +46,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #if CONFIG_USBDEBUG_DIRECT
 #include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
 #include "pc80/usbdebug_direct_serial.c"
index 9f03a6e59428dbeb6ba655238292780bfdd53479..33b04d983fdf067d17a82884baa1c521c73b2f76 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/smsc/smscsuperio/smscsuperio_early_serial.c"
 #include "northbridge/intel/i82810/raminit.h"
index 7ee9d1600ae6436c4456b6520a167de451a56caf..f6d2e54dc6ef185b26d86507d5ff763365d7144c 100644 (file)
@@ -15,7 +15,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #if 0
index 1a9121e40f076670658aa1c3ea2ffb8cb710d57c..0935df23ad58ff520a18d22caa77ff1e2739ee63 100644 (file)
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
 
-#if CONFIG_USE_INIT == 0
-       #include "lib/memcpy.c"
-#endif
-
-#include "arch/i386/lib/console.c"
-
-#if 0
-static void post_code(uint8_t value) {
-#if 1
-       int i;
-       for(i=0;i<0x80000;i++) {
-               outb(value, 0x80);
-       }
-#endif
-}
-#endif
+#include "lib/uart8250.c"
+#include "arch/i386/lib/printk_init.c"
+#include "console/vtxprintf.c"
+#include "console/console.c"
 
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
index daaf84550d90ec60bdc1af800f75557fb9a71d40..cf4501f460cedb6260497d9247b8a4f6311d8dbf 100644 (file)
@@ -52,7 +52,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #if CONFIG_USBDEBUG_DIRECT
 #include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
 #include "pc80/usbdebug_direct_serial.c"
index c47ed795940cb9d1c282c5136aa89be1c38a172f..b13700da44d508e011f3c59591e36a3b173e6391 100644 (file)
@@ -5,7 +5,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
 #include "cpu/x86/bist.h"
index c47ed795940cb9d1c282c5136aa89be1c38a172f..b13700da44d508e011f3c59591e36a3b173e6391 100644 (file)
@@ -5,7 +5,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
 #include "cpu/x86/bist.h"
index 764400c98a39643b9244ca508c4e80dc520a442e..07f11ff647696e984e70ffbb724785dde727fcad 100644 (file)
@@ -25,7 +25,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index a7635ee8ace174d59ed24d3202a54a3c7ff51ed3..b1bc4b4d1abb44c2ac5e95cba9f4963044fc0efa 100644 (file)
@@ -27,7 +27,7 @@
 #include <arch/hlt.h>
 #include "pc80/serial.c"
 #include "pc80/udelay_io.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/smsc/smscsuperio/smscsuperio_early_serial.c"
 #include "northbridge/intel/i82830/raminit.h"
index 3a2c672b51d668b0ac393bcd3706d784e69ec058..28f56a89f37713103a1b4fe81ab0f41fb9a3d4fe 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <console/console.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include <cpu/x86/bist.h>
 
 #if CONFIG_USBDEBUG_DIRECT
index cbf4bd3ea0e745e11cb8277549959820e0941e10..1636c42f8613afdeb4af5282151c8baa79fed7da 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index e006a74680daebbaa661047428229632c06d0ad6..84e29b8e9ffa39796634bd546583eff7eb5e16a0 100644 (file)
@@ -17,7 +17,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index bb625933e78c253e01208cd4e574ed8a71bad3b9..05c62c3e2c85b052b1f3f180b049e97d4720fc87 100644 (file)
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
 
-#if CONFIG_USE_INIT == 0
-        #include "lib/memcpy.c"
-#endif
-
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/uart8250.c"
 #include "console/vtxprintf.c"
 #include "./arch/i386/lib/printk_init.c"
 
-#if 0 
-static void post_code(uint8_t value) {
-#if 1
-        int i;
-        for(i=0;i<0x80000;i++) {
-                outb(value, 0x80);
-        }
-#endif
-}
-#endif
-
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
 #include "cpu/amd/model_fxx/apic_timer.c"
index a9c3ef4afa8e22c5359bbc473047f11c1bb8f664..2edf58c39da8ba86e29e215f83308d65c0101a50 100644 (file)
@@ -50,7 +50,7 @@
 #include "southbridge/nvidia/mcp55/mcp55_early_smbus.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index bb625933e78c253e01208cd4e574ed8a71bad3b9..05c62c3e2c85b052b1f3f180b049e97d4720fc87 100644 (file)
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
 
-#if CONFIG_USE_INIT == 0
-        #include "lib/memcpy.c"
-#endif
-
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/uart8250.c"
 #include "console/vtxprintf.c"
 #include "./arch/i386/lib/printk_init.c"
 
-#if 0 
-static void post_code(uint8_t value) {
-#if 1
-        int i;
-        for(i=0;i<0x80000;i++) {
-                outb(value, 0x80);
-        }
-#endif
-}
-#endif
-
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
 #include "cpu/amd/model_fxx/apic_timer.c"
index 552098d230ccdb5f76c7a396bbd86b523d4e4fb7..a56f799c7aec32df718a3b965a530872d3bedb0a 100644 (file)
@@ -53,7 +53,7 @@
 #include "southbridge/nvidia/mcp55/mcp55_early_smbus.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 068e27f16d423d4e03b8146ac4350c7d3f827e74..095c4b1f1f02ac6be99f4339fa06a68251f81bec 100644 (file)
@@ -47,7 +47,7 @@
 // for enable the FAN
 #include "southbridge/nvidia/mcp55/mcp55_early_smbus.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_10xxx_rev.h>
index a65fd344564a670516f1fa7cfbb012c3ed385afd..3c4dedefaf71b8c905eecd6e6ec2abf8d461a3f3 100644 (file)
@@ -48,7 +48,7 @@
 #include "southbridge/nvidia/mcp55/mcp55_early_smbus.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_10xxx_rev.h>
index 0b274c1947b832a13ccb5c5f52d2a43eddd614a8..330b7ce8a733574e3cf58c8eed6b5001e68863b5 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/esb6300/esb6300_early_smbus.c"
 #include "northbridge/intel/e7525/raminit.h"
index 5cbb83074edba044c62cbb97fecae4a828284be2..58168e646c88ce4c6226ad4ef04d8a94cfd89d48 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/esb6300/esb6300_early_smbus.c"
 #include "northbridge/intel/e7520/raminit.h"
@@ -62,10 +62,12 @@ static void main(unsigned long bist)
        static const struct mem_controller mch[] = {
                {
                        .node_id = 0,
+                       /*
                        .f0 = PCI_DEV(0, 0x00, 0),
                        .f1 = PCI_DEV(0, 0x00, 1),
                        .f2 = PCI_DEV(0, 0x00, 2),
                        .f3 = PCI_DEV(0, 0x00, 3),
+                       */
                        .channel0 = {(0xa<<3)|0, (0xa<<3)|1, (0xa<<3)|2, (0xa<<3)|3, },
                        .channel1 = {(0xa<<3)|4, (0xa<<3)|5, (0xa<<3)|6, (0xa<<3)|7, },
                }
index 4af2a541318011187997f2412aa8e6645a458673..46b1ca54ce9c86769623ed5ae1d3913741765d7f 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801ex/i82801ex_early_smbus.c"
 #include "northbridge/intel/e7520/raminit.h"
@@ -62,10 +62,12 @@ static void main(unsigned long bist)
        static const struct mem_controller mch[] = {
                {
                        .node_id = 0,
+                       /*
                        .f0 = PCI_DEV(0, 0x00, 0),
                        .f1 = PCI_DEV(0, 0x00, 1),
                        .f2 = PCI_DEV(0, 0x00, 2),
                        .f3 = PCI_DEV(0, 0x00, 3),
+                       */
                        .channel0 = {(0xa<<3)|3, (0xa<<3)|2, (0xa<<3)|1, (0xa<<3)|0, },
                        .channel1 = {(0xa<<3)|7, (0xa<<3)|6, (0xa<<3)|5, (0xa<<3)|4, },
 
index 7ddb2c46d7c84dd5ad08b994c1f463b05112175e..a703d152775c1b75051d7b22e9b88303d76acb82 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801ex/i82801ex_early_smbus.c"
 #include "northbridge/intel/e7520/raminit.h"
@@ -63,10 +63,12 @@ static void main(unsigned long bist)
        static const struct mem_controller mch[] = {
                {
                        .node_id = 0,
+                       /*
                        .f0 = PCI_DEV(0, 0x00, 0),
                        .f1 = PCI_DEV(0, 0x00, 1),
                        .f2 = PCI_DEV(0, 0x00, 2),
                        .f3 = PCI_DEV(0, 0x00, 3),
+                       */
                        .channel0 = {(0xa<<3)|3, (0xa<<3)|2, (0xa<<3)|1, (0xa<<3)|0, },
                        .channel1 = {(0xa<<3)|7, (0xa<<3)|6, (0xa<<3)|5, (0xa<<3)|4, },
                }
index 38c06d5000e40e547c8531725d945ff265be3c04..3b46b31007bb5458a6bba2c7e1e33dfe5e2ad10b 100644 (file)
@@ -8,7 +8,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82801ex/i82801ex_early_smbus.c"
 #include "northbridge/intel/e7520/raminit.h"
@@ -63,10 +63,12 @@ static void main(unsigned long bist)
        static const struct mem_controller mch[] = {
                {
                        .node_id = 0,
+                       /*
                        .f0 = PCI_DEV(0, 0x00, 0),
                        .f1 = PCI_DEV(0, 0x00, 1),
                        .f2 = PCI_DEV(0, 0x00, 2),
                        .f3 = PCI_DEV(0, 0x00, 3),
+                       */
                        .channel0 = {(0xa<<3)|3, (0xa<<3)|2, (0xa<<3)|1, (0xa<<3)|0, },
                        .channel1 = {(0xa<<3)|7, (0xa<<3)|6, (0xa<<3)|5, (0xa<<3)|4, },
                }
index 309016e787d42e7795b7a2f9f9312d34990d949f..4f4cb1505f94847c881daaf659a022b0965cc066 100644 (file)
@@ -43,7 +43,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #define post_code(x) outb(x, 0x80)
 
index 769f674a914c9acbc874489e99a1e9fa26ba7222..1fba17f88bb33523cabbdd642315b1819fdaa590 100644 (file)
@@ -43,7 +43,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #define post_code(x) outb(x, 0x80)
 
index b5db71d3eb331fd710536a38711ecf584627a0c9..7fd5423c5d07b647fa1b8eafce0f9dcf64017d1e 100644 (file)
@@ -13,7 +13,7 @@
 #include <arch/hlt.h>
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 
index 07f5ad5a923a384c49cec7e124a55041b708d3ed..744623f84a41aea4c22d5ba6a102fe764a2e9588 100644 (file)
@@ -25,7 +25,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/amd/gx1/raminit.c"
 #include "superio/nsc/pc97317/pc97317_early_serial.c"
index 50a6335fb44a2f1ab3a2d2b59a7180226922912f..4a8e0a698a36485b2ae28a4c33f384fa0020ac60 100644 (file)
@@ -28,7 +28,7 @@
 #include <arch/llshell.h>
 #include "pc80/serial.c"
 #include "pc80/udelay_io.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "superio/smsc/smscsuperio/smscsuperio_early_serial.c"
 #include "northbridge/intel/i82830/raminit.h"
index 6c1ba5891a93cf20085a3059c7238b07ca84d003..893eca59afb37e1100a1d36f5fdc0ae6ccf198e3 100644 (file)
@@ -26,7 +26,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_enable_rom.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
index 8ca9c5cba5562723c1fa55cd4c51ba25dc803acf..74d043b04a4c74c914f744c4a05bd2b18a5289e2 100644 (file)
@@ -9,20 +9,9 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
-#if 0
-static void post_code(uint8_t value) {
-#if 1
-        int i;
-        for(i=0;i<0x80000;i++) {
-                outb(value, 0x80);
-        }
-#endif
-}
-#endif
-
 #include "southbridge/intel/i82801ex/i82801ex_early_smbus.c"
 #include "northbridge/intel/e7501/raminit.h"
 
@@ -139,7 +128,7 @@ void amd64_main(unsigned long bist)
                        "movl   %%esp, %0\n\t"
                        : "=a" (v_esp)
                );
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
                printk(BIOS_DEBUG, "v_esp=%08x\r\n", v_esp);
 #else
                print_debug("v_esp="); print_debug_hex32(v_esp); print_debug("\r\n");
@@ -151,7 +140,7 @@ void amd64_main(unsigned long bist)
 
 cpu_reset_x:
 
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
         printk(BIOS_DEBUG, "cpu_reset = %08x\r\n",cpu_reset);
 #else
         print_debug("cpu_reset = "); print_debug_hex32(cpu_reset); print_debug("\r\n");
@@ -200,7 +189,7 @@ cpu_reset_x:
                 {  
                         print_debug("Use Ram as Stack now - \r\n");
                 }
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
                 printk(BIOS_DEBUG, "new_cpu_reset = %08x\r\n", new_cpu_reset);
 #else
                 print_debug("new_cpu_reset = "); print_debug_hex32(new_cpu_reset); print_debug("\r\n");
index 22eecc9ec9b4d929781190d622ef05db63579ff8..3dfc8514604889859ab71fa43e766f75d7599c30 100644 (file)
@@ -10,7 +10,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #if 0
index e57c3642b57711d4e15632c7bfa553ad5d3e61db..ee5c659ad81c171652a86120925f238efd456db5 100644 (file)
@@ -10,7 +10,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 2dbcdbebf15d3cad86af16782e4a19aa6635ea6a..13e5305eea90742d4eca2e12cd6a72441cb1e7fe 100644 (file)
@@ -10,7 +10,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index b47bf584e872ef17029aab2383d7be53cbd86952..50593b83bff42a462808e711211e5ecb5b00135e 100644 (file)
@@ -14,7 +14,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #if 0
index d801abbdc9719be71d9875a289d4432b1b27c053..41da91c842d6985e68907713d6030b0e3fcf431c 100644 (file)
@@ -10,7 +10,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index a6e4f8e2cc31022b0e76b967725a62e6753028c6..470b3e384a518e64609901bf14d5bbda1ba1a410 100644 (file)
@@ -9,7 +9,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #if 0
index 838c71c316fec842ee1278da87ca9de7024db165..149c0c84fb3f8c2cb73bc0dd61854949f6f4ec96 100644 (file)
@@ -15,7 +15,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 099c29aa3617c2220c908115c5c641da1353ab9e..111b5b5fc52dbf254f8c6161400e54804332f3de 100644 (file)
@@ -15,7 +15,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 98ac94c3e102c339401be5a8749a03c1962df874..a52af343e631ba6463acf0aa686c36682b6afec2 100644 (file)
@@ -17,7 +17,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 3e98a5c979cd910fa9cafee4ace92338ec3a4e8d..7c9b43862ca3c84ddb6d6656ef4aa240b7581ffa 100644 (file)
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
 
-#if CONFIG_USE_INIT == 0
-       #include "lib/memcpy.c"
-#endif
-
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 
 #include <cpu/amd/model_fxx_rev.h>
 #include "northbridge/amd/amdk8/raminit.h"
index 0db72dff244b0348749048ec88768ab13aecc775..0a07dfede8d4473b9f63ce5b4a12b9e4a869ecd7 100644 (file)
@@ -52,7 +52,7 @@
 #include "pc80/mc146818rtc_early.c"
 
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #if CONFIG_USBDEBUG_DIRECT
 #include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
 #include "pc80/usbdebug_direct_serial.c"
index 90819455114306c641a5290b2de223c5ea4cd29b..5c72639d5e406d311a412f175b5588d0a46a2049 100644 (file)
@@ -46,7 +46,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #if CONFIG_USBDEBUG_DIRECT
 #include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
 #include "pc80/usbdebug_direct_serial.c"
index 804531b0cd99103b105c928294701335b1a242b4..430e547164753ad954c542792bad7b010737f396 100644 (file)
@@ -10,7 +10,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 6dd2b042b029329e6e8db360722fe2540ac8dc31..11c36cb698fb30f680210e452b0eb85bf3ff53b1 100644 (file)
@@ -9,7 +9,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 
 #include <cpu/amd/model_fxx_rev.h>
index 1c4969c322634a112e8a0d01d1b2271ecefe9ad6..960a738b6d9160f7b85da309c76e851f520eeffa 100644 (file)
@@ -27,7 +27,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/cn700/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 9dcb4a8939f2b5c02cf3990fd43ae19764de90da..2d741a124674d8674cb9833b1b2f8cd629cbd7dd 100644 (file)
@@ -10,7 +10,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/vt8623/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 451a7ba7e1c8642a32989f5ea4da3a637674e3bf..80de0afc71c125d1c4667629a8e9b3f390619db9 100644 (file)
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/vx800/vx800.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
 #include "cpu/x86/bist.h"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
-#if CONFIG_USE_INIT == 0
 #include <string.h>
-#endif
 #include "cpu/x86/lapic/boot_cpu.c"
 
 /* This file contains the board-special SI value for raminit.c. */
@@ -726,7 +724,7 @@ void amd64_main(unsigned long bist)
                 */
                unsigned v_esp;
                __asm__ volatile ("movl %%esp, %0\n\t":"=a" (v_esp));
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
                printk(BIOS_DEBUG, "v_esp=%08x\r\n", v_esp);
 #else
                print_debug("v_esp=");
@@ -745,7 +743,7 @@ cpu_reset_x:
         */
        cpu_reset = 0;
 
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
        printk(BIOS_DEBUG, "cpu_reset = %08x\r\n", cpu_reset);
 #else
        print_debug("cpu_reset = ");
@@ -795,7 +793,7 @@ cpu_reset_x:
                else
                        print_debug("Use Ram as Stack now - \r\n");
 
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
                printk(BIOS_DEBUG, "new_cpu_reset = %08x\r\n", new_cpu_reset);
 #else
                print_debug("new_cpu_reset = ");
index 5f3ebc3210e9e8274b1f7a7f18597693713a61d1..9819048a25320c21f3188399e4d2c5c4b5d868c1 100644 (file)
@@ -27,7 +27,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/cn400/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 1b5e9e21b863e05d7f0496dad48675dbd887e484..301556ddaf34dec4baf03e05f144ee742eda859c 100644 (file)
@@ -6,7 +6,7 @@
 #include <arch/hlt.h>
 #include <stdlib.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/vt8601/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 9bfaefffc4dc5856cd9cd9025363bb41144f39fe..71ad25908a560c1310eeffa62dee6a05a66d0dcf 100644 (file)
@@ -28,7 +28,7 @@
 #include "option_table.h"
 #include "pc80/mc146818rtc_early.c"
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/cn700/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 168e496f22a501a9627a05b0f595c5bdcacd59ed..719a3581e6227ba182693b6f97efa742e5d142c1 100644 (file)
@@ -27,7 +27,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/cx700/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
index fecbe486d165a1c846277ad3bbdb12a2ab7ef173..5a8e94bde4998a6adce1625052e9071d50975169 100644 (file)
@@ -25,7 +25,7 @@
 #include <device/pnp_def.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
index bfe11032075f076e62438dee18391502b2c77b36..329c1afb8314a03266dd415e65c839278af4bb26 100644 (file)
@@ -124,7 +124,7 @@ static void hlt(void)
 {
        longjmp(end_buf, 2);
 }
-#include "../../../arch/i386/lib/console.c"
+#include "console/console.c"
 
 unsigned long log2(unsigned long x)
 {
index bb4ebbdfe37d1fa81a0ae55793598f5fdb91ec15..3965addcb2c2c6a8b41356680adf042132f6cbc3 100644 (file)
@@ -67,7 +67,7 @@ static void sdram_set_registers(const struct mem_controller *ctrl)
                device_t dev;
                unsigned where;
                unsigned long reg;
-               dev = (register_values[i] & ~0xff) - PCI_DEV(0, 0x00, 0) + ctrl->f0;
+               dev = (register_values[i] & ~0xff) - PCI_DEV(0, 0x00, 0) + PCI_DEV(0, 0x00, 0);
                where = register_values[i] & 0xff;
                reg = pci_read_config32(dev, where);
                reg &= register_values[i+1];
@@ -181,27 +181,27 @@ static long spd_set_ram_size(const struct mem_controller *ctrl, long dimm_mask)
                        sz.side1 -= 29;
                        cum += (1 << sz.side1);
                        /* DRB = 0x60 */
-                       pci_write_config8(ctrl->f0, DRB + (i*2), cum);
+                       pci_write_config8(PCI_DEV(0, 0x00, 0), DRB + (i*2), cum);
                        if( sz.side2 > 28) {
                                sz.side2 -= 29;
                                cum += (1 << sz.side2);
                        }
-                       pci_write_config8(ctrl->f0, DRB+1 + (i*2), cum);
+                       pci_write_config8(PCI_DEV(0, 0x00, 0), DRB+1 + (i*2), cum);
                }
                else {
-                       pci_write_config8(ctrl->f0, DRB + (i*2), cum);
-                       pci_write_config8(ctrl->f0, DRB+1 + (i*2), cum);
+                       pci_write_config8(PCI_DEV(0, 0x00, 0), DRB + (i*2), cum);
+                       pci_write_config8(PCI_DEV(0, 0x00, 0), DRB+1 + (i*2), cum);
                }
        }
        /* set TOM top of memory 0xcc */
-       pci_write_config16(ctrl->f0, TOM, cum);
+       pci_write_config16(PCI_DEV(0, 0x00, 0), TOM, cum);
        /* set TOLM top of low memory */
        if(cum > 0x18) {
                cum = 0x18;
        }
        cum <<= 11;
        /* 0xc4 TOLM */
-       pci_write_config16(ctrl->f0, TOLM, cum);
+       pci_write_config16(PCI_DEV(0, 0x00, 0), TOLM, cum);
        return 0;
 }
 
@@ -279,7 +279,7 @@ static int spd_set_row_attributes(const struct mem_controller *ctrl,
        }
 
        /* 0x70 DRA */
-       pci_write_config32(ctrl->f0, DRA, dra); 
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRA, dra);      
        goto out;
 
  val_err:
@@ -309,7 +309,7 @@ static int spd_set_drt_attributes(const struct mem_controller *ctrl,
        static const int latency_indicies[] = { 26, 23, 9 };
 
        /* 0x78 DRT */
-       drt = pci_read_config32(ctrl->f0, DRT);
+       drt = pci_read_config32(PCI_DEV(0, 0x00, 0), DRT);
        drt &= 3;  /* save bits 1:0 */
        
        for(first_dimm = 0; first_dimm < 4; first_dimm++) {
@@ -542,7 +542,7 @@ static int spd_set_drt_attributes(const struct mem_controller *ctrl,
        }
 
        /* 0x78 DRT */
-       pci_write_config32(ctrl->f0, DRT, drt);
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRT, drt);
 
        return(cas_latency);
 }
@@ -563,7 +563,7 @@ static int spd_set_dram_controller_mode(const struct mem_controller *ctrl,
        static const unsigned char fsb_conversion[4] = {3,1,3,2};
 
        /* 0x7c DRC */
-       drc = pci_read_config32(ctrl->f0, DRC); 
+       drc = pci_read_config32(PCI_DEV(0, 0x00, 0), DRC);      
        for(cnt=0; cnt < 4; cnt++) {
                if (!(dimm_mask & (1 << cnt))) {
                        continue;
@@ -727,12 +727,12 @@ static void set_on_dimm_termination_enable(const struct mem_controller *ctrl)
  
        /* Set up northbridge values */
        /* ODT enable */
-       pci_write_config32(ctrl->f0, 0x88, 0xf0000180);
+       pci_write_config32(PCI_DEV(0, 0x00, 0), 0x88, 0xf0000180);
        /* Figure out which slots are Empty, Single, or Double sided */
        for(i=0,t4=0,c2=0;i<8;i+=2) {
-               c1 = pci_read_config8(ctrl->f0, DRB+i);
+               c1 = pci_read_config8(PCI_DEV(0, 0x00, 0), DRB+i);
                if(c1 == c2) continue;
-               c2 = pci_read_config8(ctrl->f0, DRB+1+i);
+               c2 = pci_read_config8(PCI_DEV(0, 0x00, 0), DRB+1+i);
                if(c1 == c2)
                        t4 |= (1 << (i*4));
                else
@@ -778,7 +778,7 @@ static void set_on_dimm_termination_enable(const struct mem_controller *ctrl)
        print_debug_hex32(data32);
        print_debug("\r\n");
 
-       pci_write_config32(ctrl->f0, 0xb0, data32);
+       pci_write_config32(PCI_DEV(0, 0x00, 0), 0xb0, data32);
 
        for(dimm=0;dimm<8;dimm+=1) {
 
@@ -1079,10 +1079,10 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
 
        /* 0x80 */
 #ifdef DIMM_MAP_LOGICAL
-       pci_write_config32(ctrl->f0, DRM,
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRM,
                0x00210000 | DIMM_MAP_LOGICAL);
 #else
-       pci_write_config32(ctrl->f0, DRM, 0x00211248);
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRM, 0x00211248);
 #endif
        /* set dram type and Front Side Bus freq. */
        drc = spd_set_dram_controller_mode(ctrl, mask);
@@ -1097,20 +1097,20 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
        /* drc bits 1:0 = DIMM speed, bits 3:2 = FSB speed */
        for(iptr = gearing[(drc&3)+((((drc>>2)&3)-1)*3)].clkgr,cnt=0;
                        cnt<4;cnt++) {
-               pci_write_config32(ctrl->f0, 0xa0+(cnt*4), iptr[cnt]);
+               pci_write_config32(PCI_DEV(0, 0x00, 0), 0xa0+(cnt*4), iptr[cnt]);
        }
        /* 0x7c DRC */
-       pci_write_config32(ctrl->f0, DRC, data32);
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRC, data32);
        
                /* turn the clocks on */
        /* 0x8c CKDIS */
-       pci_write_config16(ctrl->f0, CKDIS, 0x0000);
+       pci_write_config16(PCI_DEV(0, 0x00, 0), CKDIS, 0x0000);
        
                /* 0x9a DDRCSR Take subsystem out of idle */
-       data16 = pci_read_config16(ctrl->f0, DDRCSR);
+       data16 = pci_read_config16(PCI_DEV(0, 0x00, 0), DDRCSR);
        data16 &= ~(7 << 12);
        data16 |= (3 << 12);   /* use dual channel lock step */
-       pci_write_config16(ctrl->f0, DDRCSR, data16);
+       pci_write_config16(PCI_DEV(0, 0x00, 0), DDRCSR, data16);
        
                /* program row size DRB */
        spd_set_ram_size(ctrl, mask);
@@ -1287,23 +1287,23 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
                set_on_dimm_termination_enable(ctrl);
        }
        else { /* ddr */
-                pci_write_config32(ctrl->f0, 0x88, 0xa0000000 );
+                pci_write_config32(PCI_DEV(0, 0x00, 0), 0x88, 0xa0000000 );
         }
 
        /* receive enable calibration */
        set_receive_enable(ctrl);
        
        /* DQS */
-       pci_write_config32(ctrl->f0, 0x94, 0x3904a100 ); 
+       pci_write_config32(PCI_DEV(0, 0x00, 0), 0x94, 0x3904a100 ); 
        for(i = 0, cnt = (BAR+0x200); i < 24; i++, cnt+=4) {
                write32(cnt, dqs_data[i]);
        }
-       pci_write_config32(ctrl->f0, 0x94, 0x3904a100 );
+       pci_write_config32(PCI_DEV(0, 0x00, 0), 0x94, 0x3904a100 );
 
        /* Enable refresh */
        /* 0x7c DRC */
        data32 = drc & ~(3 << 20);  /* clear ECC mode */
-       pci_write_config32(ctrl->f0, DRC, data32);      
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRC, data32);   
        write32(BAR+DCALCSR, 0x0008000f);
 
        /* clear memory and init ECC */
@@ -1320,13 +1320,13 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
        }
 
        /* Bring memory subsystem on line */
-       data32 = pci_read_config32(ctrl->f0, 0x98);
+       data32 = pci_read_config32(PCI_DEV(0, 0x00, 0), 0x98);
        data32 |= (1 << 31);
-       pci_write_config32(ctrl->f0, 0x98, data32);
+       pci_write_config32(PCI_DEV(0, 0x00, 0), 0x98, data32);
        /* wait for completion */
        print_debug("Waiting for mem complete\r\n");
        while(1) {
-               data32 = pci_read_config32(ctrl->f0, 0x98);
+               data32 = pci_read_config32(PCI_DEV(0, 0x00, 0), 0x98);
                if( (data32 & (1<<31)) == 0)
                        break;
        }
@@ -1336,17 +1336,17 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
        /* 0x7c DRC */
        drc |= (1 << 29);
        data32 = drc & ~(3 << 20);  /* clear ECC mode */
-       pci_write_config32(ctrl->f0, DRC, data32);      
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRC, data32);   
 
        /* Set the ecc mode */
-       pci_write_config32(ctrl->f0, DRC, drc); 
+       pci_write_config32(PCI_DEV(0, 0x00, 0), DRC, drc);      
 
        /* Enable memory scrubbing */
        /* 0x52 MCHSCRB */      
-       data16 = pci_read_config16(ctrl->f0, MCHSCRB);
+       data16 = pci_read_config16(PCI_DEV(0, 0x00, 0), MCHSCRB);
        data16 &= ~0x0f;
        data16 |= ((2 << 2) | (2 << 0));
-       pci_write_config16(ctrl->f0, MCHSCRB, data16);  
+       pci_write_config16(PCI_DEV(0, 0x00, 0), MCHSCRB, data16);       
 
        /* The memory is now setup, use it */
        cache_lbmem(MTRR_TYPE_WRBACK);
index 183ace838560f4300b3a5357da689529088b0db9..9fcc3801bba557607dce7774aaef85f2fc254af4 100644 (file)
@@ -4,9 +4,9 @@
 #define DIMM_SOCKETS 4
 struct mem_controller {
        unsigned node_id;
-       device_t f0, f1, f2, f3;
-       uint16_t channel0[DIMM_SOCKETS];
-       uint16_t channel1[DIMM_SOCKETS];
+       // device_t f0, f1, f2, f3;
+       u16 channel0[DIMM_SOCKETS];
+       u16 channel1[DIMM_SOCKETS];
 };
 
 #endif /* RAMINIT_H */
index c7efb517914f714c80aba1df7919bc6cd58cd0d2..80ee22c22a86900c9133cdcc0145785aec1b5867 100644 (file)
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include "pc80/serial.c"
-#include "arch/i386/lib/console.c"
+#include "console/console.c"
 #include "lib/ramtest.c"
 #include "northbridge/via/vx800/vx800.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
 #include "cpu/x86/bist.h"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
-#if CONFIG_USE_INIT == 0
 #include "lib/memcpy.c"
-#endif
 #include "cpu/x86/lapic/boot_cpu.c"
 
 #include "driving_clk_phase_data.c"
@@ -573,7 +571,7 @@ So, I use: #include "cpu/via/car/cache_as_ram_post.c". my via-version post.c hav
                unsigned v_esp;
                __asm__ volatile ("movl   %%esp, %0\n\t":"=a" (v_esp)
                    );
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
                printk(BIOS_DEBUG, "v_esp=%08x\r\n", v_esp);
 #else
                print_debug("v_esp=");
@@ -589,7 +587,7 @@ So, I use: #include "cpu/via/car/cache_as_ram_post.c". my via-version post.c hav
 // it seems that cpu_reset is not used before this, so I just reset it, (this is because the s3 resume, setting in mtrr and copy data may destroy 
 //stack
        cpu_reset = 0;
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
        printk(BIOS_DEBUG, "cpu_reset = %08x\r\n", cpu_reset);
 #else
        print_debug("cpu_reset = ");
@@ -641,7 +639,7 @@ So, I use: #include "cpu/via/car/cache_as_ram_post.c". my via-version post.c hav
                } else {
                        print_debug("Use Ram as Stack now - \r\n");
                }
-#if CONFIG_USE_INIT
+#if CONFIG_USE_PRINTK_IN_CAR
                printk(BIOS_DEBUG, "new_cpu_reset = %08x\r\n", new_cpu_reset);
 #else
                print_debug("new_cpu_reset = ");