[LinuxBIOS] Build broken?

Lu, Yinghai yinghai.lu at amd.com
Thu Nov 10 23:10:01 CET 2005

OK, Let me explain that again:

Final LinuxBIOS image = VGABIOS ROM + Normal Image + FallBack Image

FallBack Image = PayLoad + linuxbios_ram.n2v + linuxbios_rom

Linuxbios_rom  = crt0.S + init.o + id + reset_vector

Reset_vector is sit on 0xfffffff0, and at the very beginning, reset
happen, the ROM only can be accessed in 64K range. So need to make sure
_start in crt0.S need to stay in last 64 address range.

The init.o will include cache_as_ram_auto.c in the fallback amd64_main,
it will enabled the access 4M flash access. 

When We were using ROMCC, the crt0.S will be very bigger (it include
auto.inc), So for 8 way or 4 way system, It will push out the _start out
of last 64K.

When We are using CAR, the init.o is all the same size for 8way and 2
way system. ( because CAR use gcc, and have real stack for functional
call, ROMCC can not have stack because of limited regs)

Another problem is if put set ROM_IMAGE_SIZE too big, the current lds
can not curbe crt0.S to stay in last 64K too...

So you need to set your ROM_IMAGE_SIZE carefully for FALLBACK image.
If it is too small, it could not fit Payload

It it is too big, _start in crt0.S will out of last 64K....

Later we could modify .lds to force crt0.S and init.o stay in last

Or change Linuxbios_rom = init.o + crt0.S + id + reset_vector.... ( need
make sure enable_rom in 64K too...)

But is not high priority, because crt0.S+init.o for CAR are always

Other problem is you must use Linux otherthan Redhat and Suse????
And you need to upgrade your gcc


-----Original Message-----
From: beneo [mailto:beneo at comcast.net] 
Sent: Thursday, November 10, 2005 11:54 AM
To: Lu, Yinghai; Ronald G Minnich
Cc: linuxbios at openbios.org
Subject: Re: [LinuxBIOS] Build broken?

Thanks. It works on one of issues I have encountered.

My immidiate question is why my ROM_IMAGE_SIZE with larger value 0x20000
won't work, but with 0x16380 would work? If you don't tell me this, I
probably would never be able to figure out.

My have another issue, It looks like a bug in target tyan/s2891. I'm
to build tyan/s2891. No matter what I change, I always get a build error
gcc -m32 -nostdlib -nostartfiles -static -o linuxbios -T ldscript.ld
/usr/bin/ld: section .rodata.str1.32 [fffbff80 -> fffc0091] overlaps
.reset [fffbfff0 -> fffbffff]
collect2: ld returned 1 exit status
make[1]: *** [linuxbios] Error 1

Then I looked at ldscript file, it included
file, which looks like this:
        . = (_ROMBASE + ROM_IMAGE_SIZE - 0x80) - (__id_end -
        .id (.): {

There is no linker script would arrange section .rodata.str1.32. I guess
that just makes linker to patch section .rodata.str1.32 at end of .id
section, which caused the overlap with .reset section.

This looks to me is a bug in tyan/s2891. How do I fix this? is that OK
remove nvidia/ck804/id.lds?



----- Original Message ----- 
From: "Lu, Yinghai" <yinghai.lu at AMD.COM>
To: "beneo" <beneo at comcast.net>; "Ronald G Minnich" <rminnich at lanl.gov>
Cc: <linuxbios at openbios.org>
Sent: Wednesday, November 09, 2005 7:39 PM
Subject: Re: [LinuxBIOS] Build broken?

> Please change ROM_IMAGE_SIZE in romimage "fallback" section to 0x16380
> YH
> -- 
> LinuxBIOS mailing list
> LinuxBIOS at openbios.org
> http://www.openbios.org/mailman/listinfo/linuxbios

More information about the coreboot mailing list