Last change
on this file since 26ffad7 was
e16e8f2,
checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago
|
bootstuff
|
-
Property mode set to
100644
|
File size:
449 bytes
|
Line | |
---|
1 | #include <com32.h> |
---|
2 | #include <string.h> |
---|
3 | #include "pci/pci.h" |
---|
4 | |
---|
5 | uint32_t __pci_read_write_bios(uint32_t call, uint32_t v, pciaddr_t a) |
---|
6 | { |
---|
7 | com32sys_t rs; |
---|
8 | memset(&rs, 0, sizeof rs); |
---|
9 | rs.eax.w[0] = call; |
---|
10 | rs.ebx.w[0] = a >> 8; /* bus:device:function */ |
---|
11 | rs.edi.b[0] = a; /* address:reg */ |
---|
12 | rs.ecx.l = v; |
---|
13 | rs.eflags.l = EFLAGS_CF; |
---|
14 | __intcall(0x1a, &rs, &rs); |
---|
15 | |
---|
16 | return (rs.eflags.l & EFLAGS_CF) ? ~(uint32_t) 0 : rs.ecx.l; |
---|
17 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.