On Wed, 29 Mar 2000, Norm Dresner wrote:
> Back in MS-DOS days, we had functions provided with the compiler to do the
> conversions between a pointer and a segment:offset description of an address:
> void *MK_FP( ushort seg , ushort off );
> unsigned short FP_SEG( void *pointer );
> unsigned short FP_OFF( void *pointer );
There is no such thing like segment and offset in 32 bit mode.
> I have the need to do computation like this when accessing an ISA board
> (1st 1M of memory) and when translating the addresses from the dual-ported
> RAM from what's seen by the CPU on the board to what's seen by the PC (On
> the board, the DPM looks like it starts at 0x1000:0 while on the PC it's
> at 0xD000:0).
Then just substract/add 0xC0000 to translate. Or better
char *baseptr=__va(0xD0000);
baseptr[10] is the 11th byte of it.
(__u16*)(baseptr+10)[0] is the 6th 16 bit word of it.
Depending on the version of the kernel ioremap function may be involved as
well (question to all: is ioremap required/allowed for low ISA memory
mapped?).
--
Tomek
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/