* The MBR boot code did execute the check for disk extensions with the wrong
magic code. This would lead to them not being detected on systems where the BIOS (rightfully) returns an error in this case. Since the CHS fallback can't work it would then fail with "Missing Operating System". * Fixed a typo, an 80 char limit violation. * Automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35718 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -94,7 +94,7 @@ main.5: movw %sp, %di // Save stack pointer
|
|||||||
jnz main.7 // No.
|
jnz main.7 // No.
|
||||||
pushw %cx // Save %cx
|
pushw %cx // Save %cx
|
||||||
pushw %bx // Save %bx
|
pushw %bx // Save %bx
|
||||||
movw $MAGIC, %bx // Magic
|
movw $0x55aa, %bx // Reversed Magic
|
||||||
movb $0x41, %ah // BIOS: EDD extensions present?
|
movb $0x41, %ah // BIOS: EDD extensions present?
|
||||||
int $0x13 //
|
int $0x13 //
|
||||||
jc main.6 // No.
|
jc main.6 // No.
|
||||||
@@ -109,7 +109,7 @@ main.5: movw %sp, %di // Save stack pointer
|
|||||||
pushw %bx // the transfer buffer
|
pushw %bx // the transfer buffer
|
||||||
pushw $0x1 // Read 1 sector
|
pushw $0x1 // Read 1 sector
|
||||||
pushw $0x10 // Packet length
|
pushw $0x10 // Packet length
|
||||||
movw %sp, %si // Packer pointer
|
movw %sp, %si // Packet pointer
|
||||||
movw $0x4200, %ax // BIOS: LBA Read from disk
|
movw $0x4200, %ax // BIOS: LBA Read from disk
|
||||||
jmp main.8 // Skip the CHS setup
|
jmp main.8 // Skip the CHS setup
|
||||||
main.6: popw %bx // Restore %bx
|
main.6: popw %bx // Restore %bx
|
||||||
@@ -119,8 +119,8 @@ main.8: int $0x13 // Call the BIOS
|
|||||||
movw %di,%sp // Restore stack
|
movw %di,%sp // Restore stack
|
||||||
jc err_loading_os // If error
|
jc err_loading_os // If error
|
||||||
/*
|
/*
|
||||||
* Now that we've loaded the bootstrap, check for the magic 0xaa55 signature. If it
|
* Now that we've loaded the bootstrap, check for the magic 0xaa55 signature.
|
||||||
* is present, execute the bootstrap we just loaded.
|
* If it is present, execute the bootstrap we just loaded.
|
||||||
*/
|
*/
|
||||||
cmpw $MAGIC, 0x1fe(%bx) // Bootable?
|
cmpw $MAGIC, 0x1fe(%bx) // Bootable?
|
||||||
jne err_missing_os // No
|
jne err_missing_os // No
|
||||||
|
|||||||
Reference in New Issue
Block a user