- pushl %gs // Backup %gs
- cli
- cld
- pushl %eax // Save registers (matches struct bregs)
- pushl %ecx
- pushl %edx
- pushl %ebx
- pushl %ebp
- pushl %esi
- pushl %edi
- pushw %es
- pushw %ds
- movl %ds, %eax // Move %ds to %gs
- movl %eax, %gs
- movl %ss, %eax // Move %ss to %ds
- movl %eax, %ds
- movl %esp, %eax // First arg is pointer to struct bregs
- calll handle_pcibios32
- popw %ds // Restore registers (from struct bregs)
- popw %es
- popl %edi
- popl %esi
- popl %ebp
- popl %ebx
- popl %edx
- popl %ecx
- popl %eax