Some PnP BIOSsen return garbage in the high byte of the number-of-devices

field (or don't set the high byte at all).  Clear it to avoid reporting
a silly number of devices.

Reported by:	phk
This commit is contained in:
Mike Smith 1999-09-12 06:58:33 +00:00
parent 9db4bbf32a
commit 03c6be5cdc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51193
2 changed files with 2 additions and 0 deletions

View File

@ -514,6 +514,7 @@ pnpbios_scan(void)
if ((error = bios16(&args, PNP_COUNT_DEVNODES, &ndevs, &bigdev)) || (args.r.eax & 0xff))
printf("pnpbios: error %d/%x getting device count/size limit\n", error, args.r.eax);
ndevs &= 0xff; /* clear high byte garbage */
if (bootverbose)
printf("pnpbios: %d devices, largest %d bytes\n", ndevs, bigdev);

View File

@ -514,6 +514,7 @@ pnpbios_scan(void)
if ((error = bios16(&args, PNP_COUNT_DEVNODES, &ndevs, &bigdev)) || (args.r.eax & 0xff))
printf("pnpbios: error %d/%x getting device count/size limit\n", error, args.r.eax);
ndevs &= 0xff; /* clear high byte garbage */
if (bootverbose)
printf("pnpbios: %d devices, largest %d bytes\n", ndevs, bigdev);