[U-Boot-Users] bd_info structure for kernel different from bd_info structure for u-boot
Jerry Walden
jwalden at digitalatlantic.com
Tue Mar 18 22:11:38 CET 2003
Greetings:
In the DENX PPCBoot and Linux Guide I have found an FAQ that applies directy
to my problem
it is as follows:
-------------------------------------------------------------------
Q:
I am using PPCBoot version X (X >= 1.0.5) with a Linux kernel version Y (Y <
2.4.5-pre5), but the last message I see is
Uncompressing Kernel Image ... OK
Then the system hangs.
-------------------------------------------------------------------
A:
Most probably you pass bad parameters to the Linux kernel. There are several
possible reasons:
Bad definition of the bd_info structure
You must make sure that your machine specific header file (for instance
include/asm-ppc/tqm8xx.h) includes the same definition of the Board
Information structure as we define in include/ppcboot.h, and make sure that
your definition of IMAP_ADDR uses the same value as your PPCBoot
configuration in CFG_IMMR.
-----------------------------------------------------------------------
Okay - so I looked at the Board information structure for the kernel and it
is as follows:
in
/opt/hardhat/devkit/lsp/ibm-walnut-ppc_405/linux-2.4.18_mvl30/arch/ppc/platf
orms/walnut.h
typedef struct board_info {
unsigned char bi_s_version[4]; /* Version of this structure */
unsigned char bi_r_version[30]; /* Version of the IBM ROM */
unsigned int bi_memsize; /* DRAM installed, in bytes */
unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */
unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
unsigned int bi_intfreq; /* Processor speed, in Hz */
unsigned int bi_busfreq; /* PLB Bus speed, in Hz */
unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
} bd_t;
And - I looked the the Board information structure for u-boot and it is as
follows:
in /home/DA/u-boot-0.2.0/include/asm-ppc/u-boot.h
typedef struct bd_info {
unsigned long bi_memstart; /* start of DRAM memory */
unsigned long bi_memsize; /* size of DRAM memory in bytes */
unsigned long bi_flashstart; /* start of FLASH memory */
unsigned long bi_flashsize; /* size of FLASH memory */
unsigned long bi_flashoffset; /* reserved area for startup monitor */
unsigned long bi_sramstart; /* start of SRAM memory */
unsigned long bi_sramsize; /* size of SRAM memory */
unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */
unsigned long bi_ip_addr; /* IP Address */
unsigned char bi_enetaddr[6]; /* Ethernet adress */
unsigned short bi_ethspeed; /* Ethernet speed in Mbps */
unsigned long bi_intfreq; /* Internal Freq, in MHz */
unsigned long bi_busfreq; /* Bus Freq, in MHz */
unsigned long bi_baudrate; /* Console Baudrate */
unsigned char bi_s_version[4]; /* Version of this structure */
unsigned char bi_r_version[32]; /* Version of the ROM (IBM) */
unsigned int bi_procfreq; /* CPU (Internal) Freq, in Hz */
unsigned int bi_plb_busfreq; /* PLB Bus speed, in Hz */
unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
} bd_t;
They are obviously different - the question is, in order to make them the
same how do I reconcile
the differences?
Do I add to the u-boot structure, or take away from the kernel structure, or
is there a better way?
Why is there such a difference in these files? Somehow I would assume that
u-boot would
track along with the kernel, although this is probably an invalid
assumption.
I have also discovered that I can set a breakpoint at "panic", and the BDI
gets to that breakpoint
while the kernel is doing an MMU_init. The specific subroutine that caused
the panic is "mem_pieces_remove".
Does anyone have any ideas why a kernel panic is getting thrown at this
juncture?
Kindest Regards,
Jerry Walden
More information about the U-Boot
mailing list