Skip to contentSkip to conversation

BIOS: try to load PXE rom for the next nic.

PATCH In review Akio Takebe 2 participants 2 messages Jun 3, 2009 – Jun 4, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 BIOS: try to load PXE rom for the next nic.

Hi,

Current hvmloader doesn't try to load gPXE for 2nd nic because hvmloader give up loading gPXE
even if scan_option_rom() return 0.

This patch revises such the behavior.
With this patch, hvmloader tries to boot from 2nd nic if 1st nic doesn't match the gPXE.

Best Regards,

Akio Takebe

tools/firmware/hvmloader/hvmloader.c +4 -1
diff -r f72d26c00002 tools/firmware/hvmloader/hvmloader.c
@@ -451,6 +451,7 @@ static int scan_etherboot_nic(uint32_t c
 {
     uint8_t devfn;
     uint16_t class, vendor_id, device_id;
+    int ret;
 
     for ( devfn = 0; devfn < 128; devfn++ )
     {
@@ -462,8 +463,10 @@ static int scan_etherboot_nic(uint32_t c
         if ( (vendor_id != 0xffff) &&
              (device_id != 0xffff) &&
              (class == 0x0200) )
-            return scan_option_rom(
+            ret = scan_option_rom(
                 devfn, vendor_id, device_id, etherboot, copy_rom_dest);
+        if ( ret != 0 )
+            return ret;
     }
 
     return 0;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

On Wed, Jun 03, 2009 at 11:42:33PM +0900, Akio Takebe wrote:
Content-Description: Mail message body

Quoted 11 lines

Hi,

Current hvmloader doesn't try to load gPXE for 2nd nic because hvmloader give up loading gPXE
even if scan_option_rom() return 0.

This patch revises such the behavior.
With this patch, hvmloader tries to boot from 2nd nic if 1st nic doesn't match the gPXE.

This looks reasonable to me.