Re: [SeaBIOS] [PATCH v2] Add option to only execute CBFS option ROMs
On 02/10/2015 06:23 PM, Paul Menzel wrote: Am Montag, den 09.02.2015, 22:53 -0600 schrieb Timothy Pearson: […] Change applied and patch reformatted. Is this more what you were looking for? Mostly, yes. It looks like you only copied the output of `git show` or something similar and did not use `git format-patch -1`. This causes the commit message to be indented which is not wanted and `git am` cannot be used. It’d be great if you could reply with the output file of `git format-patch` attached. Thanks, Paul OK. I haven't had to submit patches from GIT over a mailing list before, so let's see if I got it right this time... Thanks! -- Timothy Pearson Raptor Engineering +1 (415) 727-8645 http://www.raptorengineeringinc.com From 32b6626b0152174209f2f776d5f28f4d366efb0e Mon Sep 17 00:00:00 2001 From: Timothy Pearson tpear...@raptorengineeringinc.com Date: Tue, 10 Feb 2015 19:47:28 -0600 Subject: [PATCH 1975/1975] Add an option to only execute option ROMs contained in CBFS TEST: Booted ASUS KFSN4-DRE with iPXE ROMs built in to CBFS; with this option set the on-board network ROMs were ignored while the iPXE ROMs executed normally. Signed-off-by: Timothy Pearson tpear...@raptorengineeringinc.com --- src/Kconfig | 11 +++ src/optionroms.c |3 +++ 2 files changed, 14 insertions(+) diff --git a/src/Kconfig b/src/Kconfig index 45ca59c..9cac231 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -355,6 +355,17 @@ menu BIOS interfaces default y help Support finding and running option roms during POST. +config CBFS_OPTIONROMS_ONLY +depends on OPTIONROMS COREBOOT_FLASH +bool Only execute option ROMs stored in CBFS +default n +help +Only execute option ROMs that are stored in CBFS. +Do not scan PCI bus for option ROMs. This is useful +if one or more of your PCI devices crash/hang SeaBIOS +when executing their option ROMs, but you need to use +one or more option ROMs (such as SeaVGABIOS) that were +loaded into CBFS. config OPTIONROMS_DEPLOYED depends on OPTIONROMS QEMU bool Option roms are already at 0xc-0xf diff --git a/src/optionroms.c b/src/optionroms.c index 93d9d2f..fbcb6ca 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -253,6 +253,9 @@ copy_rom(struct rom_header *rom) static struct rom_header * map_pcirom(struct pci_device *pci) { +if (CONFIG_CBFS_OPTIONROMS_ONLY) +return NULL; + u16 bdf = pci-bdf; dprintf(6, Attempting to map option rom on dev %02x:%02x.%x\n , pci_bdf_to_bus(bdf), pci_bdf_to_dev(bdf), pci_bdf_to_fn(bdf)); -- 1.7.9.5 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add option to only execute CBFS option ROMs
Timothy Pearson wrote: Is there anything else that needs to be done before this can be merged? Have you considered creating a more fine-grained control knob than simply global on/off? Maybe a BDF blacklist, perhaps stored in CBFS? I might implement something like that in the future if I have time/inclination, but for now the on/off switch is sufficient. Sufficient sure, but it is certainly using a sledgehammer to pound a nail. Adding a blacklist instead is probably very quick. Pretty please? :) (Ultimately Kevin will decide, but maybe he also likes a blacklist.) The proposed patch also allows the user to have a completely blob-free system if desired. More general wins over fan(boy|girl) idealistic every time with me. //Peter ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add option to only execute CBFS option ROMs
On 02/10/2015 06:45 PM, Peter Stuge wrote: Timothy Pearson wrote: Is there anything else that needs to be done before this can be merged? Have you considered creating a more fine-grained control knob than simply global on/off? Maybe a BDF blacklist, perhaps stored in CBFS? //Peter ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios I might implement something like that in the future if I have time/inclination, but for now the on/off switch is sufficient. The proposed patch also allows the user to have a completely blob-free system if desired. -- Timothy Pearson Raptor Engineering +1 (415) 727-8645 http://www.raptorengineeringinc.com ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add option to only execute CBFS option ROMs
Timothy Pearson wrote: Maybe a BDF blacklist, perhaps stored in CBFS? I might implement something like that in the future if I have time/inclination, but for now the on/off switch is sufficient. Sufficient sure, but it is certainly using a sledgehammer to pound a nail. Adding a blacklist instead is probably very quick. Pretty please? :) (Ultimately Kevin will decide, but maybe he also likes a blacklist.) I can try. I am nowhere near as familiar with SeaBIOS as I am with coreboot so this might take longer than expected. Fair enough! I think there will be a lot of reusable code in SeaBIOS already. For accessing a CBFS file try: git grep romfile_loadfile For parsing file into a string array see loadBootOrder() in src/boot.c. (Not so pretty, basically open-coding strtok(), but gets the job done.) The proposed patch also allows the user to have a completely blob-free system if desired. More general wins over fan(boy|girl) idealistic every time with me. There are reasons to want a blob-free system, including security. Agreed. //Peter ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH v2] Add option to only execute CBFS option ROMs
Am Montag, den 09.02.2015, 22:53 -0600 schrieb Timothy Pearson: […] Change applied and patch reformatted. Is this more what you were looking for? Mostly, yes. It looks like you only copied the output of `git show` or something similar and did not use `git format-patch -1`. This causes the commit message to be indented which is not wanted and `git am` cannot be used. It’d be great if you could reply with the output file of `git format-patch` attached. Thanks, Paul signature.asc Description: This is a digitally signed message part ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add option to only execute CBFS option ROMs
Timothy Pearson wrote: Is there anything else that needs to be done before this can be merged? Have you considered creating a more fine-grained control knob than simply global on/off? Maybe a BDF blacklist, perhaps stored in CBFS? //Peter ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios