diff --git a/src/northsouthbridge/sis/540/Config b/src/northsouthbridge/sis/540/Config index 9f61db9f87..d5b30c51bd 100644 --- a/src/northsouthbridge/sis/540/Config +++ b/src/northsouthbridge/sis/540/Config @@ -1,7 +1,5 @@ option SIS540 -option USE_DOC_MIL option SMA_SIZE=0x90 -docipl northsouthbridge/sis/540/ipl.S raminit northsouthbridge/sis/540/raminit.inc object southbridge.o diff --git a/src/northsouthbridge/sis/540/ipl.S b/src/northsouthbridge/sis/540/ipl.S index a06a60602d..5c6d27b151 100644 --- a/src/northsouthbridge/sis/540/ipl.S +++ b/src/northsouthbridge/sis/540/ipl.S @@ -223,7 +223,7 @@ sis630ipl_start: xorw %dx, %dx # clear %dx, start of RAM movw $0x800, %si # point %si to CDSN Data area movw $0x1000, %di # point %di to CDSN Control area - movw $DOC_SPL_START_BLK, %bp # start page of LinuxBIOS + movw $DOC_SPL_START_PAGE, %bp # start page of LinuxBIOS movb $0x84, %al # Reset DOC Millennium call doc_reset @@ -276,7 +276,8 @@ doc_delay: movw %di, %dx # save current destination incw %bp # increse current page number - cmpw $128, %bp # moved 63 KB ?? + cmpw $(DOC_SPL_START_PAGE + DOC_SPL_SIZE_IN_PAGE), %bp + # moved enough data ?? jl read_next_page # no, read next page sis630ipl_end: diff --git a/src/northsouthbridge/sis/540/ipl.h b/src/northsouthbridge/sis/540/ipl.h index 8b364da493..f676e85974 100644 --- a/src/northsouthbridge/sis/540/ipl.h +++ b/src/northsouthbridge/sis/540/ipl.h @@ -10,8 +10,13 @@ #define DOC_STACK_SEG 0x0400 #define SPL_RAM_SEG 0x8000 -#define DOC_SPL_START_BLK 2 /* 0,1 for IPL */ -#define DOC_SPL_SIZE_IN_PAGE 126 /* 1 page = 512 bytes, total 63kB */ +#if defined(USE_DOC_2000_TSOP) +#define DOC_SPL_START_PAGE 4 /* 0-3 for IPL (each of 1KB size) */ +#else /* defined (USE_DOC_MIL) */ +#define DOC_SPL_START_PAGE 2 /* 0,1 for IPL (each of 512B size) */ +#endif + +#define DOC_SPL_SIZE_IN_PAGE 128 - DOC_SPL_START_PAGE /* 1 page = 512 bytes, total 63kB */ #define RET_LABEL(label) \ jmp label##_done diff --git a/src/northsouthbridge/sis/540/southbridge.c b/src/northsouthbridge/sis/540/southbridge.c index cf356d5a82..7165d80f42 100644 --- a/src/northsouthbridge/sis/540/southbridge.c +++ b/src/northsouthbridge/sis/540/southbridge.c @@ -51,7 +51,7 @@ void nvram_on() } printk_debug("Now try to turn off shadow\n"); -#ifdef USE_DOC_MIL +#if !defined(STD_FLASH) /* turn off nvram shadow in 0xc0000 ~ 0xfffff, i.e. accessing segment C - F is actually to the DRAM not NVRAM. For 512KB NVRAM case, this one should be disabled */ diff --git a/src/northsouthbridge/sis/550/Config b/src/northsouthbridge/sis/550/Config index c710e026fa..0d4c74f7e5 100644 --- a/src/northsouthbridge/sis/550/Config +++ b/src/northsouthbridge/sis/550/Config @@ -1,7 +1,5 @@ option SIS550 -option USE_DOC_MIL option SMA_SIZE=0xA0 -docipl northsouthbridge/sis/550/ipl.S raminit northsouthbridge/sis/550/raminit.inc object southbridge.o diff --git a/src/northsouthbridge/sis/550/ipl.S b/src/northsouthbridge/sis/550/ipl.S index dc6049741e..1228af61be 100644 --- a/src/northsouthbridge/sis/550/ipl.S +++ b/src/northsouthbridge/sis/550/ipl.S @@ -223,7 +223,7 @@ sis630ipl_start: xorw %dx, %dx # clear %dx, start of RAM movw $0x800, %si # point %si to CDSN Data area movw $0x1000, %di # point %di to CDSN Control area - movw $DOC_SPL_START_BLK, %bp # start page of LinuxBIOS + movw $DOC_SPL_START_PAGE, %bp # start page of LinuxBIOS movb $0x84, %al # Reset DOC Millennium call doc_reset @@ -289,7 +289,8 @@ doc_delay: movw %di, %dx # save current destination incw %bp # increse current page number - cmpw $128, %bp # moved 63 KB ?? + cmpw $(DOC_SPL_START_PAGE + DOC_SPL_SIZE_IN_PAGE), %bp + # moved enough data ?? jl read_next_page # no, read next page sis630ipl_end: diff --git a/src/northsouthbridge/sis/550/ipl.h b/src/northsouthbridge/sis/550/ipl.h index 17c36a6d14..76f747361c 100644 --- a/src/northsouthbridge/sis/550/ipl.h +++ b/src/northsouthbridge/sis/550/ipl.h @@ -10,13 +10,13 @@ #define DOC_STACK_SEG 0x0400 #define SPL_RAM_SEG 0x8000 -#ifdef USE_DOC_MIL_PLUS -#define DOC_SPL_START_BLK 4 /* 0-3 for IPL (each of 1KB size) */ -#else -#define DOC_SPL_START_BLK 2 /* 0,1 for IPL (each of 512B size) */ +#if defined(USE_DOC_2000_TSOP) +#define DOC_SPL_START_PAGE 4 /* 0-3 for IPL (each of 1KB size) */ +#else /* defined (USE_DOC_MIL) */ +#define DOC_SPL_START_PAGE 2 /* 0,1 for IPL (each of 512B size) */ #endif -#define DOC_SPL_SIZE_IN_PAGE 126 /* 1 page = 512 bytes, total 63kB */ +#define DOC_SPL_SIZE_IN_PAGE 128 - DOC_SPL_START_PAGE /* 1 page = 512 bytes, total 63kB */ #define RET_LABEL(label) \ jmp label##_done diff --git a/src/northsouthbridge/sis/550/raminit.inc b/src/northsouthbridge/sis/550/raminit.inc index 3c14ae8ad8..eee73748df 100644 --- a/src/northsouthbridge/sis/550/raminit.inc +++ b/src/northsouthbridge/sis/550/raminit.inc @@ -34,9 +34,6 @@ #define NORTH_BRIDGE_BASE_ADDR 0x80000000 - /* set new stack */ - movl $_estack, %esp - register_setting_start: movl $northbridge_init_table, %esi movl $(northbridge_init_table_end - northbridge_init_table), %ecx @@ -45,10 +42,6 @@ register_setting_start: init_northbridge: lodsw (%esi), %ax # load the register address/value to %ax xchgb %al, %ah # exchange address/values for write_common - call write_northbridge_register - loopnz init_northbridge - - jmp register_setting_end write_northbridge_register: /* Input: AH - register number. AL - register value. */ @@ -68,8 +61,11 @@ write_common: addb %al, %dl movb %bl, %al outb %al, %dx - ret # End of write_[lpc|pci]_reg + + loopnz init_northbridge + + jmp register_setting_end #include "550_regs.inc" -register_setting_end: \ No newline at end of file +register_setting_end: diff --git a/src/northsouthbridge/sis/550/southbridge.c b/src/northsouthbridge/sis/550/southbridge.c index 37a537f738..ffe6bce94b 100644 --- a/src/northsouthbridge/sis/550/southbridge.c +++ b/src/northsouthbridge/sis/550/southbridge.c @@ -52,7 +52,7 @@ void nvram_on() } printk_debug("Now try to turn off shadow\n"); -#ifdef USE_DOC_MIL +#if !defined(STD_FLASH) /* turn off nvram shadow in 0xc0000 ~ 0xfffff, i.e. accessing segment C - F is actually to the DRAM not NVRAM. For 512KB NVRAM case, this one should be disabled */ diff --git a/src/northsouthbridge/sis/630/Config b/src/northsouthbridge/sis/630/Config index e0f958d8db..3b0365f040 100644 --- a/src/northsouthbridge/sis/630/Config +++ b/src/northsouthbridge/sis/630/Config @@ -1,7 +1,5 @@ option SIS630 -# option USE_DOC_MIL option SMA_SIZE=0xA0 -docipl northsouthbridge/sis/630/ipl.S raminit northsouthbridge/sis/630/raminit.inc object southbridge.o diff --git a/src/northsouthbridge/sis/630/ipl.S b/src/northsouthbridge/sis/630/ipl.S index abc8a2a71c..2fa997000f 100644 --- a/src/northsouthbridge/sis/630/ipl.S +++ b/src/northsouthbridge/sis/630/ipl.S @@ -240,7 +240,7 @@ sis630ipl_start: xorw %dx, %dx # clear %dx, start of RAM movw $0x800, %si # point %si to CDSN Data area movw $0x1000, %di # point %di to CDSN Control area - movw $DOC_SPL_START_BLK, %bp # start page of LinuxBIOS + movw $DOC_SPL_START_PAGE, %bp # start page of LinuxBIOS movb $0x84, %al # Reset DOC Millennium call doc_reset @@ -293,7 +293,8 @@ doc_delay: movw %di, %dx # save current destination incw %bp # increse current page number - cmpw $128, %bp # moved 63 KB ?? + cmpw $(DOC_SPL_START_PAGE + DOC_SPL_SIZE_IN_PAGE), %bp + # moved enough data ?? jl read_next_page # no, read next page #endif /* STD_FLASH */ diff --git a/src/northsouthbridge/sis/630/ipl.h b/src/northsouthbridge/sis/630/ipl.h index 451cf4ab59..f676e85974 100644 --- a/src/northsouthbridge/sis/630/ipl.h +++ b/src/northsouthbridge/sis/630/ipl.h @@ -10,13 +10,13 @@ #define DOC_STACK_SEG 0x0400 #define SPL_RAM_SEG 0x8000 -#ifdef USE_DOC_MIL_PLUS -#define DOC_SPL_START_BLK 4 /* 0-3 for IPL (each of 1KB size) */ -#else -#define DOC_SPL_START_BLK 2 /* 0,1 for IPL (each of 512B size) */ +#if defined(USE_DOC_2000_TSOP) +#define DOC_SPL_START_PAGE 4 /* 0-3 for IPL (each of 1KB size) */ +#else /* defined (USE_DOC_MIL) */ +#define DOC_SPL_START_PAGE 2 /* 0,1 for IPL (each of 512B size) */ #endif -#define DOC_SPL_SIZE_IN_PAGE 126 /* 1 page = 512 bytes, total 63kB */ +#define DOC_SPL_SIZE_IN_PAGE 128 - DOC_SPL_START_PAGE /* 1 page = 512 bytes, total 63kB */ #define RET_LABEL(label) \ jmp label##_done diff --git a/src/northsouthbridge/sis/630/southbridge.c b/src/northsouthbridge/sis/630/southbridge.c index 9497665f3b..e3ec568d28 100644 --- a/src/northsouthbridge/sis/630/southbridge.c +++ b/src/northsouthbridge/sis/630/southbridge.c @@ -163,7 +163,7 @@ void nvram_on() } printk_debug("Now try to turn off shadow\n"); -#ifdef USE_DOC_MIL +#if !defined(STD_FLASH) /* turn off nvram shadow in 0xc0000 ~ 0xfffff, i.e. accessing segment C - F is actually to the DRAM not NVRAM. For 512KB NVRAM case, this one should be disabled */ diff --git a/src/northsouthbridge/sis/730/Config b/src/northsouthbridge/sis/730/Config index 1cd74c8350..2a912763a7 100644 --- a/src/northsouthbridge/sis/730/Config +++ b/src/northsouthbridge/sis/730/Config @@ -1,7 +1,5 @@ option SIS730 -# option USE_DOC_MIL option SMA_SIZE=0xA0 -docipl northsouthbridge/sis/730/ipl.S raminit northsouthbridge/sis/730/raminit.inc object southbridge.o diff --git a/src/northsouthbridge/sis/730/ipl.S b/src/northsouthbridge/sis/730/ipl.S index f81fdc3537..1f9e38f11b 100644 --- a/src/northsouthbridge/sis/730/ipl.S +++ b/src/northsouthbridge/sis/730/ipl.S @@ -240,7 +240,7 @@ sis730ipl_start: xorw %dx, %dx # clear %dx, start of RAM movw $0x800, %si # point %si to CDSN Data area movw $0x1000, %di # point %di to CDSN Control area - movw $DOC_SPL_START_BLK, %bp # start page of LinuxBIOS + movw $DOC_SPL_START_PAGE, %bp # start page of LinuxBIOS movb $0x84, %al # Reset DOC Millennium call doc_reset @@ -293,7 +293,8 @@ doc_delay: movw %di, %dx # save current destination incw %bp # increse current page number - cmpw $128, %bp # moved 63 KB ?? + cmpw $(DOC_SPL_START_PAGE + DOC_SPL_SIZE_IN_PAGE), %bp + # moved enough data ?? jl read_next_page # no, read next page #endif /* STD_FLASH */ diff --git a/src/northsouthbridge/sis/730/ipl.h b/src/northsouthbridge/sis/730/ipl.h index 8b364da493..f676e85974 100644 --- a/src/northsouthbridge/sis/730/ipl.h +++ b/src/northsouthbridge/sis/730/ipl.h @@ -10,8 +10,13 @@ #define DOC_STACK_SEG 0x0400 #define SPL_RAM_SEG 0x8000 -#define DOC_SPL_START_BLK 2 /* 0,1 for IPL */ -#define DOC_SPL_SIZE_IN_PAGE 126 /* 1 page = 512 bytes, total 63kB */ +#if defined(USE_DOC_2000_TSOP) +#define DOC_SPL_START_PAGE 4 /* 0-3 for IPL (each of 1KB size) */ +#else /* defined (USE_DOC_MIL) */ +#define DOC_SPL_START_PAGE 2 /* 0,1 for IPL (each of 512B size) */ +#endif + +#define DOC_SPL_SIZE_IN_PAGE 128 - DOC_SPL_START_PAGE /* 1 page = 512 bytes, total 63kB */ #define RET_LABEL(label) \ jmp label##_done diff --git a/src/northsouthbridge/sis/730/southbridge.c b/src/northsouthbridge/sis/730/southbridge.c index 1c17e29a3f..8ad6d6cc13 100644 --- a/src/northsouthbridge/sis/730/southbridge.c +++ b/src/northsouthbridge/sis/730/southbridge.c @@ -52,7 +52,7 @@ void nvram_on() } printk_debug("Now try to turn off shadow\n"); -#ifdef USE_DOC_MIL +#if !defined(STD_FLASH) /* turn off nvram shadow in 0xc0000 ~ 0xfffff, i.e. accessing segment C - F is actually to the DRAM not NVRAM. For 512KB NVRAM case, this one should be disabled */ diff --git a/src/rom/Config b/src/rom/Config index 5f080e3558..088be8447f 100644 --- a/src/rom/Config +++ b/src/rom/Config @@ -1,6 +1,7 @@ object fill_inbuf.o object rom_fill_inbuf.o object docmil_fill_inbuf.o +#object docplus_fill_inbuf.o object tsunami_tigbus_rom_fill_inbuf.o object serial_fill_inbuf.o object tftp_fill_inbuf.o diff --git a/src/rom/docmil_fill_inbuf.c b/src/rom/docmil_fill_inbuf.c index b7856c8370..c3bb75a6c2 100644 --- a/src/rom/docmil_fill_inbuf.c +++ b/src/rom/docmil_fill_inbuf.c @@ -1,4 +1,4 @@ -#if defined(USE_DOC_MIL) || defined(USE_DOC_MIL_PLUS) +#if defined(USE_DOC_MIL) || defined(USE_DOC_2000_TSOP) #include #include diff --git a/util/config/pcchips.config b/util/config/pcchips.config index 56aece70d4..a516ea690e 100644 --- a/util/config/pcchips.config +++ b/util/config/pcchips.config @@ -8,9 +8,9 @@ mainboard pcchips/m810lmr # Enable Serial Console for debugging option SERIAL_CONSOLE=1 -# Enable MicroCode update and L2 Cache init for PII and PIII -#option UPDATE_MICROCODE -#option CONFIGURE_L2_CACHE +# use DOC MIL +option USE_DOC_MIL +docipl northsouthbridge/sis/730/ipl.S # Use the internal VGA frame buffer device option HAVE_FRAMEBUFFER @@ -20,8 +20,5 @@ linux /usr/src/linux # Kernel command line parameters commandline root=/dev/hda1 console=ttyS0,115200 console=tty0 single -# use DOC MIL -option USE_DOC_MIL -docipl northsouthbridge/sis/730/ipl.S diff --git a/util/config/sis540.config b/util/config/sis540.config index 8fbd3518dc..a99fe3a076 100644 --- a/util/config/sis540.config +++ b/util/config/sis540.config @@ -5,6 +5,13 @@ target sis540 # SiS 550 SoC demo mainboard mainboard sis/540 +#Enable Serial Console for debugging +option SERIAL_CONSOLE=1 + +# use DOC MIL +option USE_DOC_MIL +docipl northsouthbridge/sis/540/ipl.S + # Use the internal VGA frame buffer device option HAVE_FRAMEBUFFER diff --git a/util/config/sis550.config b/util/config/sis550.config index 1277670545..2d8759d760 100644 --- a/util/config/sis550.config +++ b/util/config/sis550.config @@ -5,6 +5,10 @@ target sis550 # SiS 550 SoC demo mainboard mainboard sis/550 +# use DOC MIL +option USE_DOC_MIL +docipl northsouthbridge/sis/550/ipl.S + # Use the internal VGA frame buffer device option HAVE_FRAMEBUFFER diff --git a/util/config/winfast.config b/util/config/winfast.config index 5fecc25476..bb4604f8be 100644 --- a/util/config/winfast.config +++ b/util/config/winfast.config @@ -6,7 +6,7 @@ target winfast mainboard leadtek/winfast6300 # Enable Serial Console for debugging -option SERIAL_CONSOLE=1 +#option SERIAL_CONSOLE=1 # use DOC MIL option USE_DOC_MIL