All of lore.kernel.org
 help / color / mirror / Atom feed
From: gshan <gshan@alcatel-lucent.com>
To: linux-kernel@vger.kernel.org
Subject: How to include sysmap in 2.6 kernel image
Date: Wed, 18 Jul 2007 16:49:30 +0800	[thread overview]
Message-ID: <469DD41A.10506@alcatel-lucent.com> (raw)

Hey Guys,

Recently, I'm working on xmon. The xmon needs sysmap for symbol lookup, 
however I don't know how to include sysmap to uImage. I looked the 
kernel source code for a while and found the kernel image need contain 
struct bi_record *rec. Everybody knows how to include this?

arch/ppc/kernel/setup.c::parse_bootinfo()

void parse_bootinfo(struct bi_record *rec)
{
       if (rec == NULL || rec->tag != BI_FIRST)
               return;
       while (rec->tag != BI_LAST) {
               ulong *data = rec->data;

               printk(KERN_INFO "%s:*********** 0x%08lx\n", 
__FUNCTION__, rec->tag);

               switch (rec->tag) {
               case BI_CMD_LINE:
                       strlcpy(cmd_line, (void *)data, sizeof(cmd_line));
                       break;
               case BI_SYSMAP:
                       sysmap = (char *)((data[0] >= (KERNELBASE)) ? 
data[0] :
                                         (data[0]+KERNELBASE));
                       sysmap_size = data[1];
                       break;
#ifdef CONFIG_BLK_DEV_INITRD
               case BI_INITRD:
                       initrd_start = data[0] + KERNELBASE;
                       initrd_end = data[0] + data[1] + KERNELBASE;
                       break;
#endif /* CONFIG_BLK_DEV_INITRD */
#ifdef CONFIG_PPC_MULTIPLATFORM
               case BI_MACHTYPE:
                       _machine = data[0];
                       break;
#endif
               case BI_MEMSIZE:
                       boot_mem_size = data[0];
                       break;
               }
               rec = (struct bi_record *)((ulong)rec + rec->size);
       }
}


Thanks,
Gavin

                 reply	other threads:[~2007-07-18  8:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=469DD41A.10506@alcatel-lucent.com \
    --to=gshan@alcatel-lucent.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.