Example:
https://timhutton.github.io/2010/03/10/30984.html
https://github.com/GollyGang/ruletablerepository/wiki/CoddsD...
101–110 of 133 posts
Example:
https://timhutton.github.io/2010/03/10/30984.html
https://github.com/GollyGang/ruletablerepository/wiki/CoddsD...
Amongst the first sentences... > It may be thought of as what happens when a whole computer starts, since the CPU is the center of the computer and the place where the action begins. I thought that too. Last year I spent a while getting as low-level as I could and trying to understand how to write a boot loader, a kernel, learn about clocks and pins and interrupts, etc. I thought, "I know, I'll get a Raspberry Pi! Th…
As early as the mid-70s, minicomputers started including microcontrollers to manage the boot environment. I had a Sun machine once that included what they called Lights Out Management. A little microcontroller that had control over the system power and etc. Always available via its dedicated serial port, even when the machine was shut off. Everything is like that now. A smartphone will have multiple processors. Some…
Earlier quoted context omitted.
Yeah, more or less; mostly more. pusha/pushad is one of those instructions that sounded good, but isn't used much (it became invalid in amd64), windows will push the registers one at a time, and maybe FPU, MMX, SSE, etc registers; of course, that's a lot of extra pushing, so there's strategies to avoid it if the thread doesn't use them. If you switch to a different task, you're going to need to load its page tables,…
> windows will push the registers one at a time Wouldn't Windows (and Linux) use the FXSAVE instruction instead?
Amongst the first sentences... > It may be thought of as what happens when a whole computer starts, since the CPU is the center of the computer and the place where the action begins. I thought that too. Last year I spent a while getting as low-level as I could and trying to understand how to write a boot loader, a kernel, learn about clocks and pins and interrupts, etc. I thought, "I know, I'll get a Raspberry Pi! Th…
That is because how ARM ecosystem functions. There is no standard way of integrating ARM CPU into a product as Arm, the company, just sells base IP and not the complete CPU. Every ARM licensee, from Qualcomm to Apple to Nvidia are free to design their own extensions and integrations into their SoC. There is no standard for this. This creates a lot of problems for writing a generic tutorial that you see in the x86 world.
Earlier quoted context omitted.
As early as the mid-70s, minicomputers started including microcontrollers to manage the boot environment. I had a Sun machine once that included what they called Lights Out Management. A little microcontroller that had control over the system power and etc. Always available via its dedicated serial port, even when the machine was shut off. Everything is like that now. A smartphone will have multiple processors. Some…
A recurring question I have is: how many microcontrollers/CPUs are in a modern personal computer? There are clearly a lot, but just how many?
- the CPU core in the chipset that runs the ME/PSP
- if the TPM is not an fTPM, it has a CPU I'm sure.
- if your NIC has offload engines, it has a CPU or two.
- each storage device has a CPU.
- each Wi-Fi device has a CPU.
- thunderbolt controller takes firmware, it has a CPU. I'd bet USB3 and 4 do too.
- any USB device has a CPU on the other end accepting and interpreting commands.
- same with any SCSI device.
- monitors have a CPU or two, one for the OSD settings and another to drive the display I'm sure.
- I think any nVidia or AMD graphics card has a CPU in there (in addition to the GPU).
- The following portable media has microcontroller firmware: SD cards, Memory Stick. (The now defunct SmartMedia and Olympus XD were raw NAND).
- your optical mouse has a CPU as well to process optical data.
- obviously printers have CPUs and firmware, probably separate ones for the web UI and the part that drives the actual print mechanism, and I'd bet a separate one for scanning and image processing.
- any keyboard has a microcontroller and firmware (there are open source keyboard firmwares)
- SIM cards for cellular connections have their own CPU and firmware.
Ben Eater's fantastic video series on building a breadboard 6502 based computer and an 8-bit breadboard computer from scratch might be appreciated in this thread. 6502 playlist: https://www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBy... 8-bit build playlist: https://www.youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBy... He also sells kits if one is interested in playing along.
Similarly, I have come to appreciate rehsd's[0] efforts in building a 80286 computer. 0. https://www.youtube.com/@rehsd/videos
Only watched the first video yet, after initializing itself the CPU actually runs this code (because D8-D15 is wired to zero):
addr opcode
FFFFF0 90 NOP
FFFFF1 00 90 00 90 ADD [BX+SI+9000],DL
FFFFF5 00 90 00 90 ADD [BX+SI+9000],DL
FFFFF9 00 90 00 90 ADD [BX+SI+9000],DL
FFFFFD 00 90 00 -- !! general protection fault
You can see it read and write the same address three times, then fetch the interrupt 0Dh vector and push flags+CS+IP to the stack :)Could anybody clarify for me the purpose of the NOP opcode that the article refers to? I would think that something like a "do nothing" instruction would want to be optimized away as much as possible, but maybe there's some hidden facet of the instruction protocol I'm not familiar with that necessitates it?
For the purposes of this, the nop instruction is useful as it's a great way to delay the processor for 1 instruction at a time and given you know the clock speed and therefore instructions per second you can: * Set the IO high * Use nops (or other instructions) to waste time * Set the IO low
This is very useful in situations where the timing needs to be too precise to use interrupts, which are somewhat unpredictable. Obviously this means an entire CPU is held up running this code.
Another timing usage is for generating a signal to display a picture on a CRT using a microcontroller. Plenty of others as well.
Personally, though, I would never bother. It's always better to get a dedicated chip/controller for something like driving those stupid LEDs (or just get an SPI LED) or to generate a TV signal.
Reading up on it further, apparently it is also used as a way to reserve space in code memory, I imagine for self-modifying code (ie fill with nops which can be replaced with actual instructions by your code, depending on code execution). But I've never actually done this myself.
Say goodbye to a couple hours!
Earlier quoted context omitted.
A recurring question I have is: how many microcontrollers/CPUs are in a modern personal computer? There are clearly a lot, but just how many?
- the embedded controller (EC) - the CPU core in the chipset that runs the ME/PSP - if the TPM is not an fTPM, it has a CPU I'm sure. - if your NIC has offload engines, it has a CPU or two. - each storage device has a CPU. - each Wi-Fi device has a CPU. - thunderbolt controller takes firmware, it has a CPU. I'd bet USB3 and 4 do too. - any USB device has a CPU on the other end accepting and interpreting commands. - s…