Commit 52ca8d6af01d140b1a022958bb5953f00bb7c714

Authored by bellard
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
... ... @@ -193,6 +193,8 @@ static void cmos_init(int ram_size, int boot_device, BlockDriverState **hd_table
193 193 case 'a':
194 194 case 'b':
195 195 rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */
  196 + if (!fd_bootchk)
  197 + rtc_set_memory(s, 0x38, 0x01); /* disable signature check */
196 198 break;
197 199 default:
198 200 case 'c':
... ... @@ -264,10 +266,6 @@ static void cmos_init(int ram_size, int boot_device, BlockDriverState **hd_table
264 266 }
265 267 }
266 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 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 228 the raw disk image you use is not written back. You can however force
229 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 235 @item -m megs
232 236 Set virtual RAM size to @var{megs} megabytes. Default is 128 MB.
233 237  
... ...
... ... @@ -159,6 +159,7 @@ int vnc_display = -1;
159 159 #define MAX_CPUS 1
160 160 #endif
161 161 int acpi_enabled = 1;
  162 +int fd_bootchk = 1;
162 163  
163 164 /***********************************************************/
164 165 /* x86 ISA bus support */
... ... @@ -4634,6 +4635,9 @@ void help(void)
4634 4635 "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master)\n"
4635 4636 "-boot [a|c|d] boot on floppy (a), hard disk (c) or CD-ROM (d)\n"
4636 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 4641 "-m megs set virtual RAM size to megs MB [default=%d]\n"
4638 4642 "-smp n set the number of CPUs to 'n' [default=1]\n"
4639 4643 "-nographic disable graphical output and redirect serial I/Os to console\n"
... ... @@ -4765,6 +4769,9 @@ enum {
4765 4769 QEMU_OPTION_cdrom,
4766 4770 QEMU_OPTION_boot,
4767 4771 QEMU_OPTION_snapshot,
  4772 +#ifdef TARGET_I386
  4773 + QEMU_OPTION_no_fd_bootchk,
  4774 +#endif
4768 4775 QEMU_OPTION_m,
4769 4776 QEMU_OPTION_nographic,
4770 4777 #ifdef HAS_AUDIO
... ... @@ -4828,6 +4835,9 @@ const QEMUOption qemu_options[] = {
4828 4835 { "cdrom", HAS_ARG, QEMU_OPTION_cdrom },
4829 4836 { "boot", HAS_ARG, QEMU_OPTION_boot },
4830 4837 { "snapshot", 0, QEMU_OPTION_snapshot },
  4838 +#ifdef TARGET_I386
  4839 + { "no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk },
  4840 +#endif
4831 4841 { "m", HAS_ARG, QEMU_OPTION_m },
4832 4842 { "nographic", 0, QEMU_OPTION_nographic },
4833 4843 { "k", HAS_ARG, QEMU_OPTION_k },
... ... @@ -5286,6 +5296,11 @@ int main(int argc, char **argv)
5286 5296 case QEMU_OPTION_fdb:
5287 5297 fd_filename[1] = optarg;
5288 5298 break;
  5299 +#ifdef TARGET_I386
  5300 + case QEMU_OPTION_no_fd_bootchk:
  5301 + fd_bootchk = 0;
  5302 + break;
  5303 +#endif
5289 5304 case QEMU_OPTION_no_code_copy:
5290 5305 code_copy_enabled = 0;
5291 5306 break;
... ...
... ... @@ -889,6 +889,7 @@ void acpi_bios_init(void);
889 889 /* pc.c */
890 890 extern QEMUMachine pc_machine;
891 891 extern QEMUMachine isapc_machine;
  892 +extern int fd_bootchk;
892 893  
893 894 void ioport_set_a20(int enable);
894 895 int ioport_get_a20(void);
... ...