[pxc] Kernel parameter "mem=xxM" problems...
Alessandro Rubini
rubini@gnu.org
Tue, 18 Feb 2003 07:39:50 +0100
> Someone reported to me that the kernel parameter they added does not
> seem to work.
>
> The machine has 256Meg of RAM, and we added a "mem=240M" line.
>
> The machine failed to boot! (I'm using RedHat8 standard with grub
> bootloader)
Interesting. I'm using grub on most of my computers too, but I have
never had any problem.
> This problem seems only to occur on his hardware, and I have not been
> able to reproduce it.
I have no idea about what is happening there. Moreso because grub has
the horrible habit to pass a "mem=" parameter itself, if not
specifically disabled (I don't know if redhat disables it, although
there are very good reasons to do that -- but the grub maintainer
won't make that the default because he claims linux is bugged).
> The error with wich it fails to boot is similar to the error when you
> add a mem= line that is more than the actual memory...
It would be interesting to see what /proc/iomem says when the
system boots normally. And also /proc/cmdline, to know if grub is
adding the mem= itself or not.
Hmm... is that user having an ISA hole configured in his own system?
> We eventually for it to run specifying "mem=60M"... as if the OS/boot
> loader thinks that the machine only has 64M of physical memory.
Ok. Then no ISA hole.
> Also another point is that I have noticed that on RedHat8 my usual 4
> megs less (specifying mem=60M for a 64Meg system) is too little, and I
> have to specify 5-10 megs for me to use the pxc.o to actually be able to
> do an "mmap"
Again, I'd like to see what /proc/iomem is saying. Redhat kernels used to
(and probably still use to) have a different management of the
mem= parameter. So if you say mem=60M it's taken as 60 useable megs,
thus extending to 60M+384k . That's why seeing /proc/iomem would
be interesting.
> PS: Is there no better way to configure the mem=kernel thing?
With a vanilla kernel, not. You might use the bigphysarea patch, and
fix pxc to use that mechanism. With bigphysarea you preallocate a
buffer in low memory, leaving top-of-memory management to the standard
mechanisms.
Or pxc can be fixed to have a smarter management of its DMA buffer, so
vmalloc can be used. It's a boring task, though, and it's not in my
todo list, unless someone really needs it.
> I want to create a bootable installation CD that will automate an
> install, and currently people have to type "install mem=60M" on the
> installation bootup screen and I then later in the installation look
> at /mnt/sysimage/proc/cmdline to get the parameters and then to
> write them to the /etc/lilo.conf or /etc/grub.conf
Yes, not completely straightforward. Well, if you install your kernel
you might use bigphysarea (but pxc must be modified to use that
mechanism).
Last time I heard about that patch, it was at
http://frmb.home.cern.ch/frmb/download/bigphysarea-2.4.18.patch
/alessandro
--
Alessandro Rubini, free software developer.
Device drivers, embedded systems, courses.
http://ar.linux.it/