8 ms·
This 8254 mention made me curious. Does anyone know which other parts of the original PC hardware are still present in modern machines for compatibility? (Real
by axelfontaine 10y ago
This 8254 mention made me curious. Does anyone know which other parts of the original PC hardware are still present in modern machines for compatibility? (Real mode in CPUs, A20, ...)
- dogma1138 10y agoAlmost nothing, there are some components that are emulated in software/firmware.
- wyldfire 10y agoNot even chipset pins devoted to AT keyboards?
- AstralStorm 10y agoThere are mainboards without PS/2 ports. The beeper using ancient interface is also long gone. Nowadays, the HDA chip handles it most of the time. There is no reason except ancient compatibility to call into the beeper via the ancient interface.
- aaroninsf 10y ago_Challenge accepted_ j/k... but I hope a Hero Will Rise
- dogma1138 10y agoGood luck using an AT keyboard today :P there are some USB converters. Some motherboards that offer PS/2 connectivity (rare, mostly "gaming motherboards" for n-Key rollover fanatics) but I don't even know if that chipset would do AT.
- anexprogrammer 10y agoI wish it were a lot less rare as few ps/2-usb converters are very good, especially with a Model M for some reason. I don't want to retire it, it's still in great condition, unlike the dozen or more other keyboards I've had that have died after a year or two.
- deleted 10y ago[deleted]
- TylerE 10y agoEven if you _have_ PS/2 connectivity, good luck getting it work with legacy hardware. E.g. an original Model M kbd will not work with most modern PS/2 due to electrical limitations (can't remember if it's non enough volts or not enough amps)
- E6300 10y agoI'm typing this on a Model M from 1990 connected to a PS/2 port. It works just fine.
- yuhong 10y agoI think there is a simple hardware modification to make them work.
- tumba 10y agoOnly a few PS/2 -> USB adapters are fully functional according to the PS/2 specification. I use an adapter from Sanoxy [1] with my Model M and it works superbly. I have read of other Model M enthusiasts using the same one. [1] https://www.amazon.com/SANOXY-PS2-Keyboard-USB-Adapter/dp/B000BSJFJS https://www.amazon.com/SANOXY-PS2-Keyboard-USB-Adapter/dp/B0...
- Florin_Andrei 10y agoI think I still have an old Silicon Graphics keyboard somewhere in the garage. Built like a tank, I'm pretty sure it would still work if I had a port to connect it to.
- dogma1138 10y agoThere aren't ports because there isn't support anymore. Intel doesn't support AT, I don't even think it supports PS/2 with most of it's chipsets. The motherboards that do come with PS/2 usually implement their chipset. Also PS/2 stopped being electrically compatible a while ago around about the same time that the combo Keyboard/Mouse PS/2 ports became available. It offers pretty low current only about 250ma so you might have issues with older AT keyboards even if the chipset is still AT command compatible.
- yuhong 10y agoThis stuff is in the Super I/O chip.
- dogma1138 10y agoSuper I/O is dead and gone for like well decades. For Intel system super I/O was eaten by the ICH which initially kept compatibility with most Super I/O functions. By ICH 6 or 7 which is around the mid 2000's most of those legacy features were all gone. By 2008-9 the ICH was also gone and replaced by the PCH which doesn't have almost any compatibility or features with the Super I/O architecture.
- speeder 10y agoWhat is the nuvoton superio chip on my ASRock z97 then?
- dogma1138 10y agoMost like the same things the rest of them do like SMBus, temperature sensors, fan control and voltage monitoring. They also do the GPIO for various other features like resetting the bios or switching between different BIOS flash chips, more recently the LED controls on the newer motherboards and the error code segment display that is now used instead of the POST beeping sounds so you can actually know wtf is going on :)
- jimmaswell 10y agoI got the cheapest motherboard available that would work with the components I was getting and it happened to have ps/2 ports.
- polpo 10y agoThe PS/2 keyboard interface is just AT with a mini-DIN connector instead of DIN. It's the same protocol.
- StillBored 10y agoWell a certain amount of it is emulated in SMM, but from the fact that its still possible to boot DOS on most modern machines, a lot of the core hardware is still there emulated or otherwise. I was just reading a review on the Asus X99-A II, board where they were talking about the super-io chip's PS2 keyboard port. And IIRC, a couple years ago someone (IBM IIRC) dared to ship a machine without an 8042 keyboard controller/emulation, and it failed to work in a ton of places (kgdb for one). Frankly, I'm a little surprised at the hate for the couple thousand or so transistors required to support the set of 8253/8259/8250/8042/etc chips that form the basis of the original XT/AT. Especially given the love for all things ARM, which tend to implement their peripherals in a very 1980's way with simple fixed MMIO ports punched into the address map, but without the standardization that form the basis of PC/AT hardware. And just to stay on topic, almost every single decent ATX/ITX board I've used in the last decade has a 4 pin PC speaker port. Including the skylake machine I built last night. Same thing goes for RS232 ports, which are still on the vast majority of decent PC hardware even if they don't have headers soldered on. The X99 in that review actually had the headers, and I owning the older version of the board actually have a cable plugged into it which I attach to assorted hardware for firmware/etc work.
- sounds 10y agoCan you talk about your firmware work on the X99-A board? Any coreboot tips?
- nitrogen 10y agoIt's possible the OP was talking about firmware development for embedded hardware (Arduino-scale devices), using the RS232 port on the X99 to communicate with the firmware. Lots of embedded hardware has a serial console hidden somewhere inside, and when debugging, it can be faster to add some printf equivalent calls or a new console command than to use a JTAG.
- pcwalton 10y ago> Especially given the love for all things ARM, which tend to implement their peripherals in a very 1980's way with simple fixed MMIO ports punched into the address map, but without the standardization that form the basis of PC/AT hardware. Isn't that a source of flexibility, though? The fact that that stuff is not standardized and is instead hidden behind a hardware abstraction layer (the OS kernel) means that ARM systems get the freedom to drop the legacy interfaces and centralize the hardware abstraction where it belongs: in the kernel.
- CountSessine 10y agoI think most motherboards actually still support all of these crusty old GPIOs in hardware, but on a SuperIO https://en.wikipedia.org/wiki/Super_I/O https://en.wikipedia.org/wiki/Super_I/O chip. One of these will usually hang off your southbridge/PCH via the Low Pin Count connector https://en.wikipedia.org/wiki/Low_Pin_Count https://en.wikipedia.org/wiki/Low_Pin_Count, which was specifically designed as the compatibility interface for these things. In a modern PC, almost none of these are used - why would anyone want to use the crummy old AT 24-bit DMA controller when you can use PCIe bus mastering - but they're there if want to boot into an old real-mode OS.
- billforsternz 10y agoI recall being asked to look into a perplexing problem with some legacy technology a few years ago. An 80s era radio controller system was effectively some DOS software running on a DOS embedded board. The boards were dying from old age. Replacing them with modern industrial PC boards wasn't working as expected - the software wouldn't run. The techs had tried various methods of slowing down the hardware to match the software's expectations to no avail. After much probing about (all original source code was long ago lost - if it was ever available) I found the code was crashing inside something that looked like an RS232 driver. Specifically the software was using what was apparently an undocumented scratchpad register in the 8253/8254. The modern PC's hardware emulation didn't cover that (the data was always reading back as 0xff - enough of a problem to turn the delay_n_millisecs() type routine I think I was looking at into a delay_forever() routine). The lesson, as always, avoid undocumented quirks unless you have absolutely no alternative.
- Sanddancer 10y agoIntel finally got rid of hardware A20 gating in Haskell. Real mode still exists, and iirc, the processor still defaults to it. You just can't jump into real mode from x64 mode, you need a virtualized environment in 32 bit mode to do that.
- yuhong 10y agoI think you can technically disable PE and PG in CR0 at the same time and jump directly to real mode.
- Dylan16807 10y agoI'm pretty sure you don't need to virtualize anything. You can switch out of long mode and then use all the pre-64 modes as normal.
- dfox 10y agoOn first few AMD's original AMD64 microarchitectures, 16 bit segments (both vm86 and 16b protected mode) were not working when the CPU was in long mode. The fact that they do on many modern CPUs is one of the Intel's extensions to AMD64. Also this is the reason why 64b windows do not support NTVDM and 16b windows applications, while the current hardware can support that. Another of these backward compatibility Intel's extensions concern whether x87-style FPU instructions are valid in long mode 64b code segment.
- yuhong 10y agoAFAIK that is not true as far as I know.
- Locke1689 10y agoYou can jump into real mode from long mode, but you can't run real mode programs while inside long mode.
- Dylan16807 10y ago
- yuhong 10y agoFYI, it was 8253 in PC and XT, 8254 in AT. The main difference is the readback command I think. This is not the only error in this blog post BTW.
- Idontagree 10y agoAuthor's reply concering that: Back when I made that post I thought it was an 8253. But I checked the sources for the function that Beep.Sys uses to program the timer and it claims that it’s an 8254 so I went with the source code. How hard would it be to use the chip? Not hard but now that Win7 has shipped, the number of machines with an 8254 that’s actually wired to something is going to dwindle to around 0. The machines will still have an 8254 (it’s on the SuperIo chip in every PC) but it won’t be connected to any hardware.
- yuhong 10y agoThere is another error in this reply. It is in the southbridge not in the Super I/O.
- bonzini 10y agoThe SuperI/O is the part of the southbridge (which later became the ICH and nowadays is known as PCH) that implements the legacy ISA chips (RTC, 8042[1], 8254, 8257, 8259). It used to be separate, which was already an improvement over the separate integrated circuits of 30 years ago. [1] nowadays the 8042 is mostly emulated in SMM because it needs to convert USB to PS/2.