* checking atags for boot parameters
@ 2011-06-21 14:20 Christopher Harvey
2011-06-21 17:14 ` Mulyadi Santosa
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Harvey @ 2011-06-21 14:20 UTC (permalink / raw)
To: kernelnewbies
I'm suspicious that the bootloader I'm using isn't passing atags to the
kernel properly.
I'm getting a prefetch exception right after the "uncompressing
linux....done" message, does it make sense that this could happen
because mem=128M isn't getting passed properly?
Basically what I want to do is have the kernel print out the boot
parameters along with the "uncompressing linux" message.
thanks,
Christopher
^ permalink raw reply [flat|nested] 4+ messages in thread
* checking atags for boot parameters
2011-06-21 14:20 checking atags for boot parameters Christopher Harvey
@ 2011-06-21 17:14 ` Mulyadi Santosa
2011-06-21 18:24 ` Christopher Harvey
0 siblings, 1 reply; 4+ messages in thread
From: Mulyadi Santosa @ 2011-06-21 17:14 UTC (permalink / raw)
To: kernelnewbies
Hi Christ... :)
On Tue, Jun 21, 2011 at 21:20, Christopher Harvey
<chris@basementcode.com> wrote:
> ?I'm suspicious that the bootloader I'm using isn't passing atags to the
> ?kernel properly.
which bootloader?
> ?I'm getting a prefetch exception right after the "uncompressing
> ?linux....done" message, does it make sense that this could happen
> ?because mem=128M isn't getting passed properly?
uhm, fairly unlikely for me.... must be something else... could you
tell us which arch it is and which kernel version (along with patches
from certain tree, if any) that yield that error message?
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* checking atags for boot parameters
2011-06-21 17:14 ` Mulyadi Santosa
@ 2011-06-21 18:24 ` Christopher Harvey
2011-06-30 23:53 ` Gavin Guo
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Harvey @ 2011-06-21 18:24 UTC (permalink / raw)
To: kernelnewbies
On Wed, 22 Jun 2011 00:14:50 +0700, Mulyadi Santosa
<mulyadi.santosa@gmail.com> wrote:
> Hi Christ... :)
It's Chris.
>
> On Tue, Jun 21, 2011 at 21:20, Christopher Harvey
> <chris@basementcode.com> wrote:
>> ?I'm suspicious that the bootloader I'm using isn't passing atags to
>> the
>> ?kernel properly.
>
> which bootloader?
uboot
>
>> ?I'm getting a prefetch exception right after the "uncompressing
>> ?linux....done" message, does it make sense that this could happen
>> ?because mem=128M isn't getting passed properly?
>
> uhm, fairly unlikely for me.... must be something else... could you
> tell us which arch it is and which kernel version (along with patches
> from certain tree, if any) that yield that error message?
It's not an error message, but with difficulty I was able to trace some
of the code and it ends up in a prefetch exception handler. I am not
able to find out from where however, and the line stepping is a bit
sketchy. No major patches to the kernel, and it runs in QEMU without
error. Adding uboot to QEMU then booting the same kernel yields the
problems.
It would be nice to find out what physical address the kernel is
uncompressed to as well, I'm as of yet unable to properly trace after
decompression.
-C
^ permalink raw reply [flat|nested] 4+ messages in thread
* checking atags for boot parameters
2011-06-21 18:24 ` Christopher Harvey
@ 2011-06-30 23:53 ` Gavin Guo
0 siblings, 0 replies; 4+ messages in thread
From: Gavin Guo @ 2011-06-30 23:53 UTC (permalink / raw)
To: kernelnewbies
> ?It's not an error message, but with difficulty I was able to trace some
> ?of the code and it ends up in a prefetch exception handler. I am not
> ?able to find out from where however, and the line stepping is a bit
> ?sketchy. No major patches to the kernel, and it runs in QEMU without
> ?error. Adding uboot to QEMU then booting the same kernel yields the
> ?problems.
To see what's happened, you can check the register about exceptional
virtual address in your platform, then up to the instruction caused
the exception. As to the atags parameter, searching MACHINE_START
under the platform you use, then the struct member, named boot_params,
below the MACHINE_START should be found. According to the assigned
value of boot_params, the address which uboot stick the parameter in
can be examine to see if the value is the same as the one assigned in
uboot.
> ?It would be nice to find out what physical address the kernel is
> ?uncompressed to as well, I'm as of yet unable to properly trace after
> ?decompression.
Referring to what I replied in another thread:
You can see that in /arch/arm/kernel/head.S, the Kernel startup entry
point is put in "ENTRY(stext)" above that is a line .section
".text.head", "ax" which says that the Kernel startup code is
allocated in .text.head section. And also you can find the following
at the beginning of the /arch/arm/kernel/vmlinux.lds.S:
ENTRY(stext)
#ifndef __ARMEB__
jiffies = jiffies_64;
#else
jiffies = jiffies_64 + 4;
#endif
SECTIONS
{
#ifdef CONFIG_XIP_KERNEL
. = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
#else
. = PAGE_OFFSET + TEXT_OFFSET;
#endif
.text.head : {
_stext = .;
_sinittext = .;
*(.text.head)
}
Obviously, ".text.head" section begins with TEXT_OFFSET + PAGE_OFFSET.
So, what is TEXT_OFFSET? It is defined in arch/arm/Makefile as
TEXT_OFFSET := $(textofs-y) where you can also find that textofs-y is
defined as "textofs-y := 0x00008000". PAGE_OFFSET is defined
under configs/bcmring_defconfig:CONFIG_PAGE_OFFSET=0xC0000000, here
bcmring_defconfig is just an example. You can find other defconfig
also has CONFIG_PAGE_OFFSET too. The other trick is objdumpping the
vmlinux under kernel root, then you can see the kernel startup address
in the beginning of the first line.
Gavin Guo
OS kernel engineer
Andestech
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-30 23:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 14:20 checking atags for boot parameters Christopher Harvey
2011-06-21 17:14 ` Mulyadi Santosa
2011-06-21 18:24 ` Christopher Harvey
2011-06-30 23:53 ` Gavin Guo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.