[OpenBIOS] Problem with jumping from assembly to c function

Stefan Reinauer stepan at openbios.org
Mon Sep 13 14:56:17 CEST 2004


Hi Viswanath,

* Vishu at soc-soft.com <Vishu at soc-soft.com> [040908 12:03]:
> 	For my previous mail of cross compiling the kernel for mips
> board. I resolved the issue
> As u mentioned of on HOSTCC and CC for Target.
> 
> Is there any other way of compiling forth sources.

You can choose a system with the same bit width (32/64bit) and and
endianess (big/little endian) and compile the dictionary natively there.
Otherwise you will have to wait until OpenBIOS supports cross compiling
officially. 

> And after cross compilation I am facing the problem of jumping from
> boot.s to main. Somehow
> Succeeded in jumping to cmain function. Openbios function is called from
> cmain during this period
> Context is saved is it necessary to initialize global pointer. Because
> once it goes to cmain after some
> Execution of instructions the global pointer gets manipulated and
> exception occurs. Why is it so.
 
Do you get any output before this? Did you initialize the stack properly
in or before boot.S?

> But in /arch/x86 example there is only the initilization of stack
> pointer. Do u have any example for
> Cross compilation procedure and linking the linker script to download to
> ROM or RAM.
 
Have a look at the current version at http://www.openbios.org/snapshots/

Relocation from rom to ram is currently only done by the underlying ELF
loader (ie LinuxBIOS) but we want to support more in the future. Any
concrete ideas / patches are welcome.

Stefan



More information about the OpenBIOS mailing list