handle command lines above 256 characters.
* PXELINUX: revert memory allocation change that caused
problems on some network cards.
+ * MEMDISK: Try work around a bug on some BIOSes when no
+ physical floppy disk is present in the system.
Changes in 3.10:
* gcc 4.0.1 compilation fixes.
pptr->drivecnt = regs.edx.b[0]+1;
}
+ /* Discontiguous drive space. There is no really good solution for this. */
+ if ( pptr->drivecnt <= (geometry->driveno & 0x7f) )
+ pptr->drivecnt = (geometry->driveno & 0x7f) + 1;
+
/* Pointer to the command line */
pptr->cmdline_off = bin_size + (nranges+1)*sizeof(ranges[0]);
pptr->cmdline_seg = driverseg;
if ( geometry->driveno & 0x80 ) {
/* Update BIOS hard disk count */
- int nhd = rdz_8(BIOS_HD_COUNT);
-
- nhd++;
- if ( nhd <= (geometry->driveno & 0x7f) )
- nhd = (geometry->driveno & 0x7f) + 1;
+ uint8_t nhd = pptr->drivecnt;
if ( nhd > 128 )
nhd = 128;
} else {
/* Update BIOS floppy disk count */
uint8_t equip = rdz_8(BIOS_EQUIP);
- int nflop = (equip & 1) ? (equip >> 6)+1 : 0;
+ uint8_t nflop = pptr->drivecnt;
- nflop++;
- if ( nflop <= geometry->driveno )
- nflop = geometry->driveno + 1;
-
- if ( nflop > 4 )
+ if ( nflop > 4 ) /* Limit of equipment byte */
nflop = 4;
- equip |= 1;
- equip &= ~(3 << 6);
- equip |= (nflop-1) << 6;
+ equip &= 0x3E;
+ if ( nflop )
+ equip |= ((nflop-1) << 6) | 0x01;
+
wrz_8(BIOS_EQUIP, equip);
}