diff options
author | Rudolf Marek <r.marek@assembler.cz> | 2010-04-25 22:47:50 +0000 |
---|---|---|
committer | Rudolf Marek <r.marek@assembler.cz> | 2010-04-25 22:47:50 +0000 |
commit | 837d81079689927b78baa5c606c6d8484ea21a95 (patch) | |
tree | 3984257535f8147f22220157a0952834f6760e35 /hwaccess.c | |
parent | ce1c798c1ce12873c101d0e3345548db83d2e374 (diff) | |
download | flashrom-837d81079689927b78baa5c606c6d8484ea21a95.tar.gz flashrom-837d81079689927b78baa5c606c6d8484ea21a95.tar.bz2 flashrom-837d81079689927b78baa5c606c6d8484ea21a95.zip |
Fix the DOS port
Now the DS selector limit is set to 4GB and all mmio accesses goes
through DS, the 1:1 mapping is fixed so the _DS base is taken onto
account. Plus is that the hwaccess.c needs no change and memcpy etc can
be used on mmaped space.
Corresponding to flashrom svn r995.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'hwaccess.c')
-rw-r--r-- | hwaccess.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/hwaccess.c b/hwaccess.c index 10e67bdf9..36ea6f4ec 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -54,44 +54,6 @@ void release_io_perms(void) #endif } -#ifdef __DJGPP__ - -extern unsigned short segFS; - -#include <sys/farptr.h> - -void mmio_writeb(uint8_t val, void *addr) -{ - _farpokeb(segFS, (unsigned long) addr, val); -} - -void mmio_writew(uint16_t val, void *addr) -{ - _farpokew(segFS, (unsigned long) addr, val); -} - -void mmio_writel(uint32_t val, void *addr) -{ - _farpokel(segFS, (unsigned long) addr, val); -} - -uint8_t mmio_readb(void *addr) -{ - return _farpeekb(segFS, (unsigned long) addr); -} - -uint16_t mmio_readw(void *addr) -{ - return _farpeekw(segFS, (unsigned long) addr); -} - -uint32_t mmio_readl(void *addr) -{ - return _farpeekl(segFS, (unsigned long) addr); -} - -#else - void mmio_writeb(uint8_t val, void *addr) { *(volatile uint8_t *) addr = val; @@ -121,4 +83,3 @@ uint32_t mmio_readl(void *addr) { return *(volatile uint32_t *) addr; } -#endif |