/*
* Copyright (C) 2011 Michael Brown <mbrown@fensystems.co.uk>.
*
* 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.
*/
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <ipxe/ethernet.h>
/** @file
*
* IBM BladeCenter Open Fabric Manager (BOFM) tests
*
*/
/** Harvest test table */
static struct {
.header = {
.magic = BOFM_IOAA_MAGIC,
.version = 0x01,
.level = 0x01,
.length = sizeof ( bofmtab_harvest ),
.profile = "Harvest test profile",
},
.en_header = {
.magic = BOFM_EN_MAGIC,
},
.en = {
.mport = 1,
},
.done = {
.magic = BOFM_DONE_MAGIC,
},
};
/** Update test table */
static struct {
.header = {
.magic = BOFM_IOAA_MAGIC,
.version = 0x01,
.level = 0x01,
.length = sizeof ( bofmtab_update ),
.profile = "Update test profile",
},
.en_header = {
.magic = BOFM_EN_MAGIC,
},
.en = {
.mport = 1,
},
.done = {
.magic = BOFM_DONE_MAGIC,
},
};
/**
* Perform BOFM test
*
* @v pci PCI device
*/
int bofmrc;
/* Perform harvest test */
printf ( "BOFMTEST performing harvest\n" );
printf ( "BOFMTEST harvested MAC address %s\n",
} else {
printf ( "BOFMTEST failed to harvest a MAC address\n" );
}
/* Perform update test */
printf ( "BOFMTEST performing update\n" );
printf ( "BOFMTEST updated MAC address to %s\n",
} else {
printf ( "BOFMTEST failed to update MAC address\n" );
}
}
/**
* Perform BOFM test at initialisation time
*
*/
static void bofm_test_init ( void ) {
int rc;
/* Uncomment the following line and specify the correct PCI
* bus:dev.fn address in order to perform a BOFM test at
* initialisation time.
*/
// busdevfn = PCI_BUSDEVFN ( <bus>, <dev>, <fn> );
/* Skip test if no PCI bus:dev.fn is defined */
if ( busdevfn < 0 )
return;
/* Initialise PCI device */
return;
}
/* Perform test */
}
/** BOFM test initialisation function */
};