Skip to contentSkip to conversation

VersatilePB bug (or undefined behaviour)

Qemu-devel Marc Marí 2 participants 2 messages Jan 27, 2015

lore
Share & tools
lore

Marc Marí

author
#0 lore raw

Hi

I was investigating a bit with a versatilepb machine, and I was trying to boot a Linux system with a root file system through NFS. It worked with Linux 3.2, but it didn't work with any later Linux version. This was the error:

[    0.594471] smc91x: not found (-16).
[    0.595555] smc91x: probe of smc91x.0 failed with error -16

(Error -16 is EBUSY).

I debugged the error, and I found that the region was being marked as "System RAM".

The problem was mine, I specified (because I did not change if from previous boots) 1G as memory for the Versatile machine, which only has 256 MB of RAM

Should this be a bug, or is undefined behaviour? I think it is not very difficult to check for the memory the user requests so it can be limited to 256 MB and issue a warning if it is exceeded.

Thanks
Marc

#1 lore raw
Quoted 7 lines · Marc Marí

The problem was mine, I specified (because I did not change if from previous boots) 1G as memory for the Versatile machine, which only has 256 MB of RAM

Should this be a bug, or is undefined behaviour? I think it is not very difficult to check for the memory the user requests so it can be limited to 256 MB and issue a warning if it is exceeded.

It's user error to specify more RAM than the board can handle. I tried some years ago to get a patch added which allowed boards to say how much RAM they could deal with so we could report this more helpfully, but it got shot down as insufficiently generic (not dealing with NUMA, weird boards with memory holes, boards that only want you to add RAM in 512K chunks, etc, etc) and I gave up.

-- PMM