2
\$\begingroup\$

Please excuse my ignorance. I'm an 'old-fashioned' guy who thinks that there is just 'software' and 'hardware' - and these are two separate things. Along this line of thinking an OS is part of the software, and a microkernel is part of the OS. (I'm aware of the debate about Microkernels - and how Linux didn't really end up using one).

I'm also aware you can do fairly amazing things with FPGAs - but perhaps I assumed this was limited to microcode and DSP.

So when I hear the quote:

Apple is using the L4 kernel ... It's the microkernel in the Secure Enclave

I'm fascinated.

I'm aware that L4 is the microkernel that has been 'proven correct' against its specification. But to me - that is part of the OS. (ie loaded from disk into memory and then instructions are transferred down to the CPU over the Bus.)

My question is: How does part of a microprocessor (Apple secure enclave) use a microkernel (L4)? (Is this a kind of FPGA? Do they feed it into the part that lays out the transistors and 'embed' the software in silicon?)

\$\endgroup\$
  • 2
    \$\begingroup\$ The Secure Enclave is a separate CPU core with its own RAM, ROM, etc, running its own kernel separate from the rest of the device. \$\endgroup\$ – Majenko Oct 14 '14 at 11:38
  • \$\begingroup\$ @Majenko - your comment seems to be the answer. Would you put into an answer, then the OP can "accept" it. \$\endgroup\$ – gbulmer Oct 14 '14 at 12:34
2
\$\begingroup\$

Majenko's answer is correct but not entirely complete. The whole thing rests on ARM's "TrustZone".

This is a stronger version of the normal concept of "ring 0" security found in operating systems, or a "hypervisor". It's a top level operating system that boots from the incorruptible ROM, configures the MMU, and then boots the "user" (phone) operating system. The special thing about the ARM version is extra MMU protection, so that the phone operating system cannot access all the hardware or memory.

Edit: see http://www.google.com/patents/US8775757

It seems to be both a distinct processor within the SoC and the "trust zone" MMU protection. Both processors have access to main memory, including a "mailbox" for communication between the two, but some memory is protected against access by anything other than the "secure enclave" processor.

The first non-patent citation of that document is "ARM Security Technology Building a Secure System using TrustZone® Technology, Copyright © 2005-2009 ARM Limited. All rights reserved, PRD29-GENC-009492C".

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ So the micro kernel is in ROM or loaded from disc? \$\endgroup\$ – hawkeye Oct 14 '14 at 19:53
  • \$\begingroup\$ It's not very clear in the diagrams; it is most likely signed/encrypted and loaded from flash. Boot ROMs are small and inflexible. There won't be a disc in the system, this is for phones. \$\endgroup\$ – pjc50 Oct 14 '14 at 20:37
  • \$\begingroup\$ Can you point to any documentation which states that TrustZone is what Apple are using rather than what @Majenko suggests? \$\endgroup\$ – Martin Thompson Oct 17 '14 at 11:04
  • 1
    \$\begingroup\$ See edit. Now I've found that patent the diagrams make it clear that the microkernel is entirely in ROM. \$\endgroup\$ – pjc50 Oct 17 '14 at 12:33
2
\$\begingroup\$

The Secure Enclave is a separate CPU core within the CPU. It has its own RAM, ROM, etc, and consequently runs its own separate OS.

You can think of it as a computer within a computer, and that "inner" computer is heavily firewalled off from the "outer" computer so only certain data can pass from one to the other.

The theory is that your especially secure information (biometric ID data, etc) is only within the ultra-secure core and can't be accessed by anything else.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ So the micro kernel is in ROM or loaded from disc? \$\endgroup\$ – hawkeye Oct 14 '14 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.