[coreboot] Convert Assembly JMP to C

Joseph Smith joe at settoplinux.org
Wed Sep 10 22:58:32 CEST 2008

On Wed, 10 Sep 2008 22:43:03 +0200, Stefan Reinauer <stepan at coresystems.de>
> Joseph Smith wrote:
>> Hello,
>> How do I convert an Assembly JMP instruction to C. What I would like to
> do
>> is execute an executable assembly blob located in memory. From the docs
> I
>> have read, for assembly you just need to issues a JMP to the memory
>> location to execute it. How to do the same in C, that is the question...
>> P.S. This question is leading up to something great :-)
> Does that code return via "ret"? If so, you'd need a call instead of a
> jmp, which is basically a function call.
> If it does not return, I suggest you use asm volatile (" jmp 0xADDR;\n");
no, this place would be "the point of no return" (seems a little scary
leaving the comfort of coreboot). :-)

But seriously, would asm volatile() be better than Ron,s solution? Also
this would be executed from a payload using libpayload, is there already
something written in libpayload?

Joseph Smith

More information about the coreboot mailing list