[SeaBIOS] Re: [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

[SeaBIOS] Re: [PATCH v2] csm: Fix boot priority translation

2019-06-20 Thread Kevin O'Connor
On Thu, Jun 20, 2019 at 03:12:33PM +0100, David Woodhouse wrote: > On Thu, 2019-06-20 at 09:43 -0400, Kevin O'Connor wrote: > > On Thu, Jun 20, 2019 at 01:07:45PM +0100, David Woodhouse wrote: > > > For CSM, the highest priority for a boot entry is zero. SeaBIOS doesn't > > > use zero, and the

[SeaBIOS] Re: [PATCH v2] csm: Fix boot priority translation

2019-06-20 Thread David Woodhouse
On Thu, 2019-06-20 at 09:43 -0400, Kevin O'Connor wrote: > On Thu, Jun 20, 2019 at 01:07:45PM +0100, David Woodhouse wrote: > > For CSM, the highest priority for a boot entry is zero. SeaBIOS doesn't > > use zero, and the highest priority is 1. > > FYI, SeaBIOS does treat zero as the highest

[SeaBIOS] Re: [PATCH v2] csm: Fix boot priority translation

2019-06-20 Thread Kevin O'Connor
On Thu, Jun 20, 2019 at 01:07:45PM +0100, David Woodhouse wrote: > For CSM, the highest priority for a boot entry is zero. SeaBIOS doesn't > use zero, and the highest priority is 1. FYI, SeaBIOS does treat zero as the highest priority. And a negative priority means "use default priority". I'm

[SeaBIOS] [PATCH v2] csm: Fix boot priority translation

2019-06-20 Thread David Woodhouse
For CSM, the highest priority for a boot entry is zero. SeaBIOS doesn't use zero, and the highest priority is 1. Make the results of csm_bootprio_*() conform to that convention. Also explicitly handle the BBS_DO_NOT_BOOT_FROM and BBS_IGNORE_ENTRY values. Signed-off-by: David Woodhouse --- v2:

[SeaBIOS] Re: [PATCH v3 4/4] geometry: Apply LCHS values for boot devices

2019-06-20 Thread Gerd Hoffmann
On Thu, Jun 20, 2019 at 11:52:01AM +0300, Sam Eiderman wrote: > > > > On 20 Jun 2019, at 8:42, Gerd Hoffmann wrote: > > > >> +static int > >> +overriden_lchs_supplied(struct drive_s *drive) > >> +{ > >> +return drive->lchs.cylinder || drive->lchs.head || drive->lchs.sector; > >> +} > > >

[SeaBIOS] Re: [PATCH] csm: Fix boot priority translation

2019-06-20 Thread David Woodhouse
On Wed, 2019-06-19 at 12:27 +0100, David Woodhouse wrote: > For CSM, the highest priority is zero. In SeaBIOS that means "don't", and > the highest priority is 1. > > So we end up with the fun outcome that booting from NVMe worked only > when it *wasn't* selected as the primary boot target,

[SeaBIOS] Re: [PATCH v3 4/4] geometry: Apply LCHS values for boot devices

2019-06-20 Thread Sam Eiderman
> On 20 Jun 2019, at 8:42, Gerd Hoffmann wrote: > >> +static int >> +overriden_lchs_supplied(struct drive_s *drive) >> +{ >> +return drive->lchs.cylinder || drive->lchs.head || drive->lchs.sector; >> +} > >> +case TRANSLATION_MACHINE: > > Hmm, why this name? Doesn't look intuitive

[SeaBIOS] Re: [QEMU] [PATCH v4 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-20 Thread Sam Eiderman
> On 20 Jun 2019, at 8:50, Gerd Hoffmann wrote: > >> === OUTPUT BEGIN === >> 1/8 Checking commit cf2168a66dbd (block: Refactor macros - fix tabbing) >> ERROR: Macros with complex values should be enclosed in parenthesis >> #55: FILE: include/hw/block/block.h:65: >> +#define