OF: fdt: Ignoring memory range 0x40000000 - 0x80000000

Hello.

The project that I've been working on since 2 years is to enable KVM (with the support of libvirt and virt-manager) on a recent version of Linux and of its kernel on the old but still nice ARM Chromebook model xe303c12. My goal is to virtualize FreeBSD 13.2 for armV7. I've almost completed the project. At today I'm using Ubuntu 22.04 (but it works also with Devuan 5) ; KVM is enabled ; libvirt 9.7.0 and virt-manager are working great. And I've almost been able to virtualize FreeBSD. Almost because I've found a problem that I need to fix or the whole project will die. Ubuntu recognizes only 1 GB of memory free,but the ARM Chromebook has 2 GB of memory soldered to the mobo. So,1 GB of memory has been lost during the transition from the first project I tried to enable KVM with an old kernel (and ubuntu) version,that you can find here :

and my project,which uses a more recent kernel version (5.4) and ubuntu version (22.04). I think that when I have recompiled the kernel,I've lost some kernel entries that are enabled on the 3.13 kernel used by the developers at the Virtual Open System. Well,I have no idea about which entries my kernel config are missing.

I have checked the available memory for the OS giving the command :

# free -m

If I don't recover 1 GB of memory,I can't virtualize FreeBSD,because only 1 GB is a very small amount of memory to be able to run the host and the guest OS.

So,can someone help me to find which kernel entries I should add to have all the 2 GB of memory available ?

Virtual Open System offers it's own kernel config file,that I have saved here :

https://pastebin.ubuntu.com/p/j4B54TChKD/

using their kernel config file I see that I have a total of 2 GB of memory available (I spend 400 mb to load Linux,so only 600 remains ; it's not good. In Fact I get a lot of qemu crashes), but If I use my config file the OS starts with only 1 GB.

I want also share two kernel config files :

  1. the kernel 3.13 dmesg log file where 2 GB is recognized,here :

https://pastebin.ubuntu.com/p/gsw9SM4zY3/

  1. the kernel 5.4 dmesg log file where only 1 GB is recognized,here :

https://pastebin.ubuntu.com/p/W6Mgj4jGg2/

I've compared the dmesg logs (kernel 3.13 vs kernel 5.4 config files) and I think this is the reason why I have only 1 GB of memory available :

OF: fdt: Ignoring memory range 0x40000000 - 0x80000000

This line is not present on the kernel 3.13 dmesg log file,but it is on the kernel 5.4 dmesg log file. The dtb file generation seems involved. What do you think ?

I'm trying to understand what to do to fix this problem. Can you give me some suggestions ? thanks.

Hmmm........yeah........I've heard about this one before somewhere.

I think it's a known problem on some hardware and a patch was issued for it.

Is this your problem do you think?
https://lore.kernel.org/lkml/1411466349-14166-1-git-send-email-srinivas.kandagatla@linaro.org/

1 Like

Certainly this piece of kernel code is related.
Maybe the diag message is a consequence (not the cause) of the only 1GB RAM?

Such a problem existed on Raspberry.

Do you have the latest firmware on your Chromebook?

1 Like

I've been very lucky. The fix is very easy. It's just enough to do :

make zImage uImage LOADADDR=0x42004000

and boom :

root@devuan-bunsen:~# free -m
 
              total        used        free      shared  buff/cache   available
Mem:            2009         220        1602           0         247        1789
Swap:              0           0           0

Now FreeBSD can be virtualized without problems.
3 Likes

nice, how did you discover that ?

A system admin gave to me a suggestion that he told that it never worked for him,but I tried it,anyway,because I think that I should never leave anything unturned.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.