Change version numbers, add stop floppy feature, fix a few assembly bugs.
This commit is contained in:
parent
9a77866af3
commit
7f437f37f3
1 changed files with 25 additions and 3 deletions
|
@ -63,7 +63,7 @@ ENTRY(start)
|
||||||
VARIABLE(install_partition)
|
VARIABLE(install_partition)
|
||||||
.long 0xFF00FF
|
.long 0xFF00FF
|
||||||
VARIABLE(version_string)
|
VARIABLE(version_string)
|
||||||
.string "0.4"
|
.string "0.5"
|
||||||
VARIABLE(config_file)
|
VARIABLE(config_file)
|
||||||
#ifndef CONFIG_FILE_ASM
|
#ifndef CONFIG_FILE_ASM
|
||||||
.string "/boot/grub/menu.lst"
|
.string "/boot/grub/menu.lst"
|
||||||
|
@ -79,6 +79,8 @@ VARIABLE(config_file)
|
||||||
|
|
||||||
/* the code continues... */
|
/* the code continues... */
|
||||||
codestart:
|
codestart:
|
||||||
|
cli /* we're not safe here! */
|
||||||
|
|
||||||
/* set up %ds, %ss, and %es */
|
/* set up %ds, %ss, and %es */
|
||||||
xorw %ax, %ax
|
xorw %ax, %ax
|
||||||
movw %ax, %ds
|
movw %ax, %ds
|
||||||
|
@ -89,6 +91,8 @@ codestart:
|
||||||
movl $STACKOFF, %esp
|
movl $STACKOFF, %esp
|
||||||
movl $STACKOFF, %ebp
|
movl $STACKOFF, %ebp
|
||||||
|
|
||||||
|
sti /* we're safe again */
|
||||||
|
|
||||||
/* save boot drive reference */
|
/* save boot drive reference */
|
||||||
movb %dl, EXT_C(boot_drive)
|
movb %dl, EXT_C(boot_drive)
|
||||||
|
|
||||||
|
@ -129,6 +133,18 @@ ENTRY(hard_stop)
|
||||||
hlt
|
hlt
|
||||||
jmp EXT_C(hard_stop)
|
jmp EXT_C(hard_stop)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* stop_floppy()
|
||||||
|
*
|
||||||
|
* Stops the floppy drive from spinning, so that other software is
|
||||||
|
* jumped to with a known state.
|
||||||
|
*/
|
||||||
|
ENTRY(stop_floppy)
|
||||||
|
movw $0x3F2, %dx
|
||||||
|
xorb %al, %al
|
||||||
|
outb %al, %dx
|
||||||
|
ret
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* chain_stage1(segment, offset, part_table_addr)
|
* chain_stage1(segment, offset, part_table_addr)
|
||||||
*
|
*
|
||||||
|
@ -639,7 +655,7 @@ ENTRY(putchar)
|
||||||
push %eax
|
push %eax
|
||||||
push %ebx
|
push %ebx
|
||||||
|
|
||||||
movl 0x10(%esp), %bl
|
movb 0x10(%esp), %bl
|
||||||
|
|
||||||
/* if not '\n', just print the character */
|
/* if not '\n', just print the character */
|
||||||
cmpb $0xa, %bl
|
cmpb $0xa, %bl
|
||||||
|
@ -960,6 +976,7 @@ ENTRY(patch_code_end)
|
||||||
|
|
||||||
ENTRY(linux_boot)
|
ENTRY(linux_boot)
|
||||||
/* don't worry about saving anything, we're committed at this point */
|
/* don't worry about saving anything, we're committed at this point */
|
||||||
|
call EXT_C(stop_floppy)
|
||||||
cld /* forward copying */
|
cld /* forward copying */
|
||||||
|
|
||||||
/* XXX new stack pointer in safe area for calling functions */
|
/* XXX new stack pointer in safe area for calling functions */
|
||||||
|
@ -1016,6 +1033,8 @@ ENTRY(linux_boot)
|
||||||
|
|
||||||
ENTRY(multi_boot)
|
ENTRY(multi_boot)
|
||||||
/* no need to save anything */
|
/* no need to save anything */
|
||||||
|
call EXT_C(stop_floppy)
|
||||||
|
|
||||||
movl $0x2BADB002, %eax
|
movl $0x2BADB002, %eax
|
||||||
movl 0x8(%esp), %ebx
|
movl 0x8(%esp), %ebx
|
||||||
|
|
||||||
|
@ -1396,6 +1415,8 @@ pending:
|
||||||
* This is the area for all of the special variables.
|
* This is the area for all of the special variables.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.p2align 2 /* force 4-byte alignment */
|
||||||
|
|
||||||
protstack:
|
protstack:
|
||||||
.long PROTSTACKINIT
|
.long PROTSTACKINIT
|
||||||
|
|
||||||
|
@ -1429,13 +1450,14 @@ segment:
|
||||||
* description.
|
* description.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.p2align 2 /* force 4-byte alignment */
|
||||||
gdt:
|
gdt:
|
||||||
.word 0, 0
|
.word 0, 0
|
||||||
.byte 0, 0, 0, 0
|
.byte 0, 0, 0, 0
|
||||||
|
|
||||||
/* code segment */
|
/* code segment */
|
||||||
.word 0xFFFF, 0
|
.word 0xFFFF, 0
|
||||||
.byte 0, 0x9E, 0xCF, 0
|
.byte 0, 0x9A, 0xCF, 0
|
||||||
|
|
||||||
/* data segment */
|
/* data segment */
|
||||||
.word 0xFFFF, 0
|
.word 0xFFFF, 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue