aboutsummaryrefslogtreecommitdiff
path: root/entry.S
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-07-23 19:45:15 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-07-24 11:00:15 +0200
commite7fc653f44247f1008509a68bf9b666e33fea0e5 (patch)
tree8c5518432f79a8f45d575d9f76e9be1e90431bdb /entry.S
parentc476b5c67199b44523084b7639a4ff52f437156b (diff)
downloadqboot-e7fc653f44247f1008509a68bf9b666e33fea0e5.zip
qboot-e7fc653f44247f1008509a68bf9b666e33fea0e5.tar.gz
qboot-e7fc653f44247f1008509a68bf9b666e33fea0e5.tar.bz2
implement PCIBIOS specification
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'entry.S')
-rw-r--r--entry.S45
1 files changed, 45 insertions, 0 deletions
diff --git a/entry.S b/entry.S
index ecd5fae..31d840b 100644
--- a/entry.S
+++ b/entry.S
@@ -91,3 +91,48 @@ ENTRY(bios_int15)
IRET
ENTRY_END(bios_int15)
+
+ .code32
+ENTRY(pcibios_entry)
+ clc
+ pushfl
+ SAVE_BIOSREGS
+
+ movl %esp, %eax
+ call pcibios_handler
+
+ RESTORE_BIOSREGS
+ popfl
+ lretl
+ENTRY_END(pcibios_entry)
+
+ENTRY(bios32_entry)
+ pushfl
+ testl %ebx, %ebx /* BIOS32 service directory? */
+ jnz 2f
+ cmp $0x49435024, %eax /* "$PCI"? */
+ movb $0x80, %al /* service not present */
+ jne 1f
+ xorl %ebx, %ebx /* fill in base/length/entry */
+ movl $(1 << 20), %ecx
+ movl $pcibios_entry, %edx
+ movb $0x00, %al /* service present */
+1:
+ popfl
+ lretl
+2:
+ movb $0x81, %al /* unimplemented function */
+ popfl
+ lretl
+ENTRY_END(bios32_entry)
+
+ENTRY(pic_base)
+ call 1f
+2:
+ ret
+1:
+ popl %eax
+ pushl %eax
+ subl $2b, %eax
+ ret /* return to 2b */
+ENTRY_END(pic_base)