Gentoo Archives: gentoo-dev

From: Ian Stakenvicius <axs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Killing UEFI Secure Boot
Date: Thu, 21 Jun 2012 15:00:51
Message-Id: 4FE336FA.2030509@gentoo.org
In Reply to: Re: [gentoo-dev] Re: Killing UEFI Secure Boot by Richard Yao
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 21/06/12 05:33 AM, Richard Yao wrote:
5 > On 06/21/2012 04:08 AM, Duncan wrote:
6 >> Richard Yao posted on Wed, 20 Jun 2012 18:16:23 -0400 as
7 >> excerpted:
8 >>
9 >>> 3. How does getting a x86 system to boot differ from getting a
10 >>> MIPS system or ARM system to boot? Does it only work because
11 >>> the vendors made it work or is x86 fundamentally harder?
12 >>
13 >> I can answer this one. x86 is harder at the bootloader stage,
14 >> but in turn easier, or perhaps simply different, at the kernel
15 >> and kernel device interface level.
16 >>
17 >> Consider, most MIPS and ARM systems ship with a specific set of
18 >> basic devices, configured to use specific IO addresses, IRQs,
19 >> etc, and that's it, at least to get up and running (USB devices,
20 >> etc, may be able to be plugged in, but they're not normally
21 >> needed for boot). If you've been keeping up with the kernel (say
22 >> via LWN, etc), this has been one of the big deals with the ARM
23 >> tree recently, as until now each "board" had its own hard-coded
24 >> kernel config directly in the tree, and it was getting
25 >> unmanageable. They're switching to "device tree", etc, allowing
26 >> the boot loader to feed the kernel a file with this information
27 >> at boot time, thus allowing a whole bunch of different boards to
28 >> boot off the same shipped kernel, while at the same time getting
29 >> the explosion of individual board files out of the kernel tree.
30 >> This is a BIG deal on ARM and similar embedded archs, but doesn't
31 >> affect x86 (either 32-bit or 64-bit) at all.
32 >>
33 >> Meanwhile, on x86, the system must be prepared for end-user
34 >> switch-out of pretty much everything. memory, storage (consider
35 >> floppy, hard drive, optical disk either direct or el-torito, USB
36 >> stick, etc, all bootable and all end-user changable!), even
37 >> quantity and speed of CPUs, and the firmware BIOS (or
38 >> replacement) must cope with that and be able to boot off it.
39 >> Even back in the 386 era when everything was jumper-configured,
40 >> users could still change pretty much everything out, other than
41 >> the mobo itself. Now days, it's even MORE complex, as most of
42 >> these devices can be configured in dozens or hundreds of mode
43 >> combinations via "plug-n- pray", and they often don't /have/ a
44 >> default -- they **MUST** be so configured in ordered to be
45 >> operable for the intended use. Sure, the BIOS CAN leave some of
46 >> it for the kernel to do, but other bits, not so much, as
47 >> otherwise, how does the kernel even get loaded -- the BIOS must
48 >> pick one of the many boot options, configure it (as well as the
49 >> CPU and the system between storage and the CPU, storage chipset,
50 >> memory, etc) at least well enough to read in the boot loader
51 >> and/or kernel. None of that's necessary on ARM, etc, because
52 >> (pretty much) everything there's a totally arbitrary-as-shipped
53 >> config, nothing to dynamically negotiate and get working before
54 >> the kernel or secondary bootloader (after the BIOS) can even
55 >> work!
56 >>
57 >
58 > A firmware replacement for the BIOS does not need to worry about
59 > floppy drives, hard drives, optical drives, usb devices, isa
60 > devices, pci devices and pci express drives, etcetera, because
61 > those live on buses, which the kernel can detect. It would need a
62 > device tree to inform the kernel of what buses are available, but
63 > that would be specific to a given board, rather than what is
64 > attached to it. If the end user makes hardware changes, the kernel
65 > should be able to handle that, with the exception of changes
66 > involving RAM, which I believe go into the device tree.
67
68 I take it the above statement is based on the kernel being directly
69 placed within the BIOS/firmware/nvram on the board, such that you
70 couldn't boot anything else but that kernel? Otherwise I don't see
71 how you could get away with the BIOS not worrying about all those
72 devices.. IE, I don't forsee many general x86 users giving up their
73 ability to boot off usb stick or cdrom or pxe based on a boot-time
74 bios choice, or to boot windows or alternative linux kernels (which
75 could be located who knows where) at whim. And I don't see how an
76 alternative BIOS would be able to provide this ability without dealing
77 with all the things Duncan mentioned...
78
79
80 -----BEGIN PGP SIGNATURE-----
81 Version: GnuPG v2.0.17 (GNU/Linux)
82
83 iF4EAREIAAYFAk/jNvoACgkQ2ugaI38ACPD0WwD+LM1PrRtpHIrxEgWcOKKd85uU
84 7JAmad5qJ7ft0mO7QlIA/2esLqMEfWgiLYko/GoHOuIq01PS1ou9XoePUuOtfCsI
85 =CwME
86 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-dev] Re: Killing UEFI Secure Boot Richard Yao <ryao@g.o>