Re: [PATCH 05/29] x86/boot/e820: Print gaps in the E820 table

From: Andy Shevchenko
Date: Fri May 16 2025 - 05:13:21 EST


On Thu, May 15, 2025 at 12:28:13PM +0200, Ingo Molnar wrote:
> * Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
> > Mon, Apr 21, 2025 at 08:51:45PM +0200, Ingo Molnar kirjoitti:

...

> > > + u64 range_start, range_end;
> >
> > struct range (from range.h) and...
>
> Yeah, using those primitives makes sense, but right now the e820 code
> isn't using them, and it's better to have similar & unified range
> handling code patterns.
>
> In principle I wouldn't be opposed to patches that convert the e820
> code to <linux/range.h> types.

Okay, perhaps a separate cleanup in the future. Not sure if I will have time,
but let's see...

...

> > > + if (range_start > range_end_prev) {
> > > + pr_info("%s: [gap %#018Lx-%#018Lx]\n",
> > > + who,
> > > + range_end_prev,
> > > + range_start-1);
> >
> > %pra
>
> This would be part of any <linux/range.h> conversion patches.
>
> > with who mentioned the "gap"?
>
> Not sure I understand?

With the range.h in place and the mentioned specifier, the above will be like

BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
BIOS-e820: [range 0x00000000000a0000-0x00000000000effff] gap
BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved

--
With Best Regards,
Andy Shevchenko