00001 /* 00002 * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>. 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License as 00006 * published by the Free Software Foundation; either version 2 of the 00007 * License, or any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 FILE_LICENCE ( GPL2_OR_LATER ); 00020 00021 #include <realmode.h> 00022 #include <gpxe/aoe.h> 00023 #include <gpxe/netdevice.h> 00024 #include <gpxe/abft.h> 00025 00026 /** @file 00027 * 00028 * AoE Boot Firmware Table 00029 * 00030 */ 00031 00032 #define abftab __use_data16 ( abftab ) 00033 /** The aBFT used by gPXE */ 00034 struct abft_table __data16 ( abftab ) __attribute__ (( aligned ( 16 ) )) = { 00035 /* ACPI header */ 00036 .acpi = { 00037 .signature = ABFT_SIG, 00038 .length = sizeof ( abftab ), 00039 .revision = 1, 00040 .oem_id = "FENSYS", 00041 .oem_table_id = "gPXE", 00042 }, 00043 }; 00044 00045 /** 00046 * Fill in all variable portions of aBFT 00047 * 00048 * @v aoe AoE session 00049 */ 00050 void abft_fill_data ( struct aoe_session *aoe ) { 00051 00052 /* Fill in boot parameters */ 00053 abftab.shelf = aoe->major; 00054 abftab.slot = aoe->minor; 00055 memcpy ( abftab.mac, aoe->netdev->ll_addr, sizeof ( abftab.mac ) ); 00056 00057 /* Update checksum */ 00058 acpi_fix_checksum ( &abftab.acpi ); 00059 00060 DBG ( "AoE boot firmware table:\n" ); 00061 DBG_HD ( &abftab, sizeof ( abftab ) ); 00062 }
1.5.7.1