+start_chain_boot:
+ xorl %edx, %edx
+ movb _chainbootdev, %dl # Setup DL with the BIOS device number
+
+ call __prot_to_real # Back to real mode.
+
+ data32
+ call __switch_stack # Restore original stack
+
+ pop %es # Restore original ES and DS
+ pop %ds
+ popl %edi # Restore all general purpose registers
+ popl %esi # except EAX.
+ popl %ebp
+ popl %ebx
+ popl %ecx
+
+ data32
+ ljmp $0, $0x7c00 # Jump to boot code already in memory