Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-26 Thread Sam Eiderman
Kevin, Rethinking this change (where we construct the device path from outside and call boot_prio_find()), this is pretty tricky to implement since we need to take care of csm_bootprio_ata() and csm_bootprio_pci() which do not work with device path. In addition, bootprio_find_fdc_device

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-22 Thread Sam Eiderman
> On 22 Jun 2019, at 18:27, Kevin O'Connor wrote: > > On Sat, Jun 22, 2019 at 11:51:48AM +0300, Sam Eiderman wrote: >> But maybe someone wants bootorder but doesn’t want to override legacy disk >> translations… >> >> I’m thinking of maybe adding >> >> if (!CONFIG_BOOTORDER ||

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-22 Thread Kevin O'Connor
On Sat, Jun 22, 2019 at 11:51:48AM +0300, Sam Eiderman wrote: > But maybe someone wants bootorder but doesn’t want to override legacy disk > translations… > > I’m thinking of maybe adding > > if (!CONFIG_BOOTORDER || !CONFIG_BIOS_GEOMETRY) > return NULL; That's fine - though it's

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-22 Thread Sam Eiderman
But maybe someone wants bootorder but doesn’t want to override legacy disk translations… I’m thinking of maybe adding if (!CONFIG_BOOTORDER || !CONFIG_BIOS_GEOMETRY) return NULL; In each of the get_*_devpath functions (which will normally return an allocated string, not on stack).

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-21 Thread Kevin O'Connor
On Fri, Jun 21, 2019 at 08:42:28PM +0300, Sam Eiderman wrote: > Sounds reasonable, how do purpose to deal with: > > config BIOS_GEOMETRY > config BOOTORDER > > precompiler optouts? I think you can stick them both under BOOTORDER. That option is only there in case someone wants to reduce the

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-21 Thread Sam Eiderman
Sounds reasonable, how do purpose to deal with: config BIOS_GEOMETRY config BOOTORDER precompiler optouts? If we don’t need any of them we also don’t need to call “get_scsi_devpath", “get_ata_devpath”, “get_pci_dev_path”. I’ll see what can be done. > On 20 Jun 2019, at 17:37, Kevin O'Connor

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-20 Thread Kevin O'Connor
On Wed, Jun 19, 2019 at 12:23:51PM +0300, Sam Eiderman wrote: > Adding the following utility functions: > > * boot_lchs_find_pci_device > * boot_lchs_find_scsi_device > * boot_lchs_find_ata_device FWIW, this leads to a bit of code duplication. I think it would be preferable to

[Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-19 Thread Sam Eiderman
Adding the following utility functions: * boot_lchs_find_pci_device * boot_lchs_find_scsi_device * boot_lchs_find_ata_device These will be used to apply LCHS values received through fw_cfg. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman ---