X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=kvmfornfv.git;a=blobdiff_plain;f=qemu%2Froms%2Fipxe%2Fsrc%2Farch%2Fi386%2Finclude%2Frealmode.h;h=4defd3b9743675ba5e056205b8b419a1c3d8cb82;hp=dafc5a32add40741a8dec3944032a69b6d5b4763;hb=437fd90c0250dee670290f9b714253671a990160;hpb=5bbd6fe9b8bab2a93e548c5a53b032d1939eec05 diff --git a/qemu/roms/ipxe/src/arch/i386/include/realmode.h b/qemu/roms/ipxe/src/arch/i386/include/realmode.h index dafc5a32a..4defd3b97 100644 --- a/qemu/roms/ipxe/src/arch/i386/include/realmode.h +++ b/qemu/roms/ipxe/src/arch/i386/include/realmode.h @@ -10,7 +10,7 @@ * */ -FILE_LICENCE ( GPL2_OR_LATER ); +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); /* * Declaration of variables in .data16 @@ -64,6 +64,18 @@ FILE_LICENCE ( GPL2_OR_LATER ); * assembler output to make sure that it's doing the right thing. */ +/** + * Convert segment:offset address to user buffer + * + * @v segment Real-mode segment + * @v offset Real-mode offset + * @ret buffer User buffer + */ +static inline __always_inline userptr_t +real_to_user ( unsigned int segment, unsigned int offset ) { + return ( phys_to_user ( ( segment << 4 ) + offset ) ); +} + /** * Copy data to base memory *