[OpenBIOS] Starting linux aint much easy ?

Winter Jörg joerg.winter at disch-gmbh.de
Tue Feb 15 18:27:57 CET 2000


> I'm not sure how far you've gotten since saturday, but it sound to me like
> you are almost there.  I have set up a system to boot Linux from a flash. 
> From your descriptions, I believe you are on the right track.  Before
> jumping to Linux at 0x1000 for .....
	Not far!
	I still have seveere trouble in starting the kernel ...
	from the firmware/init/main.c I am loading a vmlinux (1.2megs,
uncompressed) image into my memory at 0x100000.

	I found out that the code in head.S is at offset 0x1000 inside the
image. So I jump to 0x101000. That works. 
	I modified  the file:

	kernel/head.S:   to notify me if I reached the head code:


	/* this is my dummycode ... to see if kernel starts 
		.asciz  "This is the kernel image entry point\n"   << I used
this to verify that I dont load garbage into RAM ...
	Fallback from Protected mode into Realmode, CLR PE1
	*/

		movl	%cr0,%eax
		andl	$0xfffffffe,%eax
		movl	%eax,%cr0
		jmp	flush
	flush:
		mov	$0x3f8,%dx	//here i give a char out to the uart
(cause I dont have anything else to talk)
		mov	$0x59,%al
		out	%al ,%dx

	>>>>> until here everything works fine. but then ...

		cld
		movl $(__KERNEL_DS),%eax
		movl %ax,%ds
		movl %ax,%es
		movl %ax,%fs
		movl %ax,%gs
	#ifdef __SMP__
		orw %bx,%bx
		jz 1f

...
...
a bit later it should do: (same file)
	xorl %eax,%eax
	lldt %ax
	cld			# gcc2 wants the direction flag cleared at
all times
	call SYMBOL_NAME(start_kernel)
L6:
	jmp L6			# main should never return here, but
				# just in case, we know what happens.

...
therefore I expected to see the message i have put in
/usr/src/linux/init/main.c : start_kernel(void)

asmlinkage void __init start_kernel(void)
{
	char * command_line;
	int  i;
#ifdef __SMP__
	static int boot_cpu = 1;
	/* "current" has been set up, we need to load it now */
	if (!boot_cpu)
		initialize_secondary();
	boot_cpu = 0;
#endif

/*
 * Interrupts are still disabled. Do necessary setups, then
 * enable them
 say that were here already ...
 */
	outb(0x58,0x03f8); 
	for (i=0; i<0x0fff; i++);
	printk(linux_banner);

....
....


but somewhere inbetween the machine stops. I cannot see my second char on
the uart. I dont have an in-circuit debugger
and since I´m not the prophet I dont know why and where it crashes ...

Any ideas on that ??



btw. sorry for the lots of code i sent, but like that it was easier to show
where I got stuck ...

greetings, Jake.



-
To unsubscribe: send mail to majordomo at freiburg.linux.de
with 'unsubscribe openbios' in the body of the message



More information about the openbios mailing list