/**************************************************************************
UNDI NIC driver for Etherboot - header file
This file Copyright (C) 2003 Michael Brown <mbrown@fensystems.co.uk>
of Fen Systems Ltd. (http://www.fensystems.co.uk/). All rights
reserved.
$Id: undi.h,v 1.5 2003/10/24 10:05:06 mcb30 Exp $
***************************************************************************/
/*
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2, or (at
* your option) any later version.
*/
/* Include pxe.h from FreeBSD.
* pxe.h defines PACKED, which etherboot.h has already defined.
*/
#include "pxe.h"
#include "pic8259.h"
/* __undi_call is the assembler wrapper to the real-mode UNDI calls.
* Pass it the real-mode segment:offset address of an undi_call_info_t
* structure. The parameters are only uint16_t, but GCC will push
* them on the stack as uint32_t anyway for the sake of alignment. We
* specify them here as uint32_t to remove ambiguity.
*/
typedef struct undi_call_info {
/* The UNDI loader parameter structure is not defined in pxe.h
*/
typedef struct undi_loader {
/* A union that can function as the parameter block for any UNDI API call.
*/
typedef union pxenv_structure {
for any operation */
/* UNDI status codes
*/
/* BIOS PnP parameter block. We scan for this so that we can pass it
* to the UNDI driver.
*/
typedef struct pnp_bios {
/* Structures within the PXE ROM.
*/
typedef struct rom {
typedef struct pcir_header {
typedef struct pnp_header {
typedef struct undi_rom_id {
/* Storage buffers that we need in base memory. We collect these into
* a single structure to make allocation simpler.
*/
typedef struct undi_base_mem_xmit_data {
typedef struct undi_base_mem_data {
/* Macros and data structures used when freeing bits of base memory
* used by the UNDI driver.
*/
typedef struct firing_squad_lineup {
typedef enum firing_squad_shoot {
DONTSHOOT = 0,
/* Driver private data structure.
*/
typedef struct undi {
/* Pointers to various data structures */
/* Pointers and sizes to keep track of allocated base memory */
void *driver_code;
void *driver_data;
char *xmit_buffer;
/* Flags. We keep our own instead of trusting the UNDI driver
* to have implemented PXENV_UNDI_GET_STATE correctly. Plus
* there's the small issue of PXENV_UNDI_GET_STATE being the
* same API call as PXENV_STOP_UNDI...
*/
/* Parameters that we need to store for future reference
*/
} undi_t;
/* Constants
*/
#define HUNT_FOR_PIXIES 0