gdb over serial by Lubomir Kundrak and cleaned-up/updated by me (phcoder)
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
This commit is contained in:
parent
581ffa8a24
commit
66d6a7937b
9 changed files with 893 additions and 0 deletions
|
@ -117,6 +117,12 @@ gdt:
|
|||
gdtdesc:
|
||||
.word 0x27 /* limit */
|
||||
.long gdt /* addr */
|
||||
realidt:
|
||||
.word 0
|
||||
.long 0
|
||||
protidt:
|
||||
.word 0
|
||||
.long 0
|
||||
|
||||
/*
|
||||
* These next two routines, "real_to_prot" and "prot_to_real" are structured
|
||||
|
@ -168,6 +174,9 @@ protcseg:
|
|||
/* zero %eax */
|
||||
xorl %eax, %eax
|
||||
|
||||
sidt realidt
|
||||
lidt protidt
|
||||
|
||||
/* return on the old (or initialized) stack! */
|
||||
ret
|
||||
/*
|
||||
|
@ -194,6 +203,9 @@ prot_to_real:
|
|||
/* just in case, set GDT */
|
||||
lgdt gdtdesc
|
||||
|
||||
sidt protidt
|
||||
lidt realidt
|
||||
|
||||
/* save the protected mode stack */
|
||||
movl %esp, %eax
|
||||
movl %eax, protstack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue