FILE_LICENCE ( GPL2_OR_LATER );
#include <stdint.h>
-#include <setjmp.h>
+#include <rmsetjmp.h>
#include <ipxe/in.h>
/** Segment used for COMBOOT PSP and image */
#include <pxe_api.h>
#include <realmode.h>
-#include <setjmp.h>
+#include <rmsetjmp.h>
struct net_device;
--- /dev/null
+#ifndef _RMSETJMP_H
+#define _RMSETJMP_H
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <setjmp.h>
+#include <realmode.h>
+
+/** A real-mode-extended jump buffer */
+typedef struct {
+ /** Jump buffer */
+ jmp_buf env;
+ /** Real-mode stack pointer */
+ segoff_t rm_stack;
+} rmjmp_buf[1];
+
+#define rmsetjmp( _env ) ( { \
+ (_env)->rm_stack.segment = rm_ss; \
+ (_env)->rm_stack.offset = rm_sp; \
+ setjmp ( (_env)->env ); } ) \
+
+#define rmlongjmp( _env, _val ) do { \
+ rm_ss = (_env)->rm_stack.segment; \
+ rm_sp = (_env)->rm_stack.offset; \
+ longjmp ( (_env)->env, (_val) ); \
+ } while ( 0 )
+
+#endif /* _RMSETJMP_H */
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h>
-#include <realmode.h>
/** A jump buffer */
typedef struct {
uint32_t ebp;
} jmp_buf[1];
-/** A real-mode-extended jump buffer */
-typedef struct {
- /** Jump buffer */
- jmp_buf env;
- /** Real-mode stack pointer */
- segoff_t rm_stack;
-} rmjmp_buf[1];
-
extern int __asmcall __attribute__ (( returns_twice ))
setjmp ( jmp_buf env );
extern void __asmcall __attribute__ (( noreturn ))
longjmp ( jmp_buf env, int val );
-#define rmsetjmp( _env ) ( { \
- (_env)->rm_stack.segment = rm_ss; \
- (_env)->rm_stack.offset = rm_sp; \
- setjmp ( (_env)->env ); } ) \
-
-#define rmlongjmp( _env, _val ) do { \
- rm_ss = (_env)->rm_stack.segment; \
- rm_sp = (_env)->rm_stack.offset; \
- longjmp ( (_env)->env, (_val) ); \
- } while ( 0 )
-
#endif /* _SETJMP_H */
#include <ipxe/init.h>
#include <ipxe/profile.h>
#include <ipxe/netdevice.h>
-#include <setjmp.h>
+#include <rmsetjmp.h>
#include <registers.h>
#include <biosint.h>
#include <pxe.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <setjmp.h>
#include <ipxe/uaccess.h>
#include <ipxe/dhcp.h>
#include <ipxe/fakedhcp.h>
#include <ipxe/if_ether.h>
#include <basemem_packet.h>
#include <biosint.h>
+#include <rmsetjmp.h>
#include "pxe.h"
#include "pxe_call.h"
#include <comboot.h>
#include <bzimage.h>
#include <pxe_call.h>
-#include <setjmp.h>
+#include <rmsetjmp.h>
#include <string.h>
#include <ipxe/posix_io.h>
#include <ipxe/process.h>