delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/07/29/21:45:07

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
NNTP-Posting-Date: Mon, 29 Jul 2013 20:24:04 -0500
From: "Charles Sandmann" <cwsdpmi AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
References: <rNWdnSFu4b2QMtfWnZ2dnUVZ_tmdnZ2d AT earthlink DOT com> <09068ed9-d989-4db5-bc71-2eabcbf1db53 AT googlegroups DOT com> <t5OdnS4B7e2zJmzMnZ2dnUVZ_oGdnZ2d AT earthlink DOT com> <cbe4c56f-4098-445b-9321-9017bddcebdf AT googlegroups DOT com>
Subject: Re: Beta Test: CWSDPMI r7 - 4GB support
Date: Mon, 29 Jul 2013 20:23:45 -0500
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
Message-ID: <44qdnVq6LIkpiGrMnZ2dnUVZ_tidnZ2d@earthlink.com>
Lines: 45
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 64.91.136.221
X-Trace: sv3-LAkqzl9G8AuRIJL2HEj3oe9TNVjOK4oZtO/aR4Olu2hKlgPxsiHO896BZddSU1Yo9Ejg+1eDD91Ld8u!Jg9RWEvQYI+btfSCCwuFl1t5zmV3EDzv6furHxEvZzJZmW24GuVOHIa0XESDBKmiw2fuph/DQ7sT!enjTXk9KAn0aoGkqXXfK/LVMTO2CWOxi
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Bytes: 3382
X-Original-Bytes: 3321
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

<jimmyliaoo AT gmail DOT com> wrote in message 
news:cbe4c56f-4098-445b-9321-9017bddcebdf AT googlegroups DOT com...
>If user setup a memory window to access "more than 4GB", the <pointer> is 
>still 32-bit ? Am I correct ?

Correct.  Where that 32-bit pointer points in physical memory is controlled 
by the page tables.  All memory over the 4GB is handled in 4MB page chunks. 
It is possible that 8MB in DJGPP address space would not be contiguous in 
physical memory, but it will be
mapped into you address space in the order you touch it.

>My goal is to allocate one memory buffer and its "physical address" is 
>beyond 4GB.
>Then this address will be set to H/W register for DMA transfer...(Besides 
>CPU can
> access this buffer, too) Thus I have to get more than 32-bit pointer and 
> then assign it to H/W...

Let's suppose your computer has 4GB physical memory.  Typically between 
2.5GB and 3.5GB of that memory is actually below the 4GB address point.  The 
remaining typically starts at the 4GB address point.  On this computer you 
could just sbrk() up to 4092K,
then touch the memory in order (first byte in each 4MB aligned page).  If 
you then look at the physical map, you will very likely
have at least a 500MB buffer you can configure that actually is above the 
4GB address.

There is a very old program - 
http://homer.rice.edu/~sandmann/djgpp/cwsdma2.zip - that was designed for 
creating DMA buffers under CWSDPMI.  Note that this hasn't been updated for 
r7 and physical addresses > 4GB, but slightly modified code can provide what 
you are looking for.

From this program, you can also see it is possible to modify the page tables 
and re-map your own memory as needed.

> >I do not know if CWSDPMI+DJGPP can do this kind of task...

You would be responsible for the HW writes, but you can certainly get full 
control of your memory layout.  If you have lots of memory, like 64GB, then 
you would need to manage it from DJGPP; CWSDPMI does not bother with 
managing more than
the first 8GB. 


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019