1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Functions to call MRC.bin from x86_64 */
6 .section ".text.mrc_wrapper", "ax", @progbits
9 /* Set up new stack frame */
14 andl $0xfffffff0, %esp
16 movl 36(%ebp), %ebx /* Get function pointer */
17 movl 40(%ebp), %eax /* Get argument */
21 /* Place return value on stack so that popal fetches it */
24 /* Restore stack pointer */
30 * Callback for MRC to print a character on the console.
31 * As MRC is x86_32 call into long mode and use the x86_64
32 * function do_putchar to print to console.
35 #include <src/cpu/x86/64bit/prot2long.inc>
37 prot2lm_wrapper do_putchar