Autoconf will set a default CFLAGS of "-g -O2" if CFLAGS is not set. CFLAGS
was defaulted to "" early in configure to prevent this. A recent commit
ad9ccf660013c208077b1e983d6c824df25ed1cf ("configure: Fix various new
autotools warnings") added AC_USE_SYSTEM_EXTENSIONS, which pulls in the
autoconf
Hi Paul,
On Fri, 25 Mar 2022 07:53:29 +0100
Paul Menzel wrote:
> Dear Glenn,
>
>
> Thank you for your tireless awesome work on GRUB.
Sincerely, thank you. It seems to me that you're also deserving of this
compliment and probably more so.
> Am 24.03.22 um 23:31 schrieb Glenn Washburn:
> >
On Fri, 25 Mar 2022 11:54:59 -0400
Robbie Harwood wrote:
> Glenn Washburn writes:
>
> > Autoconf will set a default CFLAGS of "-g -O2" if CFLAGS is not set. CFLAGS
> > was defaulted to "" early in configure to prevent this. Apparently something
> > changed in autoconf and now
The grub is failing to build with gcc-12 in many places like this:
In function 'init_cbfsdisk',
inlined from 'grub_mod_init' at ../../grub-core/fs/cbfs.c:391:3:
../../grub-core/fs/cbfs.c:345:7: error: array subscript 0 is outside array
bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]'}
The tested gcc version is:
abuild@mazu:~> gcc --version
gcc (SUSE Linux) 12.0.1 20220307 (experimental) [revision
40c1d4a07e5798c01e4364336c9617550744861d]
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty;
The grub_absolute_pointer() is a compound expression that can only work
within a function. We are out of luck here when the pointer variables
require global definition due to ATTRIBUTE_TEXT that have to use fully
initialized global definition because of the way linkers work.
static gf_single_t *
The warning is real as long as dangling pointer to 'tmp_' may be used if
o32 and o64 are both null. However that is not going to happen and can
be ignored safely because the PE_OHDR is being used in a context that
either o32 or o64 must have been properly initialized. Sadly compiler
seems not to
From: Patrick Steinhardt
Adjust the interface of `grub_efi_mm_add_regions ()` to take a set of
`GRUB_MM_ADD_REGION_*` flags, which most notably is currently only the
`CONSECUTVE` flag. This allows us to set the function up as callback for
the memory subsystem and have it call out to us in case
This is handy for debugging. Enable with `set debug=regions`.
Signed-off-by: Daniel Axtens
---
grub-core/kern/mm.c | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
index 94e78f9a910d..f36499865632 100644
---
When working on memory, it's nice to be able to test your work.
Add a memtest module. When compiled with --enable-mm-debug, it exposes
3 commands:
* lsmem - print all allocations and free space in all regions
* lsfreemem - print free space in all regions
* stress_big_allocs - stress test
On powerpc-ieee1275, we are running out of memory trying to verify
anything. This is because:
- we have to load an entire file into memory to verify it. This is
difficult to change with appended signatures.
- We only have 32MB of heap.
- Distro kernels are now often around 30MB.
So we want
From: Stefan Berger
Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275
PowerPC platform. With this patch grub now measures text and binary data
into the TPM's PCRs 8 and 9 in the same way as the x86_64 platform
does.
This patch requires Daniel Axtens's patches for claiming more
On PowerVM, the first time we boot a Linux partition, we may only get
256MB of real memory area, even if the partition has more memory.
This isn't really enough. Fortunately, the Power Architecture Platform
Reference (PAPR) defines a method we can call to ask for more memory.
This is part of the
This was apparently 'required by some firmware': commit dc9468500919
("2007-02-12 Hollis Blanchard ").
It's not clear what firmware that was, and what platform from 14 years ago
which exhibited the bug then is still both in use and buggy now.
It doesn't cause issues on qemu (mac99 or pseries)
From: Patrick Steinhardt
The function `add_memory_regions ()` is currently only called on system
initialization to allocate a fixed amount of pages. As such, it didn't
need to return any errors: in case it failed, we cannot proceed anyway.
This will change with the upcoming support for
From: Patrick Steinhardt
In preparation of support for runtime-allocating additional memory
region, this patch extracts the function to retrieve the EFI memory map
and add a subset of it to GRUB's own memory regions.
Signed-off-by: Patrick Steinhardt
Signed-off-by: Daniel Axtens
---
From: Patrick Steinhardt
When initializing the EFI memory subsytem, we will by default request a
quarter of the available memory, bounded by a minimum/maximum value.
Given that we're about to extend the EFI memory system to dynamically
request additional pages from the firmware as required, this
From: Patrick Steinhardt
Currently, all platforms will set up their heap on initialization of the
platform code. While this works mostly fine, it poses some limitations
on memory management on us. Most notably, allocating big chunks of
memory in the gigabyte range would require us to pre-request
From: Patrick Steinhardt
In `grub_memalign ()`, there's a commented section which would allow for
unloading of unneeded modules in case where there is not enough free
memory available to satisfy a request. Given that this code is never
compiled in, let's remove it together with
This breaks the tests on pseries - just restrict it to x86 platforms
that don't specify a BIOS.
Signed-off-by: Daniel Axtens
---
v2: Thanks Daniel K and Glenn for feedback.
---
tests/util/grub-shell.in | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
On x86_64-efi (at least) regions seem to be added from top down. The mm
code will merge a new region with an existing region that comes
immediately before the new region. This allows larger allocations to be
satisfied that would otherwise be the case.
On powerpc-ieee1275, however, regions are
grub_mm_region_init() does:
h = (grub_mm_header_t) (r + 1);
where h is a grub_mm_header_t and r is a grub_mm_region_t.
Cells are supposed to be GRUB_MM_ALIGN aligned, but while grub_mm_dump
ensures this vs the region header, grub_mm_region_init() does not.
It's better to be explicit than
Hi all,
This is, at long last, an updated version of my series extending Patrick's
dynamic memory regions to ieee1275.
Noteworthy changes:
- reworked debug prints as grub_dprintfs. Folded the ieee1275 ones into the
ieee1275 patches.
- reworked the ieee1275 runtime memory claiming to be
23 matches
Mail list logo