All of lore.kernel.org
 help / color / mirror / Atom feed
* How to include sysmap in 2.6 kernel image
@ 2007-07-18  8:49 gshan
  0 siblings, 0 replies; only message in thread
From: gshan @ 2007-07-18  8:49 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-18  8:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-18  8:49 How to include sysmap in 2.6 kernel image gshan

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.