O.k. I am making more headway with the P4. The problem
is not one of switching to protected mode. I can do a near
jump and I am in 16 bit protected mode. The problem is
one of segment registers. If I attempt to load a segment
register I lose control of the cpu.
In particular, with the code segment below I see 'f' but not 'g'.
Well at least this problem is narrowing down.
Eric
data32 lgdt %cs:EXT(gdtptr_offset)
TTYS0_INLINE_TX_CHAR($'c')
movw $0x18, %ax
movw %ax, %ss
TTYS0_INLINE_TX_CHAR($'d')
movw $0x18, %ax
movw %ax, %ds
movw %ax, %es
movw %ax, %fs
movw %ax, %gs
TTYS0_INLINE_TX_CHAR($'e')
movl %cr0, %eax
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
orl $0x00000001, %eax /* PE = 1 */
movl %eax, %cr0
/* Now do a jump to reset the prefetch queue */
jmp 1f
1:
TTYS0_INLINE_TX_CHAR($'f')
xorw %ax, %ax
movw %ax, %ss
TTYS0_INLINE_TX_CHAR($'g')
movw $0x18, %ax
movw %ax, %ss
TTYS0_INLINE_TX_CHAR($'h')
movw $0x18, %ax
movw %ax, %ds
movw %ax, %es
movw %ax, %fs
movw %ax, %gs
TTYS0_INLINE_TX_CHAR($'i')