2010-02-10 Colin King <colin.king@ubuntu.com>
2010-02-10 Colin Watson <cjwatson@ubuntu.com> Shrink the pre-partition-table part of boot.img by eight bytes. * boot/i386/pc/boot.S (ERR): New macro. (chs_mode): Use ERR. (geometry_error): Likewise. (hd_probe_error): Remove. This is only used once, so we wrwite it inline instead. (read_error): Instead of printing read_error_string, just set up %si and fall through to ... (error_message): ... this new function, also used by ERR.
This commit is contained in:
parent
618307dd08
commit
33dfc52f44
2 changed files with 19 additions and 12 deletions
13
ChangeLog.trim-boot-img
Normal file
13
ChangeLog.trim-boot-img
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
2010-02-10 Colin King <colin.king@ubuntu.com>
|
||||||
|
2010-02-10 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
Shrink the pre-partition-table part of boot.img by eight bytes.
|
||||||
|
|
||||||
|
* boot/i386/pc/boot.S (ERR): New macro.
|
||||||
|
(chs_mode): Use ERR.
|
||||||
|
(geometry_error): Likewise.
|
||||||
|
(hd_probe_error): Remove. This is only used once, so we wrwite
|
||||||
|
it inline instead.
|
||||||
|
(read_error): Instead of printing read_error_string, just set up
|
||||||
|
%si and fall through to ...
|
||||||
|
(error_message): ... this new function, also used by ERR.
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
/* Print message string */
|
/* Print message string */
|
||||||
#define MSG(x) movw $x, %si; call LOCAL(message)
|
#define MSG(x) movw $x, %si; call LOCAL(message)
|
||||||
|
#define ERR(x) movw $x, %si; jmp LOCAL(error_message)
|
||||||
|
|
||||||
.file "boot.S"
|
.file "boot.S"
|
||||||
|
|
||||||
|
@ -233,7 +234,7 @@ LOCAL(chs_mode):
|
||||||
jz LOCAL(floppy_probe)
|
jz LOCAL(floppy_probe)
|
||||||
|
|
||||||
/* Nope, we definitely have a hard disk, and we're screwed. */
|
/* Nope, we definitely have a hard disk, and we're screwed. */
|
||||||
jmp LOCAL(hd_probe_error)
|
ERR(hd_probe_error_string)
|
||||||
|
|
||||||
LOCAL(final_init):
|
LOCAL(final_init):
|
||||||
/* set the mode to zero */
|
/* set the mode to zero */
|
||||||
|
@ -360,22 +361,15 @@ LOCAL(copy_buffer):
|
||||||
* BIOS Geometry translation error (past the end of the disk geometry!).
|
* BIOS Geometry translation error (past the end of the disk geometry!).
|
||||||
*/
|
*/
|
||||||
LOCAL(geometry_error):
|
LOCAL(geometry_error):
|
||||||
MSG(geometry_error_string)
|
ERR(geometry_error_string)
|
||||||
jmp LOCAL(general_error)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Disk probe failure.
|
|
||||||
*/
|
|
||||||
LOCAL(hd_probe_error):
|
|
||||||
MSG(hd_probe_error_string)
|
|
||||||
jmp LOCAL(general_error)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read error on the disk.
|
* Read error on the disk.
|
||||||
*/
|
*/
|
||||||
LOCAL(read_error):
|
LOCAL(read_error):
|
||||||
MSG(read_error_string)
|
movw $read_error_string, %si
|
||||||
|
LOCAL(error_message):
|
||||||
|
call LOCAL(message)
|
||||||
LOCAL(general_error):
|
LOCAL(general_error):
|
||||||
MSG(general_error_string)
|
MSG(general_error_string)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue