[OpenBIOS] Mixing 16 and 32 bits code

Ollie Lho ollie at sis.com.tw
Wed May 17 20:16:23 CEST 2000

	It seems that you made some mistake in mixing 16
and 32 bits code in the intel_start32.S:

	movw	%cs, %eax
	movw	%eax, %es

        xor  %eax, %eax
        mov  %eax, %cr3    /* Invalidate TLB*/

	.byte 0x66 /* prefix */
	.byte 0x26
	.byte 0x0f, 0x01, 0x16 /* lgdt [es:offset]*/
	.word 0x02	/* offset in segment */

	movl	%cr0, %eax
        andl    $0x7FFAFFD1, %eax    /* PG,AM,WP,NE,TS,EM,MP = 0*/
	orl	$1, %eax
	movl	%eax, %cr0
	ljmp	$0x10, $.Lprotected

Before _realstart there was a .code16 directive, so it should be in 16
bits mode, so how could those 32 bits (long) operation works ??

This bugs seems breaks gas 2.9.5 also.

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