[NTLK] ARM MMU support for NewtonOS

Matthias Melcher m.melcher at robowerk.de
Tue Mar 22 06:00:08 PDT 2022



> On 22. Mar 2022, at 13:24, David Arnold <davida at pobox.com> wrote:
> 
> Perhaps of interest to some here:
> 
> Walter Smith (wrs) posted a comment on Hacker News yesterday, describing some memory management features Apple and ARM added to their earlier processors to support NewtonOS.
> 
> Long ago, we in the Newton project at Apple had that idea. We (in conjunction with ARM) were defining the first ARM MMU, so we took the opportunity to implement “domains” of memory protection mappings that could be quickly swapped at a context switch. So you get multiple threads in the same address space, but with independent R/W permission mappings.
> 
> I think a few other ARM customers were intrigued by the security possibilities, but the vast majority were more like “what is this bizarre thing, I just want to run Unix”, so the feature disappeared eventually.
> 
> Here’s some ARM documentation if you want to pull this thread:
> https://developer.arm.com/documentation/dui0056/d/caches-and-tightly-coupled-memories/memory-management-units/memory-access-permissions-and-domains?lang=en <https://developer.arm.com/documentation/dui0056/d/caches-and-tightly-coupled-memories/memory-management-units/memory-access-permissions-and-domains?lang=en>
> 
> This was in a thread discussing a new RISC-V implementation:
> https://news.ycombinator.com/item?id=30755716 <https://news.ycombinator.com/item?id=30755716>

Thanks very much for that link and the message. There are luckily a few descriptions of the MMU out there. I am in the process of figuring out how to write to the ROM space, and Domains are a big part of that. 

Unmodified, my MP will reboot when I try to write the ROM (wich I need to do to program the Flash ROM area). Setting the domains to allow write access is not good enough and the MP still reboots, so I was suspicious if there is a hardware circuit that triggers the reset, but using Hammer, writing the ROM works just fine.

So my next approach is to disable the entire MMU adn caching (which is a bit complicated from within user code), and see if I can write to the ROM that way. Next test would be temporarily modifying the translation tables.

Anyway, good pointers. Maybe I should see if I can get some info from Walter Smith directly.

 - Matthias


More information about the NewtonTalk mailing list