Re: [PATCH v2] tpm: Disable tpm verifier if tpm is not present

2023-02-27 Thread Michael Chang via Grub-devel
On Thu, Feb 23, 2023 at 02:22:27PM +0100, Daniel Kiper wrote: > Adding James, Stefan and Robbie... > > On Mon, Feb 20, 2023 at 12:57:01PM +0800, Michael Chang via Grub-devel wrote: > > On Tue, Nov 29, 2022 at 04:11:48PM +0100, Daniel Kiper wrote: > > > On Fri, Nov 25, 2022 at 03:00:48PM +0800, Mic

[RFC PATCH] gdb: Add more support for debugging on EFI platforms

2023-02-27 Thread Glenn Washburn
If the configure option --enable-efi-debug is given, then enable the printing early in EFI startup of the command needed to load symbols for the GRUB EFI kernel. This is needed because EFI firmware determines where to load the GRUB EFI at runtime, and so the relevant addresses are not known ahead o

[PATCH 4/8] gdb: Replace module symbol loading implementation with Python one

2023-02-27 Thread Glenn Washburn
Remove gmodule.pl and rewrite as a python in gdb_helper.py. This removes PERL dependency for the GRUB GDB script, but adds Python as a dependency. This is more desirable because Python is tightly integrated with GDB and can do things not even available to GDB native scripting language. GDB must be

[PATCH 5/8] gdb: Add functions to make loading from dynamically positioned targets easier

2023-02-27 Thread Glenn Washburn
Many targets, such as EFI, load GRUB at addresses that are determined at runtime. So the load addresses in kernel.exec will almost certainly be wrong. Given the address of the start of the text segment, these functions will tell GDB to load the symbols at the proper locations. It is left up to the

[PATCH 7/8] gdb: Modify gdb prompt when running gdb_grub script

2023-02-27 Thread Glenn Washburn
This will let users know that the GDB session is using the GRUB gdb scripts. Signed-off-by: Glenn Washburn --- grub-core/gdb_helper.py.in | 4 1 file changed, 4 insertions(+) diff --git a/grub-core/gdb_helper.py.in b/grub-core/gdb_helper.py.in index 8d5ee1d292cb..5ed9eab0f529 100644 --- a/

[PATCH 6/8] gdb: Allow running user-defined commands at GRUB start

2023-02-27 Thread Glenn Washburn
A new command, run_on_start, for things to do before GRUB starts executing. Currently, this is setting up the loading of module symbols as they are loaded and allowing user-defined script to be run if a command named "onstart" exists. On some platforms, notably x86, software breakpoints set in GDB

[PATCH 2/8] gdb: Conditionally run GDB script logic for dynamically or statically positioned GRUB

2023-02-27 Thread Glenn Washburn
There are broadly two classes of targets to consider when loading symbols for GRUB, targets that determine where to load GRUB at runtime (dynamically positioned) and those that do not (statically positioned). For statically poisitioned targets, symbol loading is determined at link time, so nothing

[PATCH 1/8] gdb: Move runtime module loading into runtime_load_module

2023-02-27 Thread Glenn Washburn
By moving this code into a function, it can be run re-utilized while gdb is running, not just when loading the script. This will also be useful in some following changes which will make a separate script path for targets which statically vs dynamically position GRUB code. Signed-off-by: Glenn Wash

[PATCH 0/8] GDB script improvements

2023-02-27 Thread Glenn Washburn
This series is patches 4-8 and 10-13 of the previous series "GDB script fixes and improvements", with minor rearranging and the merging of patches 10 and 11. Glenn Glenn Washburn (8): gdb: Move runtime module loading into runtime_load_module gdb: Conditionally run GDB script logic for dynamic

[PATCH 3/8] gdb: Only connect to remote target once when first sourced

2023-02-27 Thread Glenn Washburn
The gdb_grub script was originally meant to be run once when GDB first starts up via the -x argument. So it runs commands unconditionally assuming that the script has not been run before. Its nice to be able to source the script again when developing the script to modify/add commands. So only run t

[PATCH 8/8] gdb: Add extra early initialization symbols for i386-pc

2023-02-27 Thread Glenn Washburn
Add symbols for boot.image, disk.image, and lzma_decompress.image if the target is i386-pc. This is only done for i386-pc because that is the only target that uses the images. By loading the symbols for these images, these images can be more easily debugged by allowing the setting of break- points

Re: [PATCH v2 4/7] util/grub.d: activate bli module on EFI

2023-02-27 Thread Oliver Steffen
On Sat, Feb 25, 2023 at 8:41 PM Javier Martinez Canillas wrote: > Oliver Steffen writes: > > Hello Oliver, > > > Add a new configuration drop-in file that loads the > > boot-loader-interface (bli) module and runs the command in case we are > > booting on the EFI platform. > > > > Signed-off-by: