Please make K2 Linux bootable without PeeMON again
Hi there,
This change in linuxppc_2_4_devel:
[email protected], 2001-11-19 09:10:26-07:00, [email protected]
Remove register magic from platforms which use 'simple'. A few new platforms forgot parse_bootinfo(find_bootinfo()) as well.
arch/ppc/platforms/k2_setup.c
1.17 01/11/19 09:10:26 [email protected] +0 -15 Remove cmd_line and initrd register magic.
is a problem for me. On the K2 I do not use zImage or the braindead PeeMON firmware that it assumes, instead I load vmlinux directly by occult. I need to continue to able to do this, and I need to keep the interface to vmlinux register-based so that I can load vmlinux into memory by occult, put the right values in the right registers, and jump to it. A pointer to bi_recs in a register is fine, but looking for bi_recs in the magic location isn't. (The kernel has already been loaded into memory by occult when I get to it, and without the original ELF header or System.map I cannot determine where will it look for bi_recs in find_bootinfo.)
The patch below makes the K2 vmlinux expect a pointer to bi_recs in R3 like I do on the Adirondack and makes the "simple" zImage goo pass a pointer to its magic bi_recs in R3.
Please either apply this patch or give me some other way to boot Linux on the K2 without PeeMON. This is the public tree in the free world and it is not acceptable to force people to use PeeMON, the most developer-hostile ROM monitor produced by the sickest minds ever.
MS
(Speaking on my own personal behalf only, not on my employer's.)
arch/ppc/boot/common/misc-simple.c +4 -1
@@ -57,9 +57,10 @@extern unsigned long serial_init (int chan,void *ignored);extern void setup_legacy (void ); -void +struct bootinfo *decompress_kernel (unsigned long load_addr,int num_words,unsigned long cksum) { +struct bootinfo *birecs;int timer =0 ;extern unsigned long start;
@@ -158,6 +159,7 @@ rec = (struct bi_record *)_ALIGN ((unsigned long )(zimage_size) + (1 <<20 ) -1 , (1 <<20 )); + birecs = rec; rec->tag =BI_FIRST ; rec->size =sizeof (struct bi_record );
@@ -183,4 +185,5 @@ rec = (struct bi_record *)((unsigned long )rec + rec->size); }puts ("Now booting the kernel\n" ); +return (birecs); }
arch/ppc/platforms/k2.h +4 -4
@@ -1,5 +1,5 @@/* -* arch/ppc/kernel/k2.h +* arch/ppc/platforms/k2.h * * Definitions for SBS K2 board support *
@@ -13,8 +13,8 @@* option) any later version. */ -#ifndef __PPC_KERNEL_K2_H -#define __PPC_KERNEL_K2_H +#ifndef __PPC_PLATFORMS_K2_H +#define __PPC_PLATFORMS_K2_H/* * SBS K2 definitions
@@ -81,4 +81,4 @@#define K2_SYS_SLOT_MASK 0x08 -#endif /* __PPC_KERNEL_K2_H */ +#endif /* __PPC_PLATFORMS_K2_H */
arch/ppc/platforms/k2_pci.c +1 -1
@@ -1,5 +1,5 @@/* -* arch/ppc/kernel/k2_pci.c +* arch/ppc/platforms/k2_pci.c * * PCI support for SBS K2 *
arch/ppc/platforms/k2_setup.c +2 -2
@@ -1,5 +1,5 @@/* -* arch/ppc/kernel/k2_setup.c +* arch/ppc/platforms/k2_setup.c * * Board setup routines for SBS K2 *
@@ -346,7 +346,7 @@void __init platform_init (unsigned long r3,unsigned long r4,unsigned long r5,unsigned long r6,unsigned long r7) { -parse_bootinfo (find_bootinfo ()); +parse_bootinfo ((struct bootinfo *) (r3 +KERNELBASE )); isa_io_base =K2_ISA_IO_BASE ; isa_mem_base =K2_ISA_MEM_BASE ;
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 8 lines · Michael Sokolov
[email protected], 2001-11-19 09:10:26-07:00, [email protected]
Remove register magic from platforms which use 'simple'. A few new platforms forgot parse_bootinfo(find_bootinfo()) as well.
arch/ppc/platforms/k2_setup.c
1.17 01/11/19 09:10:26 [email protected] +0 -15 Removecmd_lineand initrd register magic.
Quoted 9 lines
is a problem for me. On the K2 I do not use zImage or the braindead PeeMON firmware that it assumes, instead I load vmlinux directly by occult. I need to continue to able to do this, and I need to keep the interface to vmlinux register-based so that I can load vmlinux into memory by occult, put the right values in the right registers, and jump to it. A pointer to
bi_recsin a register is fine, but looking forbi_recsin the magic location isn't. (The kernel has already been loaded into memory by occult when I get to it, and without the original ELF header or System.map I cannot determine where will it look forbi_recsinfind_bootinfo.)
Er, why can't you find the magic location for the bi_recs and set that as well as the other registers you need to?
Quoted 3 lines
The patch below makes the K2 vmlinux expect a pointer to
bi_recsin R3 like I do on the Adirondack and makes the "simple" zImage goo pass a pointer to its magicbi_recsin R3.
And breaks all of the other ports which use 'simple' and expect bi_recs in the 'normal' place. For now I'd much rather add back in the register checks. For 2.5 we can agree on a less magical and more predictable location. Would somewhere around the end of memory work for you?
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/