<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
It would seem C handles this at compile time with a define.. mapping mmap to mmap64. Which would almost seem to imply you'd end up with a 32 bit binary that would only work on 64 bit systems. I'm not really sure how this would work for Pascal. You could start
by looking in the file listed in the fpmmap docs you posted. My guess is the easiest answer is "distribute both 32 and 64 bit versions," but that doesn't help when you need to test the 32 bit one..<span id="ms-outlook-android-cursor"></span><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
-- <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Alexander Grotewohl <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<a href="https://dcclost.com">https://dcclost.com</a> <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<span id="OutlookSignature">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
--<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Alexander Grotewohl<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<a href="https://dcclost.com">https://dcclost.com</a></div>
</span></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fpc-pascal <fpc-pascal-bounces@lists.freepascal.org> on behalf of Rainer Stratmann via fpc-pascal <fpc-pascal@lists.freepascal.org><br>
<b>Sent:</b> Friday, November 20, 2020 6:33:51 PM<br>
<b>To:</b> fpc-pascal@lists.freepascal.org <fpc-pascal@lists.freepascal.org><br>
<b>Cc:</b> Rainer Stratmann <rainerstratmann@t-online.de><br>
<b>Subject:</b> [fpc-pascal] fpmmap problem 64 bit linux</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">A 32 bit freepascal program on a 32 bit Linux Debian system is working
<br>
properly. It uses fpmmap for getting the adress of a kms framebuffer.<br>
<br>
The same 32 bit program on a 64 bit Linux Debian system *** is not working.<br>
When it comes to the fpmmap it gives an error:<br>
<br>
Sys_EINVAL<br>
One of the record fields Start, length or offset is invalid.<br>
<br>
<a href="https://www.freepascal.org/docs-html/rtl/baseunix/fpmmap.html">https://www.freepascal.org/docs-html/rtl/baseunix/fpmmap.html</a><br>
<br>
I figured out that it likely can only be the offset value since start and length <br>
are always the same.<br>
<br>
The offset value I got from a previous DRM function.<br>
<br>
On the 32 bit System this offset value is $10000000 (fits in 32 bit)<br>
And on the 64 bit System this offset value is $100000000 (does not fit in 32 <br>
bit).<br>
<br>
Can it be possible that the fpmmap function strips the offset value to 32 bit?<br>
Is there another way to call fpmmap more directly?<br>
What does fpmmap exactly?<br>
Where can I research?<br>
<br>
<br>
***<br>
dpkg --add-architecture i386<br>
apt-get update<br>
apt-get install libc6-i386<br>
<br>
<br>
_______________________________________________<br>
fpc-pascal maillist - fpc-pascal@lists.freepascal.org<br>
<a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br>
</div>
</span></font></div>
</body>
</html>