Commit 52ca8d6af01d140b1a022958bb5953f00bb7c714
1 parent
5cbfcd00
-no-fd-bootchk option (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1976 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
4 changed files
with
22 additions
and
4 deletions
hw/pc.c
@@ -193,6 +193,8 @@ static void cmos_init(int ram_size, int boot_device, BlockDriverState **hd_table | @@ -193,6 +193,8 @@ static void cmos_init(int ram_size, int boot_device, BlockDriverState **hd_table | ||
193 | case 'a': | 193 | case 'a': |
194 | case 'b': | 194 | case 'b': |
195 | rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */ | 195 | rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */ |
196 | + if (!fd_bootchk) | ||
197 | + rtc_set_memory(s, 0x38, 0x01); /* disable signature check */ | ||
196 | break; | 198 | break; |
197 | default: | 199 | default: |
198 | case 'c': | 200 | case 'c': |
@@ -264,10 +266,6 @@ static void cmos_init(int ram_size, int boot_device, BlockDriverState **hd_table | @@ -264,10 +266,6 @@ static void cmos_init(int ram_size, int boot_device, BlockDriverState **hd_table | ||
264 | } | 266 | } |
265 | } | 267 | } |
266 | rtc_set_memory(s, 0x39, val); | 268 | rtc_set_memory(s, 0x39, val); |
267 | - | ||
268 | - /* Disable check of 0x55AA signature on the last two bytes of | ||
269 | - first sector of disk. XXX: make it the default ? */ | ||
270 | - // rtc_set_memory(s, 0x38, 1); | ||
271 | } | 269 | } |
272 | 270 | ||
273 | void ioport_set_a20(int enable) | 271 | void ioport_set_a20(int enable) |
qemu-doc.texi
@@ -228,6 +228,10 @@ Write to temporary files instead of disk image files. In this case, | @@ -228,6 +228,10 @@ Write to temporary files instead of disk image files. In this case, | ||
228 | the raw disk image you use is not written back. You can however force | 228 | the raw disk image you use is not written back. You can however force |
229 | the write back by pressing @key{C-a s} (@pxref{disk_images}). | 229 | the write back by pressing @key{C-a s} (@pxref{disk_images}). |
230 | 230 | ||
231 | +@item -no-fd-bootchk | ||
232 | +Disable boot signature checking for floppy disks in Bochs BIOS. It may | ||
233 | +be needed to boot from old floppy disks. | ||
234 | + | ||
231 | @item -m megs | 235 | @item -m megs |
232 | Set virtual RAM size to @var{megs} megabytes. Default is 128 MB. | 236 | Set virtual RAM size to @var{megs} megabytes. Default is 128 MB. |
233 | 237 |
vl.c
@@ -159,6 +159,7 @@ int vnc_display = -1; | @@ -159,6 +159,7 @@ int vnc_display = -1; | ||
159 | #define MAX_CPUS 1 | 159 | #define MAX_CPUS 1 |
160 | #endif | 160 | #endif |
161 | int acpi_enabled = 1; | 161 | int acpi_enabled = 1; |
162 | +int fd_bootchk = 1; | ||
162 | 163 | ||
163 | /***********************************************************/ | 164 | /***********************************************************/ |
164 | /* x86 ISA bus support */ | 165 | /* x86 ISA bus support */ |
@@ -4634,6 +4635,9 @@ void help(void) | @@ -4634,6 +4635,9 @@ void help(void) | ||
4634 | "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master)\n" | 4635 | "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master)\n" |
4635 | "-boot [a|c|d] boot on floppy (a), hard disk (c) or CD-ROM (d)\n" | 4636 | "-boot [a|c|d] boot on floppy (a), hard disk (c) or CD-ROM (d)\n" |
4636 | "-snapshot write to temporary files instead of disk image files\n" | 4637 | "-snapshot write to temporary files instead of disk image files\n" |
4638 | +#ifdef TARGET_I386 | ||
4639 | + "-no-fd-bootchk disable boot signature checking for floppy disks\n" | ||
4640 | +#endif | ||
4637 | "-m megs set virtual RAM size to megs MB [default=%d]\n" | 4641 | "-m megs set virtual RAM size to megs MB [default=%d]\n" |
4638 | "-smp n set the number of CPUs to 'n' [default=1]\n" | 4642 | "-smp n set the number of CPUs to 'n' [default=1]\n" |
4639 | "-nographic disable graphical output and redirect serial I/Os to console\n" | 4643 | "-nographic disable graphical output and redirect serial I/Os to console\n" |
@@ -4765,6 +4769,9 @@ enum { | @@ -4765,6 +4769,9 @@ enum { | ||
4765 | QEMU_OPTION_cdrom, | 4769 | QEMU_OPTION_cdrom, |
4766 | QEMU_OPTION_boot, | 4770 | QEMU_OPTION_boot, |
4767 | QEMU_OPTION_snapshot, | 4771 | QEMU_OPTION_snapshot, |
4772 | +#ifdef TARGET_I386 | ||
4773 | + QEMU_OPTION_no_fd_bootchk, | ||
4774 | +#endif | ||
4768 | QEMU_OPTION_m, | 4775 | QEMU_OPTION_m, |
4769 | QEMU_OPTION_nographic, | 4776 | QEMU_OPTION_nographic, |
4770 | #ifdef HAS_AUDIO | 4777 | #ifdef HAS_AUDIO |
@@ -4828,6 +4835,9 @@ const QEMUOption qemu_options[] = { | @@ -4828,6 +4835,9 @@ const QEMUOption qemu_options[] = { | ||
4828 | { "cdrom", HAS_ARG, QEMU_OPTION_cdrom }, | 4835 | { "cdrom", HAS_ARG, QEMU_OPTION_cdrom }, |
4829 | { "boot", HAS_ARG, QEMU_OPTION_boot }, | 4836 | { "boot", HAS_ARG, QEMU_OPTION_boot }, |
4830 | { "snapshot", 0, QEMU_OPTION_snapshot }, | 4837 | { "snapshot", 0, QEMU_OPTION_snapshot }, |
4838 | +#ifdef TARGET_I386 | ||
4839 | + { "no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk }, | ||
4840 | +#endif | ||
4831 | { "m", HAS_ARG, QEMU_OPTION_m }, | 4841 | { "m", HAS_ARG, QEMU_OPTION_m }, |
4832 | { "nographic", 0, QEMU_OPTION_nographic }, | 4842 | { "nographic", 0, QEMU_OPTION_nographic }, |
4833 | { "k", HAS_ARG, QEMU_OPTION_k }, | 4843 | { "k", HAS_ARG, QEMU_OPTION_k }, |
@@ -5286,6 +5296,11 @@ int main(int argc, char **argv) | @@ -5286,6 +5296,11 @@ int main(int argc, char **argv) | ||
5286 | case QEMU_OPTION_fdb: | 5296 | case QEMU_OPTION_fdb: |
5287 | fd_filename[1] = optarg; | 5297 | fd_filename[1] = optarg; |
5288 | break; | 5298 | break; |
5299 | +#ifdef TARGET_I386 | ||
5300 | + case QEMU_OPTION_no_fd_bootchk: | ||
5301 | + fd_bootchk = 0; | ||
5302 | + break; | ||
5303 | +#endif | ||
5289 | case QEMU_OPTION_no_code_copy: | 5304 | case QEMU_OPTION_no_code_copy: |
5290 | code_copy_enabled = 0; | 5305 | code_copy_enabled = 0; |
5291 | break; | 5306 | break; |
vl.h
@@ -889,6 +889,7 @@ void acpi_bios_init(void); | @@ -889,6 +889,7 @@ void acpi_bios_init(void); | ||
889 | /* pc.c */ | 889 | /* pc.c */ |
890 | extern QEMUMachine pc_machine; | 890 | extern QEMUMachine pc_machine; |
891 | extern QEMUMachine isapc_machine; | 891 | extern QEMUMachine isapc_machine; |
892 | +extern int fd_bootchk; | ||
892 | 893 | ||
893 | void ioport_set_a20(int enable); | 894 | void ioport_set_a20(int enable); |
894 | int ioport_get_a20(void); | 895 | int ioport_get_a20(void); |