Re: [PATCH 29/29] x86/boot/e820: Treat non-type-2 'reserved' E820 region types as E820_TYPE_RESERVED

From: H. Peter Anvin
Date: Thu Apr 24 2025 - 23:56:08 EST


On 4/21/25 11:52, Ingo Molnar wrote:
Paul Menzel pointed out that ACPI specification 6.3 defines 'reserved'
E820 region types as E820_TYPE_RESERVED (type 2):

> Table 15-374 *Address Range Types* in the ACPI specification 6.3 says:
>
> > Reserved for future use. OSPM must treat any range of this type as if
> > the type returned was AddressRangeReserved.

This has relevance for device address regions, which on some firmware such
as CoreBoot, get passed to Linux as type-13 - which the kernel
treats as system regions and registers them as unavailable to drivers:


... so we should handle 13 accordingly (and probably request that the ACPI committee permanently reserve it. It would have been better to use negative numbers for OS-specific things.)

However, if we run into a value that we have never seen, say something like 84, we shouldn't assume that it is safe to do anything at all to it; in particular we really don't want to assume that it is safe to place I/O devices there.

Note that devices may be a priori set up in type 2 memory; it pretty much means "this device is treated specially by firmware, don't move it around or bad things will happen."

-hpa