Dissecting the Apple M1 GPU, Part IV
rosenzweig.io
rosenzweig.io
I really wished Apple would see, how much benefit this would bring to their platform. Their new hardware is really exciting, the first ARM on the desktop, which doesn't just compete, but in many aspects beat current x86 chips. A lot of the Linux and tech enthusiast crowd would love to jump onto Apple Silicon. And while they might not bring huge profits by themselves, these are the people who do come up with great new technologies. Better give them a home on Apple devices. It doesn't need a complete and formal documentation of every aspect, just supporting those projects with a little bit of information would go a long way. A single engineer who would answer questions by those developers might be sufficient. So come on, Apple, do it! :)
Don't hold your breath. Apple's stance by actions is the opposite.
But they do all these things for obvious reasons. Reasons you and I may not agree with or be happy about, but still obvious reasons. In the case of repair/replacement it's just because they want you to use expensive replacement parts, they want to lure you into their Apple stores, and they don't want any liability/accountability for repairs with 'unofficial' parts.
I don't see how providing specifications about how their GPU's work so someone can make a Linux driver out of it hurts their commercial interests or liability though. Yes people may screw up their system if they install Linux on a Mac and it doesn't boot anymore, but as long as you can still take it into an Apple store and they can restore it to MacOS, why would Apple actively fight the extremely small minority of people who want to do that? And even if more people (developers/enthusiasts) would buy M1 hardware and immediately slap Linux on it, why would they care about that? They still made the sale, and these people will still walk around with a machine with a big fat Apple logo on it?
They previously spent a lot of effort accomodating people who wanted to run Windows on Macs using Boot Camp, so why would they be worried about people running Linux on M1 macs?
Edit: I can imagine Apple want to protect their IP and hence don't want to disclose anything about out it, period. Much like NVidia and most other GPU manufacturers do. But if AMD and Intel can be OSS-friendly, Apple could be too, apparently IP protection does not have to be a deal-breaker.
I think the first ARM on the desktop title goes to the Acorn Archimedes (https://en.wikipedia.org/wiki/Acorn_Archimedes). It kicked ass back then as well:
> A mid-1987 Personal Computer World preview of the Archimedes based on the "A500 Development System" expressed enthusiasm about the computer's performance, that it "felt like the fastest computer I have ever used, by a considerable margin"
1. Why tho?
2. MacOS increasing lock-down makes even Linux attractive to a wider customer base, and therefore threatening their huge, carefree software extortion business.
Personally I think, they do number 2 on their customer base. I think not opening up to Linux is an indirect admission to their unfair competition game. I think Linux support would very much limit how much they can push their DRM, subscription, software extortion and expropriation mischief. It would allow for consumer choices.
"We’re looking for conspicuous gaps in our understanding of the hardware, like looking for black holes by observing the absence of light."
Gorgeous
But part of me is sad to see her working on such closed hardware now.
Does anybody think Linux on the M1 will ever be able to touch the internal SSD? Apple has been locking that down with proprietary controllers and signed firmware since their Intel days (i.e. T1 chip). Are people really going to drag around their shiny new macbooks with an external USB-C dongle hanging off of it because that's required in order to run Linux?
I worry that the endgame here is Linux becoming Just Another MacOS App. Apple is quite happy for Linux to be a MacOS app running in their VM. Elite developers will buy Macbooks and run Linux in a VM because "we'll have Linux on the bare metal soon, it's just temporary" and that will just keep getting pushed back and pushed back and pushed back...
The M1 systems depend on some number of blobs, but the amount of non-free code required to boot one looks like it'll end up being less than a typical x86 system requires.
https://github.com/corellium/linux-m1/commit/e501cce95dfcc65... https://github.com/corellium/linux-m1/commit/08f0fcce76579a5...
I have a branch adding proper NVMe platform device support based on some work by Armd. It's currently blocked on some driver deps (clock/power) and I'm working on a hypervisor for reverse engineering for now, but once those do go in (other people are working on them) it should be simple to bring up properly.
Her work on this closed hardware might define it for the future - practicalities matter. If Linux de-facto runs and even better, if it's in wise use, that makes the hardware more open and it might help bend this new platform towards openness. Getting in this early might be a benefit there too.
That isn't true, and has never been true, ever. That is a complete bullshit story made up by a YouTuber who saw that the SSD didn't show up under Linux back when the T2 Macs were released (because it didn't have a compatible driver) and decided that must mean Apple were "blocking Linux".
All internal Mac SSDs work fine under Linux these days and have for years. I have a local branch with preparatory work to bring up the M1 SSDs already (requires some driver refactoring to do it properly).
I'm really surprised that primitive restart is forced on in Metal, but they also have a hardware bit for it! Primitive restart makes your whole pipeline slower, because you can't just chunk your index list when building your vertex packets to send to the work distributors; the possibility of a primitive restart index means you have to linearly scan for it. Though I'm not a hardware guy -- maybe the degenerate tris thing makes it just as annoying in practice.
I'd guess that the limitation to force primitive restart on in Metal came from another IHV limitation (maybe old PVR chips?)
That said, you really shouldn't be using tristrips in 2021 anyway, they have poor locality, and are hard to optimize. Index buffers solve the problems that tristrips wanted to solve to begin with.
IME, a well-written app should just ignore tristrips / restartable topologies, and just use straight tri-lists.
Most likely, Apple simply doesn't build GPUs big enough to run into that problem, but it makes you wonder what they're doing on their hardware with AMD GPUs.
I don't want my speakers to stop working because I stopped paying subscription.
I say this as a longstanding iPhone user, and up until recently, Mac user.
Apples licenses for these will include very strict NDA clauses that make it impossible for apple to share the documentation they are provided but that vendor.
Sometimes backwards compatibility is preserved even to the point of preserving bugs (especially if the companies/apps depending on it are large):
https://www.triplefault.io/2017/07/breaking-backwards-compat...
https://arstechnica.com/gadgets/2008/11/ars-investigates-doe...
Right now increasing numbers of things are, "works until it doesn't" and that imposes risks and costs to everyone.
Perhaps those get high enough to warrant legislative solutions.
So why can't we just allow them to keep making those changes, but still have to document them? I'm sure they document them internally anyway.
For example, the tax could be 1 cent per page per day which is non-public.
It would apply to source code, images, or anything else that might be reasonably printed on a page.
Then companies could pay the government to keep their employees work secret, or publish it.
It should help innovation as far more work done by humans gets made available for others to build from.
It's only companies who have fully closed tech will have to pay the tax, and really that tax is compensating the rest of the country for the work and knowledge that company wants to keep secret.
Right to repair. Hasn't happened because it's not a right yet.
Alternatively maybe anti trust, since using your monopoly on hardware to get a monopoly on software which is the essence of anti trust anyways. Hasn't happened because anti trust enforcement is really weak. Probably also doesn't force documentation.
Alternatively copyright and patent misuse, which is using your government granted monopoly on creating the exact hardware (copyright), or some of the features in the hardware (patents) to get a monopoly in an adjacent area (running software on that hardware) voiding the copyrights and patents. Hasn't happened because while the law exists (in common law) the courts apply it very conservatively. Also probably doesn't get documentation, just the right to run things on it.
Alternatively an interpretation of the quid quo pro of intellectual property (i.e. you disclose something in exchange for a temporary monopoly) being interpreted more strongly, such that you have to disclose the details of the internals to get intellectual property rights. Hasn't happened yet because today the quid quo pro isn't interpreted that strongly.
Samba was able to get documentation for SMB/CIFS this way.
The interactions between a silicon chip and software drivers has nothing to do with right to repair. Never has been.
> Alternatively maybe anti trust, since using your monopoly on hardware to get a monopoly on software
Apple doesn't have a monopoly on any hardware, except insofar as any company has a natural monopoly on their own products, as made explicitly legal by copyright and patent laws.
Furthermore, one has to remember that there's a world outside of commodity PC hardware. The notion of hardware and software being separate is the rare exception, not the rule. Other than commodity PC computer hardware, nearly every product sold is both software and hardware bundled as a unit, with no marketplace expectation of end users replacing the software with an alternative. Whether you're talking about a car, washing machine, television, digital camera, microwave oven, garage door opener, CD player, indoor-outdoor thermometer, label printer, or an air conditioner, the software that comes with it is seen as part of the product.
In fact, this is even true for many computer components—companies like Nvidia aren't being any more helpful about their GPUs as Apple is with theirs.
Apple's computers straddle an interesting boundary between consumer devices and commodity PCs. But make no mistake, Apple isn't obligated to do anything here. You're not entitled to something because you want it.
> using your government granted monopoly on creating the exact hardware (copyright), or some of the features in the hardware (patents) to get a monopoly in an adjacent area (running software on that hardware)
Obviously legal. See above.
> Alternatively an interpretation of the quid quo pro of intellectual property
Obviously legal. See above.
Software bugs... you could reasonably end up with a right to fix them given the current direction of right to repair lobbying. And that right might include the right to documentation.
> Apple doesn't have a monopoly on any hardware, except insofar as any company has a natural monopoly on their own products, as made explicitly legal by copyright and patent laws.
Which is to say they have a monopoly...
Anti trust never makes having a monopoly illegal, it makes exploiting that monopoly to gain further monopolies illegal. It doesn't care about where the monopoly came from.
It does care about the kind of monopoly, current anti trust rules probably don't consider the monopoly Apple has from copyright and patents on hardware to be of the right category (to cover an entire market)... but that could easily change.
> Obviously legal. See above.
On the contrary...
https://en.wikipedia.org/wiki/Copyright_misuse
https://en.wikipedia.org/wiki/Patent_misuse
> Obviously legal. See above.
Yes, I agree under current definitions, but it would be a reasonable way for the laws to evolve. It is very similar in nature to the existing limits on patents, for example: https://www.nytimes.com/2003/03/06/business/university-s-dru...
Sure, but by that definition every commercial product constructed from multiple parts has a monopoly over all their components. Starbucks has a “monopoly” over what coffee is sold within Starbucks cups. Sorry, but I just can’t take that kind of argument seriously.
> current anti trust rules probably don't consider the monopoly Apple has from copyright and patents on hardware to be of the right category (to cover an entire market)... but that could easily change.
Copyright and patents are the very definition of a legal monopoly. I don't think you're being serious.
You're right, my reply there was poorly worded, fortunately you seem to agree with the point of the reply anyways since you say
> Copyright and patents are the very definition of a legal monopoly.
Which really is just the point.
However I am being entirely serious that there is more that not all monopolies implicate current anti trust law. Whether or not they do depends on whether or not they're a monopoly over the entirety of a market, not over a certain invention (patent) or copying a certain work of art (copyright).
You can see that at play in the current Epic v Apple case for instance. It's unambiguous that Apple has a monopoly over distributing apps to iPhones, it is ambiguous over whether the relevant market here is iPhone users, and therefore whether or not anti trust law applies.
Well, that's perhaps because that interaction's importance for the functioning of ubuquitous things in life is a relatively recent thing. I don't understand why there's supposed to be some fundamental reason why we can't change our laws to encompass also the right to repair software, or to the right to repair the interactions between hardware and software. Sure, these things aren't rights today – but who's to say we can't make it so?
Or to put it less insolently: I've learned my craft by reverse engineering; as a auto-didactic tool it's a primary learning tool, definitely beats reading the manual.
Either way, going after OS developers would be an extremely bad look for Apple, especially when they could just as easily disable the feature, or not have bothered finishing the implementation (or done it completely differently) after news of the Linux porting efforts started to spread (especially the Corellium public demo running Ubuntu).
OEM licensing makes sense for a SOC, plus the more the chip sells the lower the price per unit, so Apple would make money on the license, and lower their costs.
“ the reproduction of another manufacturer's product following detailed examination of its construction or composition.”
In the EU, EULAS that are either too long or too hard for normal people to read are not enforceable.
Also if you bought it, its yours and you can do whatever you want with it, like resell it (and Apple is being sued for not allowing users to resell AppStore apps..).
Also, the EU is going to ship a right to repair law that will force companies to make sure their products can be repaired after support ends. And that includes software. So any mac that apple sells will need to be fully usable / repairable / etc. just for the case that apple goes out of business.
How is this possible? They force them to provide source and build info? Any software is "repairable" with enough effort, just ask the NSA.
Enough effort here means users should be able to bring their own software on the device.
You won't win a legal fight against Apple unless you have more money than they're willing to spend.
How does this process work, specifically? Does Apple secretly pay judges so that they favor them or what? Otherwise, wouldn't any judge dismiss Apple's claims as ridiculous?
I don’t think it would be a problem in this case though. If Apple tried to do that to Alyssa I think she’d have the community jump to defend her. Perhaps even the EFF would take on her case. Apple would end up damaging their own brand with all the negative press that would generate. All of that on top of the stupidity of preventing people from doing what Apple themselves went out of their way to allow people to do.
This is horrific, and obviously contrary to the concepts of justice and democracy. Why do people put up with this? Can't these behaviors be voted away?
Politicians in USA has the same problem though. You either vote for politicians bought by corporations or your vote is "wasted".
Doesn't opening up driver specification also let M1 start ruling in the server spaces?
However, I run a hackintosh at home. I personally love it; I had access to top of the line hardware years before Apple offered it, with an OS that I understand and work well in, etc. It is absolutely not the way to go for any kind of must-work production. It is brittle. Apple is in the enviable position of being the only consumer of its APIs, and they barely publish documentation on the public stuff, much less internal-only provisions. Unless Apple explicitly supports (read: $$$$) a datacenter application, I can only see burning buildings (from all the hair on fire) where stable datacenters should be.
Nvidia has a real shot here with ARM purchase to fill the gaps but I doubt that's something they have as a focus.
If they had the extra volume potential, it would be cool to see an extra cost M1 computer that boots and runs Linux with no fuss.
Because of all this, when they decided to transition the Mac to custom chips, they just took the whole iDevice stack and did the absolute bare minimum changes to make it into a "technically a general purpose computer" stack. It runs basically iPhone firmware expanded to allow OS choice. They made zero effort to use any industry standards, because there was no business reason to put any effort into that, unfortunately. So we have this very unusual SoC (fucking custom interrupt controller! Even Broadcom stopped doing that crap!) running very unusual firmware (iBoot, everything is Mach-O and stuff, and the OS choice screen is actually a little macOS app). But hey it's not locked down because the Mac line is supposed to be general purpose computers, so go ahead and port Linux but you're on your own.
What you want is ACPI support if you want the platform to be compatible with higher-level ARM boot standards. Unfortunately, ACPI support assumes stuff like GIC and other hardware details. You probably want EL3 for PSCI too. But that would be a massive change to their silicon design.
So, effectively, there is no reason for them to support UEFI or any other firmware-level stuff if their chips are not compatible with Windows, which they aren't, and re-engineering their silicon to be something that could run Windows (without one-off patches from Microsoft, like they did for the Raspberry Pi which is in the same boat) would've obviously been a huge cost to them and not something they decided made business sense at this point.
Obviously Microsoft could choose to add support for these chips to Windows like we're doing with Linux, but that's on them; it requires core kernel changes that are not something you can do in drivers (last I checked Windows doesn't even support IRQ controller drivers as modules).
Yeah, not using the GIC is what I hate the most. If the SoC was less… custom, we could've even written our own ACPI tables (possibly useful ones depending on e.g. which particular Designware crap they used – the better DW PCIe controllers do support ECAM, etc.) and avoided having to redo all the work in every kernel anyone wanted to run…
the most recent NetApp filer I was paid to evaluate for a fairly large business customer, is being sold at a price that I realised isn't actually so ridiculous for my home lab use. The amount of time expended on related work involved with using cloud computing for even very occasionally run jobs has put the likes of these Ampere servers very much inside the bounds of reasonable, even thoroughly sensible, reason for private acquisition. My first thought was "if only I was even ten years younger I'd advertise a house share and load a room with a couple of racks and dump all the interactions involved with setting up what I'm doing in the cloud for higher quality interaction with some housemates who have projects that could turn my practical investment into something much more interesting" I think a ratio of 128 cores per person feels about right?
(Even a future "large" Apple SoC is unlikely to be datacenter large…)
Indeed, if you ever see rumblings of them bringing more datacenter operations to be entirely in house then at some future point I could see them leveraging that to sell externally.
Unless they got really ambitious and planned on supplanting AWS entirely and thus their hardware gives them a significant edge.
But Apple has been so bad at software in general for so long, especially on the server side of things, I'm not holding my breath for that. They certainly have the resources to do it if they had the right person to drive it though, so never say never.
So far all they've provided is an aspirational press release about how they are "working" to produce firmware with "freely redistributable binaries".
https://www.phoronix.com/scan.php?page=news_item&px=Ampere-O...
Ampere claims this future firmware will be "OSF certified", which doesn't mean much because "OSF does not require vendors to deliver firmware in open source form."
So yeah, this is cool work, kudos and everything, but the fact that a college student is doing it is the least surprising part of it if you really think about it.