2005-05-23 23:32:56 +00:00
|
|
|
/*
|
2007-07-03 23:41:35 +01:00
|
|
|
* Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
|
2005-05-23 23:32:56 +00:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
|
* License, or any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
*/
|
|
|
|
|
|
2007-07-03 23:41:35 +01:00
|
|
|
#include <gpxe/init.h>
|
2005-05-23 23:32:56 +00:00
|
|
|
#include "pxe.h"
|
2007-07-03 23:41:35 +01:00
|
|
|
#include "pxe_call.h"
|
2005-05-23 23:32:56 +00:00
|
|
|
|
2007-07-03 23:41:35 +01:00
|
|
|
/** @file
|
|
|
|
|
*
|
|
|
|
|
* PXE UNDI loader
|
2005-05-23 23:32:56 +00:00
|
|
|
*
|
2007-07-03 23:41:35 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* PXENV_UNDI_LOADER
|
2005-05-23 23:32:56 +00:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
PXENV_EXIT_t undi_loader ( struct s_UNDI_LOADER *undi_loader ) {
|
|
|
|
|
|
2007-07-03 23:41:35 +01:00
|
|
|
DBG ( "[PXENV_UNDI_LOADER]" );
|
2005-05-23 23:32:56 +00:00
|
|
|
|
2007-07-03 23:41:35 +01:00
|
|
|
/* Perform one-time initialisation (e.g. heap) */
|
|
|
|
|
initialise();
|
2005-05-23 23:32:56 +00:00
|
|
|
|
2007-07-03 23:41:35 +01:00
|
|
|
/* Set up PXE data structures */
|
|
|
|
|
pxe_init_structures();
|
2005-05-23 23:32:56 +00:00
|
|
|
|
2007-07-03 23:41:35 +01:00
|
|
|
/* Fill in UNDI loader structure */
|
|
|
|
|
undi_loader->PXEptr.segment = rm_ds;
|
|
|
|
|
undi_loader->PXEptr.offset =
|
|
|
|
|
( ( unsigned ) & __from_text16 ( ppxe ) );
|
|
|
|
|
undi_loader->PXENVptr.segment = rm_ds;
|
|
|
|
|
undi_loader->PXENVptr.offset =
|
|
|
|
|
( ( unsigned ) & __from_text16 ( pxenv ) );
|
2005-05-23 23:32:56 +00:00
|
|
|
|
2007-07-03 23:41:35 +01:00
|
|
|
undi_loader->Status = PXENV_STATUS_SUCCESS;
|
2005-05-23 23:32:56 +00:00
|
|
|
return PXENV_EXIT_SUCCESS;
|
|
|
|
|
}
|