Raspberry Pi 4

Programming, for all ages and all languages.
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Raspberry Pi 4

Post by Octocontrabass »

A lot of it applies, but the specifics for setting up AArch64 paging are different. In AArch64, page tables have at least three levels, and the table at each level will fill one whole page (except the top level, which may be smaller). If you're still using 4kB pages, your page tables will have at least four levels.

If you've set up paging on x64 before, this will all look very familiar.

Here's a link to a manual that covers AArch64 paging.
zap8600
Member
Member
Posts: 195
Joined: Tue Nov 02, 2021 11:26 am
Libera.chat IRC: zap8600

Re: Raspberry Pi 4

Post by zap8600 »

Hi. I think I will do so because it seem like I will be able to be faster.
zap8600
Member
Member
Posts: 195
Joined: Tue Nov 02, 2021 11:26 am
Libera.chat IRC: zap8600

Re: Raspberry Pi 4

Post by zap8600 »

Hi. So which memory model do I use? Application, System, or Virtual Memory?
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Raspberry Pi 4

Post by Octocontrabass »

I'm not sure what you're asking. The ARM memory model is part of the ARM architecture, you can't not use it.

If you're looking for information about the page tables, that's covered in chapter D5, "The AArch64 Virtual Memory System Architecture".
zap8600
Member
Member
Posts: 195
Joined: Tue Nov 02, 2021 11:26 am
Libera.chat IRC: zap8600

Re: Raspberry Pi 4

Post by zap8600 »

Hi. This is a little side question. How do I fix the self test for gcc 7.1.0? It gives me the error "nul: invalid argument". How do I fix this?
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: Raspberry Pi 4

Post by Octocontrabass »

You'll have to explain in more detail what you're doing when you get that error.
User avatar
zaval
Member
Member
Posts: 656
Joined: Fri Feb 17, 2017 4:01 pm
Location: Ukraine, Bachmut
Contact:

Re: Raspberry Pi 4

Post by zaval »

Octocontrabas wrote: If you're still using 4kB pages, your page tables will have at least four levels.
not necessarily. if you don't need all the 49 bit address space (both parts combined), you can shrink one level, by appropriate setting those SZ fields and making TTBRx point to the level 1 page table. then you have 512GB+512GB address space, which is not that small, but you have 3-level translation. I do exactly this. :)
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).
Post Reply