Index: /trunk/src/VBox/Devices/PC/BIOS-new/ahci.c
===================================================================
--- /trunk/src/VBox/Devices/PC/BIOS-new/ahci.c	(revision 39587)
+++ /trunk/src/VBox/Devices/PC/BIOS-new/ahci.c	(revision 39588)
@@ -120,4 +120,5 @@
 #define AHCI_REG_PORT_IS   0x10
 # define AHCI_REG_PORT_IS_DHRS RT_BIT_32(0)
+# define AHCI_REG_PORT_IS_TFES RT_BIT_32(30)
 #define AHCI_REG_PORT_IE   0x14
 #define AHCI_REG_PORT_CMD  0x18
@@ -258,5 +259,5 @@
         DBG_AHCI("AHCI: Waiting for D2H FIS\n");
         while (ahci_ctrl_is_bit_set(io_base, AHCI_PORT_REG(port, AHCI_REG_PORT_IS),
-                                    AHCI_REG_PORT_IS_DHRS) == 0)
+                                    AHCI_REG_PORT_IS_DHRS | AHCI_REG_PORT_IS_TFES) == 0)
         {
             // This is where we'd need some kind of a yield functionality...
@@ -506,5 +507,5 @@
     bios_dsk->drqp.lba     = (uint32_t)length << 8;     //@todo: xfer length limit
     bios_dsk->drqp.buffer  = buffer;
-//    bios_dsk->drqp.nsect   = length / 2048;
+    bios_dsk->drqp.nsect   = length / bios_dsk->drqp.sect_sz;
 //    bios_dsk->drqp.sect_sz = 2048;
 
Index: /trunk/src/VBox/Devices/PC/BIOS-new/biosint.h
===================================================================
--- /trunk/src/VBox/Devices/PC/BIOS-new/biosint.h	(revision 39587)
+++ /trunk/src/VBox/Devices/PC/BIOS-new/biosint.h	(revision 39588)
@@ -52,10 +52,10 @@
 
 #define DEBUG_ATA       0
-#define DEBUG_AHCI      0
-#define DEBUG_CD_BOOT   0
-#define DEBUG_ELTORITO  0
+#define DEBUG_AHCI      1
+#define DEBUG_CD_BOOT   1
+#define DEBUG_ELTORITO  1
 #define DEBUG_INT13_HD  0
 #define DEBUG_INT13_FL  0
-#define DEBUG_INT13_CD  0
+#define DEBUG_INT13_CD  1
 #define DEBUG_INT15     0
 #define DEBUG_INT15_MS  0
Index: /trunk/src/VBox/Devices/PC/BIOS-new/pcibios.inc
===================================================================
--- /trunk/src/VBox/Devices/PC/BIOS-new/pcibios.inc	(revision 39587)
+++ /trunk/src/VBox/Devices/PC/BIOS-new/pcibios.inc	(revision 39588)
@@ -367,5 +367,5 @@
 		jz	next_pci_dev
 
-ifndef VBOX ; This currently breaks restoring a previously saved state. */
+;;ifndef VBOX ; This currently breaks restoring a previously saved state. */
 		mov	dl, 4	; disable i/o and memory space access
 		call	pcibios_init_sel_reg
@@ -422,5 +422,5 @@
 		mov	byte ptr[bp-8], al
 		jmp	pci_init_io_loop2
-endif ; !VBOX
+;;endif ; !VBOX
 
 enable_iomem_space:
