mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 06:22:01 +03:00
Add (untested) UNDI loader C-level implementation.
This commit is contained in:
@@ -298,6 +298,31 @@ void pxe_api_call ( struct i386_all_regs *ix86 ) {
|
||||
ix86->regs.ax = ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch PXE loader call
|
||||
*
|
||||
* @v es:di Address of PXE parameter block
|
||||
* @ret ax PXE exit code
|
||||
*/
|
||||
void pxe_loader_call ( struct i386_all_regs *ix86 ) {
|
||||
userptr_t uparams = real_to_user ( ix86->segs.es, ix86->regs.di );
|
||||
struct s_UNDI_LOADER params;
|
||||
PXENV_EXIT_t ret;
|
||||
|
||||
/* Copy parameter block from caller */
|
||||
copy_from_user ( ¶ms, uparams, 0, sizeof ( params ) );
|
||||
|
||||
/* Set default status in case child routine fails to do so */
|
||||
params.Status = PXENV_STATUS_FAILURE;
|
||||
|
||||
/* Call UNDI loader */
|
||||
ret = undi_loader ( ¶ms );
|
||||
|
||||
/* Copy modified parameter block back to caller and return */
|
||||
copy_to_user ( uparams, 0, ¶ms, sizeof ( params ) );
|
||||
ix86->regs.ax = ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook INT 1A for PXE
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user