NokiMo
marcan
marcan

patreon


Fun Findings #1: HID Registers

I'm not working on proper porting yet, but I can't help but do a bit of recon ahead of time. During reverse engineering and research, you always come across curious tidbits. I'll be posting these on Patreon for patrons at or above the Basic Backer tier. First one's free :-) (don't worry, no serious important research findings will be patron-exclusive).

Modern CPUs always have a pile of registers to enable/disable features or configure things. These are often used to tweak low-level platform parameters or to hold "chicken bits", bits to "chicken out" and turn off a feature if it turns out to be buggy in silicon. It is extremely expensive to spin off a new chip with the feature fixed or disabled, so chip designers will always put in overrides that can be used in software to make stuff run without needing a new silicon revision. These registers are specific to a given CPU design, so they are not standardized, and OSes are not expected to use them except in platform-specific code.

Apple has a bunch of these in their custom CPU cores, and you can see some of them here. Notice the names? ARM64_REG_HID0 and up. HID0 stands for Hardware Implementation-Dependent Register 0, a naming convention that comes straight out of... PowerPC.

People who were around in the GameCube/Wii homebrew era might recognize good old HID0, HID4, and friends. These are fully documented in the datasheet for the Wii's CPU, the PPC 750CL (page 60 onwards). Apple marketed (almost identical) variants of this CPU as the G3. Fun fact, you can enable Nintendo's Paired Singles SIMD extension (developed for the GameCube's "Gekko") on some G3 Macs if you flip the secret HID bits that weren't documented for those models!

Other PowerPC cores also have HID registers, such as the POWER9 (page 89), or the Cell Broadband Engine (page 317, used in the PS3), or the PPC 970FX a.k.a G5 used in other Macs (page 46). Of course, the bit definitions have nothing to do with the Apple Silicon registers, but it's nice to see Apple's silicon design team giving a shout-out to their PowerPC past!

Comments

Quite a bit faster. Newer cores, higher clock speeds, bigger caches, more RAM, and a bigger power budget to support them. Laptops can have significantly larger batteries than iPhones, and that shows in a chip designed for a laptop.

John Dallman

Same question but for the 8th GPU core. I am guessing its not always the same core that is disabled but based on bin testing (does this happen before or after packaging?). Would this be done via chicken bit fuses ?

Congratulations! If there is anyway I could help, shout out! I'm dabbling (dry, w/o hardware) trying to understand Neural Engine capabilities - and especially how can it be programmed natively, without Apple's APIs. Any idea what that core even is capable of?

How different is the M1 from an iPhone's chip?

Gabriel Amador García

Given that there's enough 8g models available that they're putting them on sale but 16g models are backordered through the end of the year I would wager they're distinct packages.

Don Whiteside

Not only Nintendo; the Xbox 360 uses a PowerPC processor and the PS3's cell processor also contains one

If it was the same part, they wouldn't be pushing the 8 GiB options as hard. What I'm more curious about is the perf difference. Striping the RAM would make for a 2X bandwidth difference, but even without that, two packages means twice the banks, so it should be measurable.

Tommy Thorn

We'll find out when I get my 8GB Mac Mini :-) But RAM is not free, so I'd be surprised if they really were putting 16GB on everything. The RAM is not on-die, it's on-package. They are probably not putting on just one chip (that would halve the bus width), but rather putting on two half-size chips.

Hector Martin

It's great to hear the PowerPC tidbits, I am deep in a GameCube reversing project right now so it's nice to know I'm not stuck in the past alone. Interesting that PowerPC played a key role for both Nintendo and Apple in the early 2000s

trvkl

Not directly but somewhat related question: Might Apple be including 16GB on all M1 SoCs and fusing-out 8GB upon stock necessities, or they are really not soldering the second chip?


Related Creators