On 20.06.19 14:07, 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.
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 <dw...@infradead.org>
---
v2: No code change, just correct the commit message.
src/fw/csm.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/fw/csm.c b/src/fw/csm.c
index 3fcc252..7663d31 100644
--- a/src/fw/csm.c
+++ b/src/fw/csm.c
@@ -319,6 +319,20 @@ handle_csm(struct bregs *regs)
csm_return(regs);
}
+static int csm_prio_to_seabios(u16 csm_prio)
+{
+ switch (csm_prio) {
+ case BBS_DO_NOT_BOOT_FROM:
+ case BBS_IGNORE_ENTRY:
+ return -1;
+
+ case BBS_LOWEST_PRIORITY:
+ case BBS_UNPRIORITIZED_ENTRY:
+ default:
+ return csm_prio + 1;
Can you please add an inline comment for this to explain why exactly the
+ 1 is needed? It's non-obvious enough that the git log is too far as
information source.
Alex
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org