9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] qemu kernel for arm64, detected memory
@ 2024-01-07 12:07 cosarara
  2024-01-07 14:23 ` Jacob Moody
  0 siblings, 1 reply; 3+ messages in thread
From: cosarara @ 2024-01-07 12:07 UTC (permalink / raw)
  To: 9front

Running 9front on qemu-system-aarch64 (trying to follow the directions in commit dd79854239a8c):

qemu-system-aarch64 -M virt-2.12,gic-version=3 \
                     -cpu cortex-a57 -m 4G -smp 4 \
                     -bios u-boot/u-boot.bin \
                     -drive file=9front-10277.arm64.qcow2,if=none,id=disk \
                     -device virtio-blk-pci-non-transitional,drive=disk \
                     -nographic

u-boot correctly reports:

>   DRAM:  4 GiB

But then plan9:

>   ## Transferring control to Plan 9 (at address 40100000) ...
>   127 holes free
>   0x404c4000 0x429bd000 38768640
>   38768640 bytes free
>
>   Plan 9
>   timer frequency 62500000 Hz
>   cpu0: 1000MHz QEMU
>   127M memory: 41M kernel data, 86M user, 455M swap
>   [...]
>   cirno# cat /dev/swap
>   129220608 memory
>   4096 pagesize
>   9465 kernel
>   2993/22083 user
>   0/94644 swap
>   1556/22083 reclaim
>   1816176/1966560/36545820 kernel malloc
>   0/0/36545820 kernel draw
>   768/65568/16777216 kernel secret

So it seems it does not detect the full amount. I don't know if this is a know bug in the kernel.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9front] qemu kernel for arm64, detected memory
  2024-01-07 12:07 [9front] qemu kernel for arm64, detected memory cosarara
@ 2024-01-07 14:23 ` Jacob Moody
  2024-01-07 15:47   ` cosarara
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Moody @ 2024-01-07 14:23 UTC (permalink / raw)
  To: 9front

On 1/7/24 06:07, cosarara wrote:
> Running 9front on qemu-system-aarch64 (trying to follow the directions in commit dd79854239a8c):
> 
> qemu-system-aarch64 -M virt-2.12,gic-version=3 \
>                      -cpu cortex-a57 -m 4G -smp 4 \
>                      -bios u-boot/u-boot.bin \
>                      -drive file=9front-10277.arm64.qcow2,if=none,id=disk \
>                      -device virtio-blk-pci-non-transitional,drive=disk \
>                      -nographic
> 
> u-boot correctly reports:
> 
>>   DRAM:  4 GiB
> 
> But then plan9:
> 
>>   ## Transferring control to Plan 9 (at address 40100000) ...
>>   127 holes free
>>   0x404c4000 0x429bd000 38768640
>>   38768640 bytes free
>>
>>   Plan 9
>>   timer frequency 62500000 Hz
>>   cpu0: 1000MHz QEMU
>>   127M memory: 41M kernel data, 86M user, 455M swap
>>   [...]
>>   cirno# cat /dev/swap
>>   129220608 memory
>>   4096 pagesize
>>   9465 kernel
>>   2993/22083 user
>>   0/94644 swap
>>   1556/22083 reclaim
>>   1816176/1966560/36545820 kernel malloc
>>   0/0/36545820 kernel draw
>>   768/65568/16777216 kernel secret
> 
> So it seems it does not detect the full amount. I don't know if this is a know bug in the kernel.
> 
> 
> 

This is a known issue. You can set *maxmem in plan9.ini to get it to use more memory.

Thanks,
moody

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9front] qemu kernel for arm64, detected memory
  2024-01-07 14:23 ` Jacob Moody
@ 2024-01-07 15:47   ` cosarara
  0 siblings, 0 replies; 3+ messages in thread
From: cosarara @ 2024-01-07 15:47 UTC (permalink / raw)
  To: 9front

On 7/1/24 15:23, Jacob Moody wrote:
> This is a known issue. You can set *maxmem in plan9.ini to get it to use more memory.
>
> Thanks,
> moody

Thanks moody. It took me a while to figure it out (it's not easy to edit plan9.ini when its contents make the kernel panic!), so I'm leaving this extra info here for the next person with the same question:

The value for *maxmem (the * is important) for this machine should be the number of bytes = 1GiB + <desired memory>. So the default is 1 * GiB + 128 * MiB = 0x48000000 for 128MiB, and for 4 GiB it should be *maxmem=0x140000000.

cosa


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-07 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-07 12:07 [9front] qemu kernel for arm64, detected memory cosarara
2024-01-07 14:23 ` Jacob Moody
2024-01-07 15:47   ` cosarara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).