Index: /trunk/src/VBox/Devices/PC/DevPcBios.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 27460)
+++ /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 27461)
@@ -43,4 +43,6 @@
 #include "DevFwCommon.h"
 
+#define NET_BOOT_DEVS   4
+
 
 /** @page pg_devbios_cmos_assign    CMOS Assignments (BIOS)
@@ -50,4 +52,5 @@
  *
  * @verbatim
+  First CMOS bank (offsets 0x00 to 0x7f):
     Base memory:
          0x15
@@ -95,4 +98,12 @@
     RAM above 4G in 64KB units:
          0x61 - 0x65
+
+  Second CMOS bank (offsets 0x80 to 0xff):
+    Reserved for future use:
+         0x80 - 0x81
+    First net boot device PCI bus/dev/fn:
+         0x82 - 0x83
+    Second to third net boot devices:
+         0x84 - 0x89
 @endverbatim
  *
@@ -166,4 +177,6 @@
     /** PXE debug logging enabled? */
     uint8_t         u8PXEDebug;
+    /** PXE boot PCI bus/dev/fn list. */
+    uint16_t        au16NetBootDev[NET_BOOT_DEVS];
     /** Number of logical CPUs in guest */
     uint16_t        cCpus;
@@ -461,4 +474,13 @@
      */
     pcbiosCmosWrite(pDevIns, 0x3f, pThis->u8PXEDebug);
+
+    /*
+     * Network boot device list.
+     */
+    for (i = 0; i < NET_BOOT_DEVS; ++i) 
+    {
+        pcbiosCmosWrite(pDevIns, 0x82 + i * 2, pThis->au16NetBootDev[i] & 0xff);
+        pcbiosCmosWrite(pDevIns, 0x83 + i * 2, pThis->au16NetBootDev[i] >> 8);
+    }
 
     /*
@@ -1043,4 +1065,44 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Querying \"PXEDebug\" as integer failed"));
+
+    /* Clear the net boot device list. All bits set invokes old behavior,
+     * as if no second CMOS bank was present.
+     */
+    memset(&pThis->au16NetBootDev, 0xff, sizeof(pThis->au16NetBootDev));
+
+    /*
+     * Determine the network boot order.
+     */
+    PCFGMNODE pCfgNetBoot = CFGMR3GetChild(pCfg, "NetBoot");
+    if (pCfgNetBoot == NULL)
+    {
+        /* Do nothing. */
+        rc = VINF_SUCCESS;
+    }
+    else
+    {
+        PCFGMNODE   pCfgNetBootDevice;
+        uint16_t    u16BusDevFn;
+        char        szIndex[] = "?";
+        int         i;
+
+        Assert(pCfgNetBoot);
+        for (i = 0; i < NET_BOOT_DEVS; ++i)
+        {
+            szIndex[0] = '0' + i;
+            pCfgNetBootDevice = CFGMR3GetChild(pCfgNetBoot, szIndex);
+            rc = CFGMR3QueryU16(pCfgNetBootDevice, "BusDevFn", &u16BusDevFn);
+            if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
+            {
+                /* Do nothing and stop iterating. */
+                rc = VINF_SUCCESS;
+                break;
+            }
+            else if (RT_FAILURE(rc))
+                return PDMDEV_SET_ERROR(pDevIns, rc,
+                                        N_("Configuration error: Querying \"Netboot/x/BusDevFn\" as integer failed"));
+            pThis->au16NetBootDev[i] = u16BusDevFn;
+        }
+    }
 
     /*
Index: /trunk/src/VBox/Main/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 27460)
+++ /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 27461)
@@ -587,4 +587,5 @@
     PCFGMNODE pLunL2 = NULL;        /* /Devices/Dev/0/LUN#0/AttachedDriver/Config/ */
     PCFGMNODE pBiosCfg = NULL;      /* /Devices/pcbios/0/Config/ */
+    PCFGMNODE pNetBootCfg = NULL;   /* /Devices/pcbios/0/Config/NetBoot/ */
 
     rc = CFGMR3InsertNode(pRoot, "Devices", &pDevices);                             RC_CHECK();
@@ -906,4 +907,5 @@
         rc = CFGMR3InsertInteger(pBiosCfg,  "PXEDebug",             fPXEDebug);         RC_CHECK();
         rc = CFGMR3InsertBytes(pBiosCfg,    "UUID", &HardwareUuid,sizeof(HardwareUuid));RC_CHECK();
+        rc = CFGMR3InsertNode(pBiosCfg,   "NetBoot", &pNetBootCfg);                     RC_CHECK();
 
         DeviceType_T bootDevice;
@@ -1528,4 +1530,24 @@
         }
 #endif
+        /*
+         * Transfer boot device information to the BIOS.
+         */
+        if (ulInstance == 0)
+        {
+            unsigned    uBootIdx = 0;
+
+            if (pNetBootCfg)    /* NetBoot node doesn't exist for EFI! */
+            {
+                PCFGMNODE   pNetBtDevCfg;
+                char        achBootIdx[] = "0";
+                uint16_t    u16BusDevFn;
+
+                achBootIdx[0] = '0' + uBootIdx;     /* Boot device order. */
+                rc = CFGMR3InsertNode(pNetBootCfg, achBootIdx, &pNetBtDevCfg);      RC_CHECK();
+                rc = CFGMR3InsertInteger(pNetBtDevCfg, "NIC", ulInstance);          RC_CHECK();
+                u16BusDevFn = iPciDeviceNo << 3;
+                rc = CFGMR3InsertInteger(pNetBtDevCfg, "BusDevFn", u16BusDevFn);    RC_CHECK();
+            }
+        }
 
         /*
