--- qemu/roms/seabios/src/block.c 2018/04/24 18:58:45 1.1.1.4 +++ qemu/roms/seabios/src/block.c 2018/04/24 19:23:56 1.1.1.5 @@ -17,6 +17,7 @@ u8 FloppyCount VAR16VISIBLE; u8 CDCount; struct drive_s *IDMap[3][CONFIG_MAX_EXTDRIVE] VAR16VISIBLE; +u8 *bounce_buf_fl VAR16VISIBLE; struct drive_s * getDrive(u8 exttype, u8 extdriveoffset) @@ -38,6 +39,19 @@ int getDriveId(u8 exttype, struct drive_ return -1; } +int bounce_buf_init(void) +{ + if (bounce_buf_fl) + return 0; + + u8 *buf = malloc_low(CDROM_SECTOR_SIZE); + if (!buf) { + warn_noalloc(); + return -1; + } + bounce_buf_fl = buf; + return 0; +} /**************************************************************** * Disk geometry translation