diff options
| author | Michael Brown | 2007-07-04 00:41:35 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-04 00:41:35 +0200 |
| commit | dca470cb21f75ec2c509af66b807307bf3b7c5ac (patch) | |
| tree | 726278e3457a1f894152434f15b33a96e552dc17 /src/arch | |
| parent | Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe (diff) | |
| download | ipxe-dca470cb21f75ec2c509af66b807307bf3b7c5ac.tar.gz ipxe-dca470cb21f75ec2c509af66b807307bf3b7c5ac.tar.xz ipxe-dca470cb21f75ec2c509af66b807307bf3b7c5ac.zip | |
Add (untested) UNDI loader C-level implementation.
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/i386/interface/pxe/pxe_call.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/arch/i386/interface/pxe/pxe_call.c b/src/arch/i386/interface/pxe/pxe_call.c index 8ecacf1d1..834ca7380 100644 --- a/src/arch/i386/interface/pxe/pxe_call.c +++ b/src/arch/i386/interface/pxe/pxe_call.c @@ -299,6 +299,31 @@ void pxe_api_call ( struct i386_all_regs *ix86 ) { } /** + * 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 * */ |
