svn | 1 Nov 01:53
Favicon

r976 - in coreboot-v3: arch/x86 arch/x86/via mainboard/via/epia-cn

Author: rminnich
Date: 2008-11-01 01:53:01 +0100 (Sat, 01 Nov 2008)
New Revision: 976

Modified:
   coreboot-v3/arch/x86/stage1_mtrr.c
   coreboot-v3/arch/x86/via/stage1.c
   coreboot-v3/mainboard/via/epia-cn/Makefile
   coreboot-v3/mainboard/via/epia-cn/stage1.c
Log:
Get via to use standard mtrr init functions. Start to document them.

Signed-off-by: Ronald G. Minnich <rminnich <at> gmail.com>
Acked-by: Ronald G. Minnich <rminnich <at> gmail.com>

Modified: coreboot-v3/arch/x86/stage1_mtrr.c
===================================================================
--- coreboot-v3/arch/x86/stage1_mtrr.c	2008-10-31 22:43:02 UTC (rev 975)
+++ coreboot-v3/arch/x86/stage1_mtrr.c	2008-11-01 00:53:01 UTC (rev 976)
@@ -106,6 +106,10 @@
 	
 }

+/**
+ * Call this function early in stage1 to enable mtrrs, which will ensure 
+ * caching of ROM 
+ */
 void early_mtrr_init(void)
 {
 	static const unsigned long mtrr_msrs[] = {
(Continue reading)

Picon
Gravatar

Re: via epia-cn and v3

On 31.10.2008 23:40, ron minnich wrote:
> coreboot-3.0.974 Fri Oct 31 15:11:04 PDT 2008 starting... (console_loglevel=8)
> [...]
> Done RAM init code
> In hardware_stage1()
>
> resets at this point and restarts. Very slow, as though it were not caching ROM?
>   

Yes, ROM may not be cached. My primary goal was to get this to work at all.

And the reset issue is currently my highest priority problem to resolve.
I believe I may have to disappoint you and change the memcpy to an
open-coded copy in asm.

Regards,
Carl-Daniel

--

-- 
http://www.hailfinger.org/

--
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

ron minnich | 1 Nov 02:19
Picon

Re: via epia-cn and v3

On Fri, Oct 31, 2008 at 6:13 PM, Carl-Daniel Hailfinger
<c-d.hailfinger.devel.2006 <at> gmx.net> wrote:

> Yes, ROM may not be cached. My primary goal was to get this to work at all.

ROM should now be cached.

>
> And the reset issue is currently my highest priority problem to resolve.
> I believe I may have to disappoint you and change the memcpy to an
> open-coded copy in asm.

it happens. There are times when gcc is the wrong way to go :-)

ron

--
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Picon
Gravatar

Re: [PATCH] CN700/VT8237R stage2

On 31.10.2008 01:36, Corey Osgood wrote:
> debug log attached.
>   

Thanks, the log was really informative. Can you apply the following
patch and report back? Yes, the patch is evil, but it may help track
down the issue.

Regards,
Carl-Daniel

Index: arch/x86/via/stage1.c
===================================================================
--- arch/x86/via/stage1.c	(Revision 976)
+++ arch/x86/via/stage1.c	(Arbeitskopie)
@@ -29,12 +29,14 @@
 #include <string.h>
 #include <mtrr.h>
 #include <via_c7.h>
+#include <uart8250.h>

 /**
  * Disable Cache As RAM (CAR) after memory is setup.
  */
 void disable_car(void)
 {
+	printk(BIOS_DEBUG, "disable_car entry\n");
 	/* Determine new global variable location. Stack organization from top
 	 * Top 4 bytes are reserved
 	 * Pointer to global variables
(Continue reading)

Picon
Gravatar

Re: [PATCH] CN700/VT8237R stage2

On 01.11.2008 02:50, Carl-Daniel Hailfinger wrote:
> On 31.10.2008 01:36, Corey Osgood wrote:
>   
>> debug log attached.
>>   
>>     
>
> Thanks, the log was really informative. Can you apply the following
> patch and report back? Yes, the patch is evil, but it may help track
> down the issue.
>   

And the patch had minor garbage in it. New patch follows:

Index: arch/x86/via/stage1.c
===================================================================
--- arch/x86/via/stage1.c	(Revision 976)
+++ arch/x86/via/stage1.c	(Arbeitskopie)
@@ -29,12 +29,14 @@
 #include <string.h>
 #include <mtrr.h>
 #include <via_c7.h>
+#include <uart8250.h>

 /**
  * Disable Cache As RAM (CAR) after memory is setup.
  */
 void disable_car(void)
 {
+	printk(BIOS_DEBUG, "disable_car entry\n");
(Continue reading)

svn | 1 Nov 05:33
Favicon

r977 - coreboot-v3/mainboard/jetway

Author: cozzie
Date: 2008-11-01 05:33:36 +0100 (Sat, 01 Nov 2008)
New Revision: 977

Modified:
   coreboot-v3/mainboard/jetway/Kconfig
Log:
Minor patch to fix a Kconfig warning (trivial)

Signed-off-by: Corey Osgood <corey.osgood <at> gmail.com>
Acked-by: Corey Osgood <corey.osgood <at> gmail.com>

Modified: coreboot-v3/mainboard/jetway/Kconfig
===================================================================
--- coreboot-v3/mainboard/jetway/Kconfig	2008-11-01 00:53:01 UTC (rev 976)
+++ coreboot-v3/mainboard/jetway/Kconfig	2008-11-01 04:33:36 UTC (rev 977)
@@ -66,8 +66,8 @@
 	bool "256 MB"
 	help
 	  Choose this option to use 256MB of system memory for onboard video.
+endchoice

-
 config CN700_VIDEO_MB
 	int
 	default 0 if CN700_VIDEO_MB_NONE
@@ -78,7 +78,6 @@
 	help
 	  Map the config names to an integer.

(Continue reading)

Corey Osgood | 1 Nov 06:06
Picon

Re: [PATCH] CN700/VT8237R stage2

Debug log attached, I'm using COM2 so I modified the patch to use $760 instead of $1016, I hope that's right. I'm honestly not sure if the output is what you were expecting or not, I don't think it is though. One thing I noticed in the build log, with or without the patch, dunno if it matters or not:

/home/corey/coreboot/coreboot-v3/arch/x86/via/stage1.c: In function 'disable_car':
/home/corey/coreboot/coreboot-v3/arch/x86/via/stage1.c:49: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type

Thanks,
Corey

On Fri, Oct 31, 2008 at 9:59 PM, Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net> wrote:
On 01.11.2008 02:50, Carl-Daniel Hailfinger wrote:
> On 31.10.2008 01:36, Corey Osgood wrote:
>
>> debug log attached.
>>
>>
>
> Thanks, the log was really informative. Can you apply the following
> patch and report back? Yes, the patch is evil, but it may help track
> down the issue.
>

And the patch had minor garbage in it. New patch follows:

Index: arch/x86/via/stage1.c
===================================================================
--- arch/x86/via/stage1.c       (Revision 976)
+++ arch/x86/via/stage1.c       (Arbeitskopie)
<at> <at> -29,12 +29,14 <at> <at>
 #include <string.h>
 #include <mtrr.h>
 #include <via_c7.h>
+#include <uart8250.h>

 /**
 * Disable Cache As RAM (CAR) after memory is setup.
 */
 void disable_car(void)
 {
+       printk(BIOS_DEBUG, "disable_car entry\n");
       /* Determine new global variable location. Stack organization from top
        * Top 4 bytes are reserved
        * Pointer to global variables
<at> <at> -45,9 +47,19 <at> <at>
       const struct global_vars *newlocation = (struct global_vars *)((RAM_STACK_BASE - sizeof(struct global_vars *) - sizeof(struct global_vars)) & ~0x7);
       /* Copy global variables to new location. */
       memcpy(newlocation, global_vars(), sizeof(struct global_vars));
+       printk(BIOS_DEBUG, "disable_car global_vars copy done\n");
       /* Set the new global variable pointer. */
       *(struct global_vars **)(RAM_STACK_BASE - sizeof(struct global_vars *)) = newlocation;

+       printk(BIOS_DEBUG, "disable_car global_vars pointer adjusted, entering asm code...");
+       printk(BIOS_DEBUG, "now..........................................................................\n");
+       uart8250_tx_byte(TTYSx_BASE, 'F');
+       uart8250_tx_byte(TTYSx_BASE, 'O');
+       uart8250_tx_byte(TTYSx_BASE, 'O');
+       uart8250_tx_byte(TTYSx_BASE, 'B');
+       uart8250_tx_byte(TTYSx_BASE, 'A');
+       uart8250_tx_byte(TTYSx_BASE, 'R');
+       uart8250_tx_byte(TTYSx_BASE, '\n');
       __asm__ __volatile__(
       /* We don't need cache as ram for now on */
       /* disable cache */
<at> <at> -55,6 +67,52 <at> <at>
       "       orl    $(0x1<<30),%%eax         \n"
       "       movl    %%eax, %%cr0            \n"

+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $104, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       /* disable fixed mtrr from now on, it will be enabled by coreboot_ram again*/
       "       movl    %[_SYSCFG_MSR], %%ecx   \n"
       "       rdmsr                           \n"
<at> <at> -64,6 +122,67 <at> <at>
       "       wrmsr                           \n"
 #warning Must clear MTRR 0x200 and 0x201

+       "       movl    $102, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $120, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $109, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $116, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       /* Set the default memory type and disable fixed and enable variable MTRRs */
       "       movl    %[_MTRRdefType_MSR], %%ecx      \n"
       "       xorl    %%edx, %%edx            \n"
<at> <at> -71,14 +190,202 <at> <at>
       "       movl    $0x00000800, %%eax      \n"
       "       wrmsr                           \n"

+       "       movl    $118, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $109, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $116, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       /* enable cache */
       "       movl    %%cr0, %%eax            \n"
       "       andl    $0x9fffffff,%%eax       \n"
       "       movl    %%eax, %%cr0            \n"

+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $104, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       "       wbinvd                          \n"

+       "       movl    $119, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $118, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $111, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       "       movl    %[newesp], %%esp        \n"
+
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $112, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $104, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $103, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       "       call stage1_phase3              \n"
       :: [newesp] "i" (newlocation),
        [_SYSCFG_MSR] "i" (SYSCFG_MSR),
Index: arch/x86/stage1.c
===================================================================
--- arch/x86/stage1.c   (Revision 976)
+++ arch/x86/stage1.c   (Arbeitskopie)
<at> <at> -263,6 +263,7 <at> <at>
 #ifdef CONFIG_CONSOLE_BUFFER
       /* Move the printk buffer to PRINTK_BUF_ADDR_RAM */
       printk_buffer_move((void *)PRINTK_BUF_ADDR_RAM, PRINTK_BUF_SIZE_RAM);
+       printk(BIOS_DEBUG, "Done printk() buffer move\n");
 #endif
       /* Turn off Cache-As-Ram */
       disable_car();


--
http://www.hailfinger.org/


Attachment (c7_car_debug2.log): application/octet-stream, 26 KiB
--
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot
Corey Osgood | 1 Nov 06:08
Picon

Re: [PATCH] CN700/VT8237R stage2

On Sat, Nov 1, 2008 at 1:06 AM, Corey Osgood <corey.osgood <at> gmail.com> wrote:

Debug log attached, I'm using COM2 so I modified the patch to use $760 instead of $1016, I hope that's right. I'm honestly not sure if the output is what you were expecting or not, I don't think it is though. One thing I noticed in the build log, with or without the patch, dunno if it matters or not:

/home/corey/coreboot/coreboot-v3/arch/x86/via/stage1.c: In function 'disable_car':
/home/corey/coreboot/coreboot-v3/arch/x86/via/stage1.c:49: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type

Thanks,
Corey

I should have also mentioned that I didn't trim anything, the serial console hangs at the end of the log file, but the post code keeps changing, so I'm assuming something is going on but nothing's going to the console.

-Corey
 


On Fri, Oct 31, 2008 at 9:59 PM, Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net> wrote:
On 01.11.2008 02:50, Carl-Daniel Hailfinger wrote:
> On 31.10.2008 01:36, Corey Osgood wrote:
>
>> debug log attached.
>>
>>
>
> Thanks, the log was really informative. Can you apply the following
> patch and report back? Yes, the patch is evil, but it may help track
> down the issue.
>

And the patch had minor garbage in it. New patch follows:

Index: arch/x86/via/stage1.c
===================================================================
--- arch/x86/via/stage1.c       (Revision 976)
+++ arch/x86/via/stage1.c       (Arbeitskopie)
<at> <at> -29,12 +29,14 <at> <at>
 #include <string.h>
 #include <mtrr.h>
 #include <via_c7.h>
+#include <uart8250.h>

 /**
 * Disable Cache As RAM (CAR) after memory is setup.
 */
 void disable_car(void)
 {
+       printk(BIOS_DEBUG, "disable_car entry\n");
       /* Determine new global variable location. Stack organization from top
        * Top 4 bytes are reserved
        * Pointer to global variables
<at> <at> -45,9 +47,19 <at> <at>
       const struct global_vars *newlocation = (struct global_vars *)((RAM_STACK_BASE - sizeof(struct global_vars *) - sizeof(struct global_vars)) & ~0x7);
       /* Copy global variables to new location. */
       memcpy(newlocation, global_vars(), sizeof(struct global_vars));
+       printk(BIOS_DEBUG, "disable_car global_vars copy done\n");
       /* Set the new global variable pointer. */
       *(struct global_vars **)(RAM_STACK_BASE - sizeof(struct global_vars *)) = newlocation;

+       printk(BIOS_DEBUG, "disable_car global_vars pointer adjusted, entering asm code...");
+       printk(BIOS_DEBUG, "now..........................................................................\n");
+       uart8250_tx_byte(TTYSx_BASE, 'F');
+       uart8250_tx_byte(TTYSx_BASE, 'O');
+       uart8250_tx_byte(TTYSx_BASE, 'O');
+       uart8250_tx_byte(TTYSx_BASE, 'B');
+       uart8250_tx_byte(TTYSx_BASE, 'A');
+       uart8250_tx_byte(TTYSx_BASE, 'R');
+       uart8250_tx_byte(TTYSx_BASE, '\n');
       __asm__ __volatile__(
       /* We don't need cache as ram for now on */
       /* disable cache */
<at> <at> -55,6 +67,52 <at> <at>
       "       orl    $(0x1<<30),%%eax         \n"
       "       movl    %%eax, %%cr0            \n"

+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $104, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       /* disable fixed mtrr from now on, it will be enabled by coreboot_ram again*/
       "       movl    %[_SYSCFG_MSR], %%ecx   \n"
       "       rdmsr                           \n"
<at> <at> -64,6 +122,67 <at> <at>
       "       wrmsr                           \n"
 #warning Must clear MTRR 0x200 and 0x201

+       "       movl    $102, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $120, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $109, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $116, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       /* Set the default memory type and disable fixed and enable variable MTRRs */
       "       movl    %[_MTRRdefType_MSR], %%ecx      \n"
       "       xorl    %%edx, %%edx            \n"
<at> <at> -71,14 +190,202 <at> <at>
       "       movl    $0x00000800, %%eax      \n"
       "       wrmsr                           \n"

+       "       movl    $118, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $109, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $116, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $114, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       /* enable cache */
       "       movl    %%cr0, %%eax            \n"
       "       andl    $0x9fffffff,%%eax       \n"
       "       movl    %%eax, %%cr0            \n"

+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $104, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $108, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       "       wbinvd                          \n"

+       "       movl    $119, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $98, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $105, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $118, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $111, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       "       movl    %[newesp], %%esp        \n"
+
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $115, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $112, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $32, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $99, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $104, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $97, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $110, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $103, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $101, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $100, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+       "       movl    $10, %%edx\n"
+       "       movl    $1016, %%eax\n"
+       "       call    uart8250_tx_byte\n"
+
       "       call stage1_phase3              \n"
       :: [newesp] "i" (newlocation),
        [_SYSCFG_MSR] "i" (SYSCFG_MSR),
Index: arch/x86/stage1.c
===================================================================
--- arch/x86/stage1.c   (Revision 976)
+++ arch/x86/stage1.c   (Arbeitskopie)
<at> <at> -263,6 +263,7 <at> <at>
 #ifdef CONFIG_CONSOLE_BUFFER
       /* Move the printk buffer to PRINTK_BUF_ADDR_RAM */
       printk_buffer_move((void *)PRINTK_BUF_ADDR_RAM, PRINTK_BUF_SIZE_RAM);
+       printk(BIOS_DEBUG, "Done printk() buffer move\n");
 #endif
       /* Turn off Cache-As-Ram */
       disable_car();


--
http://www.hailfinger.org/



--
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot
David Hendricks | 1 Nov 09:46
Picon

Coreboot Tech Talk @ Google, October 30 2008

Hey everyone,
Just thought I'd post a link to the tech talk Stefan, Peter and Ron gave at Google a couple days ago: http://www.youtube.com/watch?v=X72LgcMpM9k .

The format goes:
1) Ron Minnich, project founder: What is Coreboot, motivation, and principles of operation.
2) Peter Stuge, long-time contributor: Details, system management mode (SMM) and ACPI, and of course some of the coolest demos of all time.
3) Stefan Reinauer, primary maintainer: Testing infrastructure

Enjoy!

--
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot
z4ziggy | 1 Nov 09:54
Picon

Re: assistance with updating my bios

Since i have no idea what are you two talking about, im attaching the link to the current BIOS datasheet (which shows the current BIOS has a 2MB flash size, if i understand this correctly) : http://www.datasheetcatalog.org/datasheet/stmicroelectronics/8499.pdf

On Nov 1, 2008 1:53am, Corey Osgood <corey.osgood <at> gmail.com> wrote:
> > cpu:         Socket370 Intel Pentium III Celeron
>
> > northbridge:    Intel 82810E
>
> > southbridge:    Intel 8281AA
>
> > mainboard:    810 R 4.1 with lan
>
> > super i/o:    Winbond W8362F-AW
>
> > bios device:    ST M50FW002
>
>
>
> Are you sure it's SPI?
>
>
>
> -Corey
>
>
>
> On 10/31/08, Elia Yehuda wrote:
>
> > many thanks. i will try the patch tomorrow night when i'm back at home and
>
> > report back.
>
> >
>
> > On Fri, Oct 31, 2008 at 8:38 PM, Peter Stuge wrote:
>
> >
>
> >> Hi,
>
> >>
>
> >> z4ziggy <at> gmail.com wrote:
>
> >> > No EEPROM/flash device found.
>
> >> > If you know which flash chip you have, and if this version of flashrom
>
> >> > supports a similar flash chip, you can try to force read your chip. Run:
>
> >> > flashrom -f -r -c similar_supported_flash_chip filename
>
> >> >
>
> >> > Note: flashrom can never write when the flash chip isn't found
>
> >> > automatically.
>
> >>
>
> >> The above note is sadly not a joke.
>
> >>
>
> >>
>
> >> Corey Osgood wrote:
>
> >> > AFAIK, flashrom is broken for most ICHx.
>
> >>
>
> >> Not so, it works very well on a whole bunch of them.
>
> >>
>
> >>
>
> >> Carl-Daniel Hailfinger wrote:
>
> >> > On 30.10.2008 16:57, z4ziggy <at> gmail.com wrote:
>
> >> > > any plans on fixing the issue or using alternative? is there a
>
> >> > > way i can assist?
>
> >> >
>
> >> > Your flash chip is not supported. I'll add code for it.
>
> >>
>
> >> Some info Carl-Daniel didn't post, maybe it is informative;
>
> >>
>
> >> It seems that the system has a Winbond W25B40 or W25B40A flash chip.
>
> >> This is an SPI flash chip, but it seems to behave just like a FWH
>
> >> type chip.
>
> >>
>
> >> While waiting for Carl-Daniel you can try the attached patch. I doubt
>
> >> it will work but you never know.
>
> >>
>
> >>
>
> >> //Peter
>
> >>
>
> >> --
>
> >> coreboot mailing list: coreboot <at> coreboot.org
>
> >> http://www.coreboot.org/mailman/listinfo/coreboot
>
> >>
>
> >
>

--
coreboot mailing list: coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Gmane