Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64 with MCP51 laptops

David P. Reed
2007-12-11T19:20:15Z

Alan Cox wrote:
>
> The vga driver is somewhat misnamed. In console mode we handle everything
> back to MDA/HGA and some HGA adapters do need delays.
>
>
No they don't. I really, really, really know this for a fact. I wrote
ASM drivers for every early video adapter and ran them all through Lotus
QA and Software Arts QA. Personally. The only delay needed is caused
by not having dual-ported video frame buffers on the original CGA in
high res character mode. This caused "snow" when a memory write was done
concurrently with the read being done by the scanline character
generator. And that delay was done by waiting for a bit in the I/O port
space to change. There was NO reason to do waits between I/O
instructions. Produce a spec sheet, or even better a machine. I may
have an original PC-XT still lying around in the attic, don't know if I
can fire it up, but it had such graphics cards. I also have several
early high-speed clones that were "overclocked".

>> I do remind all that 0x80 is a BIOS-specific standard, and is per BIOS -
>> other ports have been used in the history of the IBM PC family by some
>> vendors, and some machines have used it for DMA port mapping!! And
>>
>
> All do -thats why it is suitable.
>
Not true. Again, I can produce machines that don't use 0x80. Perhaps
that is because I am many years older than you are, and have been
writing code for PC compatibles since 1981. (not a typo - this was
before the first IBM PC was released to the public).
>
>> Windows XP does NOT use it at all. Therefore it may not be supported by
>>
>
> Older Windows does. Don't know about XP although DOS apps in XP will but
> they may virtualise the port.
>
>
Show me one line of Windows code written by Microsoft that uses port
80. I don't know what app hackers might have done - there was no
protection, and someone might have copied the BIOS for some reason.
>> I have a simple patch that fixes my primary concern - just change the
>> CMOS_READ and CMOS_WRITE, 64-bit versions of I/O and bootcode vga
>> accesses (first group below) to use the straight inb and outb code.
>>
>
> Which requires care. Have you verified all the main chipset vendors ?
>
>
I obviously have not. Clearly the guys who want this port 80 hack so
desperately have not either. That's why we are in this pickle. (well,
we only to the extent that I am accepted as having useful input. I'm
happy to go if I'm not perceived as being helpful).
>> I may submit it so that the many others who share my pain will be made
>>
>
> All .. none of them ?
>
There is a long standing set of reports of "hwclock" not working on HP
dv.000v laptops, where the . stands for 2, 4, 6, and 9. These are all
nvidia MCP51 chipset AMD64's.

And if you choose to be such an insulting ****, I may just stop trying
to be helpful. I presume that others in the community find my comments
helpful.
> I can do some of these off the top of my head
>
>
>> drivers/net/8390.h
>>
>
> Needed for some 8390 devices on ISA bus
>
>
>> drivers/net/de600.c
>> drivers/net/de600.h
>>
>
> Uses the parallel port which isnt guaranteed to be full ISA speed.
>
>
>> drivers/scsi/ppa.h
>>
>
> Parallel port
>
>
>> drivers/serial/8250.c
>>
>
> Some PC's need delays for certain ops.
>
>
>> drivers/watchdog/wdt_pci.c
>>
>
> That one is a mistake I believe, I'll dig out the docs.
>
>
>