summaryrefslogtreecommitdiff
path: root/kernel/pci.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-08-20 10:45:40 +0200
committerMichal Idziorek <m.i@gmx.at>2014-08-20 10:45:40 +0200
commit46063e75f3f81dfb532fa5772c88e9027a0faebd (patch)
treeea264dd6d2eb323df0fb3efbc5899db41208f21e /kernel/pci.c
parent444a88dddf2411f5502413f3f02725a5968eaa9b (diff)
added x86.h and removed some test-bugs.
Diffstat (limited to 'kernel/pci.c')
-rw-r--r--kernel/pci.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/kernel/pci.c b/kernel/pci.c
index 292bf1b..8aa5eb9 100644
--- a/kernel/pci.c
+++ b/kernel/pci.c
@@ -1,37 +1,9 @@
#include "kernel.h"
+#include "x86.h"
#define PCI_CONFIG_DATA 0xCFC
#define PCI_CONFIG_ADDRESS 0xCF8
-void OutPort(unsigned short int IO_port,char Value)
-{
- asm("outb %%al,%%dx;"
- : //no output data
- :"d"(IO_port),"a"(Value) //input data (EDX<-IO_port; AL<-Value)
- );
-}
-char InPort(unsigned short int IO_port)
-{
- asm("inb %%dx,%%al;"
- : //output data is in al register
- :"d"(IO_port) //input data (EDX<-IO_port AL<-Value)
- );
-}
-
-x86_outl(int port, uint32_t data)
-{
- __asm __volatile("outl %0,%w1" : : "a" (data), "d" (port));
-}
-
-
-
-x86_inl(int port)
-{
- uint32_t data;
- __asm __volatile("inl %w1,%0" : "=a" (data) : "d" (port));
- return data;
-}
-
void pciConfigSet (uint8_t bus, uint8_t slot,
uint8_t func, uint8_t offset, uint32_t data)
{