more x86_64 work. started to put the mmu bits together in the (former) stage2 loader.
[newos.git] / boot / ppc / pegasos.floppy / isa.c
blob7779c7c94fc1a33837d739650ab9a95e40200f24
1 #include "isa.h"
3 #define ISA_REG_PTR(x) ((void *)(0xfe000000 | (x)))
5 void isa_write8(unsigned short port, unsigned char val)
7 *(char *)ISA_REG_PTR(port) = val;
10 void isa_write16(unsigned short port, unsigned short val)
12 *(short *)ISA_REG_PTR(port) = val;
15 void isa_write32(unsigned short port, unsigned int val)
17 *(int *)ISA_REG_PTR(port) = val;
20 unsigned char isa_read8(unsigned short port)
22 return *(char *)ISA_REG_PTR(port);
25 unsigned short isa_read16(unsigned short port)
27 return *(short *)ISA_REG_PTR(port);
30 unsigned int isa_read32(unsigned short port)
32 return *(int *)ISA_REG_PTR(port);