[Vm-dev] nuSqueak source

Eliot Miranda eliot.miranda at gmail.com
Thu Oct 29 15:31:16 UTC 2020


Hi Yoshiki, Tim, Subbu,

    ARMv8 is cool; but Linux is a hydra.  In getting the JIT to work with ARMv8 I went with the first full 64-bit ARMv8 platform I could access, Manjaro on Raspberry Pi 4.  I now also have an Apple Silicon Mac Mini.

The OS can impose radically different constraints on the JIT.  In Mankato it is impossible to derive an executable region from mmap that is at the same time writable.  On MacOS it is possible, but the VM needs a capability conveyed through its Info.plist and baked in when the app bundle is signed.

Other linuxes for Pi4 May impose different constraints.  As I only have these two variants I need your help in dealing with differing constraints on these other platforms.

So what of these constraints?  Manjaro’s prevents one from simply allocating the code zone as read+write+execute.  So I have to allocate it read+execute and map it elsewhere in the address space as read+write and do all code zone modification (code generation, send-site editing/dynamic-linking/garbage-collection updating, compaction) through this second mapping.  To enable that scheme the VM must be compiled with -DDUAL_MAPPED_CODE_ZONE=1. This is enabled in the mvm scripts in build.linux64ARMv8/squeak.cog.spur.  I need to know if the dual mapping scheme is needed on other 64-bit distros. 

So can you take a look, try both variants and report back?  The allocation of the code zone and it’s remapping is done via mmap calls in platforms/unix/vm/sqUnixSpurMemory.c.

I have a small C test file that I used to experiment with copying a function into mmapped executable memory that I can post if you need to investigate why mmap might refuse to map write+execute and try and evade the restrictions it imposes.

_,,,^..^,,,_ (phone)

> On Oct 29, 2020, at 3:29 AM, K K Subbu <kksubbu.ml at gmail.com> wrote:
> 
> On 29/10/20 4:52 am, tim Rowledge wrote:
>> There*is*  a 64 bit version of Raspberry PI OS that is currently in
>> late-beta. That would need a VM from the opensmalltalk-vm⁩ ▸
>> ⁨build.linux32ARMv6⁩ ▸ ⁨squeak.stack.spur⁩ tree and of course a 64
>> bit image.
> 
> Ubuntu released their 64-bit desktop versions for Raspberry Pi 4 just last week:
> 
> https://ubuntu.com/raspberry-pi
> 
> introduction and installation
> https://youtu.be/0pT4-RcTERU
> 
> direct link
> http://cdimage.ubuntu.com/ubuntu/releases/20.10/release/
> 
> HTH .. Subbu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20201029/47ef5f67/attachment.html>


More information about the Vm-dev mailing list