x11gfx.hidd: support 32 bit modes
[AROS.git] / rom / dosboot / menu.c
blob0bc2b419cff76c14a06cfcd076aa9015065b652d
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Main bootmenu code
6 Lang: english
7 */
9 #include <aros/config.h>
10 #include <aros/debug.h>
12 #include <proto/bootloader.h>
13 #include <proto/exec.h>
14 #include <proto/graphics.h>
15 #include <proto/intuition.h>
16 #include <proto/expansion.h>
17 #include <proto/oop.h>
18 #include <devices/keyboard.h>
19 #include <devices/rawkeycodes.h>
20 #include <devices/timer.h>
21 #include <exec/memory.h>
22 #include <graphics/driver.h>
23 #include <libraries/expansionbase.h>
24 #include <libraries/configvars.h>
25 #include <dos/filehandler.h>
26 #include <devices/trackdisk.h>
27 #include <exec/rawfmt.h>
28 #include <aros/bootloader.h>
29 #include <aros/symbolsets.h>
31 #include LC_LIBDEFS_FILE
33 #include "dosboot_intern.h"
34 #include "menu.h"
36 #define PAGE_MAIN 1
37 #define PAGE_BOOT 2
38 #define PAGE_DISPLAY 3
39 #define PAGE_EXPANSION 4
40 #define EXIT_BOOT 5
41 #define EXIT_BOOT_WNSS 6
43 #if (AROS_FLAVOUR & AROS_FLAVOUR_STANDALONE)
44 #ifdef __ppc__
45 #define INITHIDDS_KLUDGE
46 #endif
47 #endif
49 #ifdef INITHIDDS_KLUDGE
52 * This is an extremely obsolete kludge.
53 * It's still needed for ATI driver on PowerPC native.
56 static BOOL init_gfx(STRPTR gfxclassname, BOOL bootmode, LIBBASETYPEPTR DOSBootBase)
58 OOP_Class *gfxclass;
59 BOOL success = FALSE;
61 D(bug("[BootMenu] init_gfx('%s')\n", gfxclassname));
63 GfxBase = (void *)OpenLibrary("graphics.library", 41);
64 if (!GfxBase)
65 return FALSE;
67 gfxclass = OOP_FindClass(gfxclassname);
68 if (gfxclass)
70 if (!AddDisplayDriver(gfxclass, NULL, DDRV_BootMode, bootmode, TAG_DONE))
71 success = TRUE;
74 CloseLibrary(&GfxBase->LibNode);
76 ReturnBool ("init_gfxhidd", success);
79 static BOOL initHidds(LIBBASETYPEPTR DOSBootBase)
81 struct BootConfig *bootcfg = &DOSBootBase->bm_BootConfig;
83 D(bug("[BootMenu] initHidds()\n"));
85 if (bootcfg->gfxhidd) {
86 if (!OpenLibrary(bootcfg->gfxlib, 0))
87 return FALSE;
89 if (!init_gfx(bootcfg->gfxhidd, bootcfg->bootmode, DOSBootBase))
90 return FALSE;
93 D(bug("[BootMenu] initHidds: Hidds initialised\n"));
94 return TRUE;
97 #endif
99 static LONG centerx(LIBBASETYPEPTR DOSBootBase, LONG width)
101 return (DOSBootBase->bm_Screen->Width - width) / 2;
104 static LONG rightto(LIBBASETYPEPTR DOSBootBase, LONG width, LONG right)
106 return DOSBootBase->bm_Screen->Width - width - right;
109 static struct Gadget *createGadgetsBoot(LIBBASETYPEPTR DOSBootBase)
111 LONG cx = centerx((struct DOSBootBase *)DOSBootBase, 280);
113 /* Create Option Gadgets */
114 DOSBootBase->bm_MainGadgets.bootopt = createButton(
115 cx, 63, 280, 14,
116 NULL, "Boot Options...",
117 BUTTON_BOOT_OPTIONS, (struct DOSBootBase *)DOSBootBase);
118 DOSBootBase->bm_MainGadgets.displayopt = createButton(
119 cx, 84, 280, 14,
120 DOSBootBase->bm_MainGadgets.bootopt->gadget, "Display Options...",
121 BUTTON_DISPLAY_OPTIONS, (struct DOSBootBase *)DOSBootBase);
122 DOSBootBase->bm_MainGadgets.expboarddiag = createButton(
123 cx, 105, 280, 14,
124 DOSBootBase->bm_MainGadgets.displayopt->gadget, "Expansion Board Diagnostic...",
125 BUTTON_EXPBOARDDIAG, (struct DOSBootBase *)DOSBootBase);
126 /* Create BOOT Gadgets */
127 DOSBootBase->bm_MainGadgets.boot = createButton(
128 16, DOSBootBase->bottomY, 280, 14,
129 DOSBootBase->bm_MainGadgets.expboarddiag->gadget, "Boot",
130 BUTTON_BOOT, (struct DOSBootBase *)DOSBootBase);
131 DOSBootBase->bm_MainGadgets.bootnss = createButton(
132 rightto((struct DOSBootBase *)DOSBootBase, 280, 16), DOSBootBase->bottomY, 280, 14,
133 DOSBootBase->bm_MainGadgets.boot->gadget, "Boot With No Startup-Sequence",
134 BUTTON_BOOT_WNSS, (struct DOSBootBase *)DOSBootBase);
135 if (!DOSBootBase->bm_MainGadgets.bootopt ||
136 !DOSBootBase->bm_MainGadgets.displayopt ||
137 !DOSBootBase->bm_MainGadgets.expboarddiag ||
138 !DOSBootBase->bm_MainGadgets.boot ||
139 !DOSBootBase->bm_MainGadgets.bootnss)
140 return NULL;
141 return DOSBootBase->bm_MainGadgets.bootopt->gadget;
144 static struct Gadget *createGadgetsUseCancel(LIBBASETYPEPTR DOSBootBase)
146 DOSBootBase->bm_MainGadgets.use = createButton(
147 16, DOSBootBase->bottomY, 280, 14,
148 NULL, "Use",
149 BUTTON_USE, (struct DOSBootBase *)DOSBootBase);
150 DOSBootBase->bm_MainGadgets.cancel = createButton(
151 rightto((struct DOSBootBase *)DOSBootBase, 280, 16), DOSBootBase->bottomY, 280, 14,
152 DOSBootBase->bm_MainGadgets.use->gadget, "Cancel",
153 BUTTON_CANCEL, (struct DOSBootBase *)DOSBootBase);
154 if (!DOSBootBase->bm_MainGadgets.use ||
155 !DOSBootBase->bm_MainGadgets.cancel)
156 return NULL;
157 return DOSBootBase->bm_MainGadgets.use->gadget;
161 static void freeGadgetsBoot(LIBBASETYPEPTR DOSBootBase)
163 freeButtonGadget(DOSBootBase->bm_MainGadgets.boot, (struct DOSBootBase *)DOSBootBase);
164 freeButtonGadget(DOSBootBase->bm_MainGadgets.bootnss, (struct DOSBootBase *)DOSBootBase);
165 freeButtonGadget(DOSBootBase->bm_MainGadgets.bootopt, (struct DOSBootBase *)DOSBootBase);
166 freeButtonGadget(DOSBootBase->bm_MainGadgets.displayopt, (struct DOSBootBase *)DOSBootBase);
167 freeButtonGadget(DOSBootBase->bm_MainGadgets.expboarddiag, (struct DOSBootBase *)DOSBootBase);
170 static void freeGadgetsUseCancel(LIBBASETYPEPTR DOSBootBase)
172 freeButtonGadget(DOSBootBase->bm_MainGadgets.use, (struct DOSBootBase *)DOSBootBase);
173 freeButtonGadget(DOSBootBase->bm_MainGadgets.cancel, (struct DOSBootBase *)DOSBootBase);
176 static struct Gadget *createGadgets(LIBBASETYPEPTR DOSBootBase, WORD page)
178 if (page == PAGE_MAIN)
179 return createGadgetsBoot(DOSBootBase);
180 else
181 return createGadgetsUseCancel(DOSBootBase);
183 static void freeGadgets(LIBBASETYPEPTR DOSBootBase, WORD page)
185 if (page == PAGE_MAIN)
186 freeGadgetsBoot(DOSBootBase);
187 else
188 freeGadgetsUseCancel(DOSBootBase);
191 static void toggleMode(LIBBASETYPEPTR DOSBootBase)
193 #ifdef mc68000
195 * On m68k we may have ciaa.resource (if running on classic Amiga HW)
197 if (OpenResource("ciaa.resource")) {
198 volatile UWORD *beamcon0 = (UWORD*)0xdff1dc;
199 GfxBase->DisplayFlags ^= PAL | NTSC;
200 *beamcon0 = (GfxBase->DisplayFlags & PAL) ? 0x0020 : 0x0000;
202 #endif
205 static UWORD msgLoop(LIBBASETYPEPTR DOSBootBase, struct Window *win, WORD page)
207 WORD exit = -1;
208 struct IntuiMessage *msg;
209 struct Gadget *g;
211 D(bug("[BootMenu] msgLoop(DOSBootBase @ %p, Window @ %p)\n", DOSBootBase, win));
215 if (win->UserPort)
217 WaitPort(win->UserPort);
218 while ((msg = (struct IntuiMessage *)GetMsg(win->UserPort)))
220 if (msg->Class == IDCMP_VANILLAKEY) {
221 if (msg->Code == 27)
222 exit = PAGE_MAIN;
223 else if (msg->Code >= '1' && msg->Code <= '3')
224 exit = PAGE_MAIN + msg->Code - '0';
225 else if (msg->Code >= 'a' && msg->Code <='j') {
226 BYTE pos = msg->Code - 'a', i = 0;
227 struct BootNode *bn;
228 DOSBootBase->bm_BootNode = NULL;
230 Forbid(); /* .. access to ExpansionBase->MountList */
231 ForeachNode(&DOSBootBase->bm_ExpansionBase->MountList, bn)
233 if (i++ == pos)
235 DOSBootBase->bm_BootNode = bn;
236 break;
239 Permit();
241 if (DOSBootBase->bm_BootNode != NULL)
243 /* Refresh itself */
244 exit = PAGE_BOOT;
245 break;
248 else
249 toggleMode(DOSBootBase);
250 } else if (msg->Class == IDCMP_GADGETUP)
252 g = msg->IAddress;
253 switch (g->GadgetID)
255 case BUTTON_BOOT:
256 DOSBootBase->db_BootFlags &= ~BF_NO_STARTUP_SEQUENCE;
257 exit = EXIT_BOOT;
258 break;
259 case BUTTON_BOOT_WNSS:
260 DOSBootBase->db_BootFlags |= BF_NO_STARTUP_SEQUENCE;
261 exit = EXIT_BOOT_WNSS;
262 break;
263 case BUTTON_CANCEL:
264 if (page == PAGE_BOOT)
265 DOSBootBase->bm_BootNode = NULL;
266 exit = PAGE_MAIN;
267 break;
268 case BUTTON_USE:
269 /* Preserve selected value */
270 if (page == PAGE_BOOT)
271 if (DOSBootBase->bm_BootNode != NULL)
272 DOSBootBase->db_BootNode = DOSBootBase->bm_BootNode;
273 /* Fallthrough */
274 case BUTTON_CONTINUE:
275 exit = PAGE_MAIN;
276 break;
277 case BUTTON_BOOT_OPTIONS:
278 exit = PAGE_BOOT;
279 break;
280 case BUTTON_EXPBOARDDIAG:
281 exit = PAGE_EXPANSION;
282 break;
283 case BUTTON_DISPLAY_OPTIONS:
284 exit = PAGE_DISPLAY;
285 break;
288 ReplyMsg((struct Message *)msg);
291 else
293 bug("[BootMenu] msgLoop: Window lacks a userport!\n");
294 Wait(0);
296 } while (exit < 0);
298 while ((msg=(struct IntuiMessage *)GetMsg(win->UserPort)))
299 ReplyMsg(&msg->ExecMessage);
301 return exit;
304 static void initPageExpansion(LIBBASETYPEPTR DOSBootBase)
306 struct Window *win = DOSBootBase->bm_Window;
307 struct ExpansionBase *ExpansionBase = DOSBootBase->bm_ExpansionBase;
308 struct ConfigDev *cd;
309 WORD y = 50, cnt;
310 char text[100];
312 SetAPen(win->RPort, 1);
313 cd = NULL;
314 cnt = 0;
315 while ((cd = FindConfigDev(cd, -1, -1))) {
316 NewRawDoFmt("%2d: %08lx - %08lx (%08lx) %5d %3d %08lx", RAWFMTFUNC_STRING, text,
317 ++cnt,
318 cd->cd_BoardAddr, cd->cd_BoardAddr + cd->cd_BoardSize - 1, cd->cd_BoardSize,
319 cd->cd_Rom.er_Manufacturer, cd->cd_Rom.er_Product, cd->cd_Rom.er_SerialNumber);
320 if ((cd->cd_Rom.er_Type & ERT_TYPEMASK) == ERT_ZORROIII)
321 strcat(text, " Z3");
322 else if ((cd->cd_Rom.er_Type & ERT_TYPEMASK) == ERT_ZORROII)
323 strcat(text, " Z2");
324 else
325 strcat(text, " ");
326 if (cd->cd_Rom.er_Type & ERTF_DIAGVALID)
327 strcat(text, " ROM");
328 if (cd->cd_Rom.er_Type & ERTF_MEMLIST)
329 strcat(text, " RAM");
330 Move(win->RPort, 20, y);
331 Text(win->RPort, text, strlen(text));
332 y += 16;
336 static void initPageBoot(LIBBASETYPEPTR DOSBootBase)
338 struct Window *win = DOSBootBase->bm_Window;
339 struct BootNode *bn;
340 WORD y = 70;
341 WORD xoff = (win->Width - 640) / 2;
342 char text[100], *textp;
344 SetAPen(win->RPort, 1);
346 ForeachNode(&DOSBootBase->bm_ExpansionBase->MountList, bn)
348 struct DeviceNode *dn = bn->bn_DeviceNode;
349 struct FileSysStartupMsg *fssm = BADDR(dn->dn_Startup);
350 struct DosEnvec *de = NULL;
351 struct IOStdReq *io;
352 struct MsgPort *port;
353 char dostype[5];
354 UBYTE i;
355 ULONG size;
356 BOOL devopen, ismedia;
358 if (y >= DOSBootBase->bottomY - 20)
359 break;
360 if (!fssm || !fssm->fssm_Device)
361 continue;
362 if (fssm->fssm_Environ > (BPTR)0x64) {
363 de = BADDR(fssm->fssm_Environ);
364 if (de->de_TableSize < 15)
365 de = NULL;
368 NewRawDoFmt("%c%10s: %4d %s-%ld", RAWFMTFUNC_STRING, text,
369 (DOSBootBase->bm_BootNode == bn) ? '*' : IsBootableNode(bn) ? '+' : ' ',
370 AROS_BSTR_ADDR(dn->dn_Name),
371 bn->bn_Node.ln_Pri,
372 AROS_BSTR_ADDR(fssm->fssm_Device),
373 fssm->fssm_Unit);
374 Move(win->RPort, 20 + xoff, y);
375 Text(win->RPort, text, strlen(text));
377 textp = NULL;
378 devopen = ismedia = FALSE;
379 if ((port = (struct MsgPort*)CreateMsgPort())) {
380 if ((io = (struct IOStdReq*)CreateIORequest(port, sizeof(struct IOStdReq)))) {
381 if (!OpenDevice(AROS_BSTR_ADDR(fssm->fssm_Device), fssm->fssm_Unit, (struct IORequest*)io, fssm->fssm_Flags)) {
382 devopen = TRUE;
383 io->io_Command = TD_CHANGESTATE;
384 io->io_Actual = 1;
385 DoIO((struct IORequest*)io);
386 if (!io->io_Error && io->io_Actual == 0)
387 ismedia = TRUE;
388 CloseDevice((struct IORequest*)io);
390 DeleteIORequest((struct IORequest*)io);
392 DeleteMsgPort(port);
395 if (de && ismedia) {
396 STRPTR sunit = "kMGT";
398 for (i = 0; i < 4; i++) {
399 dostype[i] = (de->de_DosType >> ((3 - i) * 8)) & 0xff;
400 if (dostype[i] < 9)
401 dostype[i] += '0';
402 else if (dostype[i] < 32)
403 dostype[i] = '.';
405 dostype[4] = 0;
407 size = (de->de_HighCyl - de->de_LowCyl + 1) * de->de_Surfaces * de->de_BlocksPerTrack;
408 /* try to prevent ULONG overflow */
409 if (de->de_SizeBlock <= 128)
410 size /= 2;
411 else
412 size *= de->de_SizeBlock / 256;
413 while(size > 1024 * 10) { /* Wrap on 10x unit to be more precise in displaying */
414 size /= 1024;
415 sunit++;
418 NewRawDoFmt("%s [%08lx] %ld%c", RAWFMTFUNC_STRING, text,
419 dostype, de->de_DosType,
420 size, (*sunit));
421 textp = text;
422 } else if (!devopen) {
423 textp = "[device open error]";
424 } else if (!ismedia) {
425 textp = "[no media]";
427 if (textp) {
428 Move(win->RPort, 400 + xoff, y);
429 Text(win->RPort, textp, strlen(textp));
432 y += 16;
438 static void centertext(LIBBASETYPEPTR DOSBootBase, BYTE pen, WORD y, const char *text)
440 struct Window *win = DOSBootBase->bm_Window;
441 SetAPen(win->RPort, pen);
442 Move(win->RPort, win->Width / 2 - TextLength(win->RPort, text, strlen(text)) / 2, y);
443 Text(win->RPort, text, strlen(text));
446 static void initPage(LIBBASETYPEPTR DOSBootBase, WORD page)
448 UBYTE *text;
450 if (page == PAGE_DISPLAY)
451 text = "Display Options";
452 else if (page == PAGE_EXPANSION)
453 text = "Expansion Board Diagnostic";
454 else if (page == PAGE_BOOT)
455 text = "Boot Options";
456 else
457 text = "AROS Early Startup Control";
458 centertext(DOSBootBase, 2, 10, text);
460 if (page == PAGE_BOOT)
462 /* Set the default */
463 if (DOSBootBase->bm_BootNode == NULL)
464 DOSBootBase->bm_BootNode = DOSBootBase->db_BootNode;
466 initPageBoot(DOSBootBase);
467 centertext(DOSBootBase, 1, 30, "Press A-J to select boot device");
468 centertext(DOSBootBase, 1, 45, "\"+\" => bootable, \"*\" => selected for boot");
471 else if (page == PAGE_EXPANSION)
472 initPageExpansion(DOSBootBase);
474 if (page == PAGE_MAIN && (GfxBase->DisplayFlags & (NTSC | PAL))) {
475 ULONG modeid = GetVPModeID(&DOSBootBase->bm_Screen->ViewPort);
476 if (modeid != INVALID_ID && (((modeid & MONITOR_ID_MASK) == NTSC_MONITOR_ID) || ((modeid & MONITOR_ID_MASK) == PAL_MONITOR_ID))) {
477 centertext(DOSBootBase, 1, 30, "(press a key to toggle the display between PAL and NTSC)");
483 static WORD initWindow(LIBBASETYPEPTR DOSBootBase, struct BootConfig *bcfg, WORD page)
485 struct Gadget *first = NULL;
486 WORD newpage = -1;
488 if ((first = createGadgets(DOSBootBase, page)) != NULL)
490 struct NewWindow nw =
492 0, 0, /* Left, Top */
493 DOSBootBase->bm_Screen->Width, /* Width, Height */
494 DOSBootBase->bm_Screen->Height,
495 0, 1, /* DetailPen, BlockPen */
496 IDCMP_MOUSEBUTTONS | IDCMP_MOUSEMOVE | IDCMP_VANILLAKEY | IDCMP_GADGETUP | IDCMP_GADGETDOWN, /* IDCMPFlags */
497 WFLG_SMART_REFRESH | WFLG_BORDERLESS | WFLG_ACTIVATE, /* Flags */
498 first, /* FirstGadget */
499 NULL, /* CheckMark */
500 NULL, /* Title */
501 DOSBootBase->bm_Screen, /* Screen */
502 NULL, /* BitMap */
503 0, 0, /* MinWidth, MinHeight */
504 0, 0, /* MaxWidth, MaxHeight */
505 CUSTOMSCREEN, /* Type */
508 D(bug("[BootMenu] initPage: Gadgets created @ %p\n", first));
510 if ((DOSBootBase->bm_Window = OpenWindow(&nw)) != NULL)
512 D(bug("[BootMenu] initScreen: Window opened @ %p\n", DOSBootBase->bm_Window));
513 D(bug("[BootMenu] initScreen: Window RastPort @ %p\n", DOSBootBase->bm_Window->RPort));
514 D(bug("[BootMenu] initScreen: Window UserPort @ %p\n", DOSBootBase->bm_Window->UserPort));
515 initPage(DOSBootBase, page);
516 newpage = msgLoop(DOSBootBase, DOSBootBase->bm_Window, page);
518 CloseWindow(DOSBootBase->bm_Window);
520 freeGadgets(DOSBootBase, page);
522 return newpage;
525 static BOOL initScreen(LIBBASETYPEPTR DOSBootBase, struct BootConfig *bcfg)
527 WORD page;
529 D(bug("[BootMenu] initScreen()\n"));
531 page = -1;
532 DOSBootBase->bm_Screen = OpenBootScreen(DOSBootBase);
533 if (DOSBootBase->bm_Screen)
535 DOSBootBase->bottomY = DOSBootBase->bm_Screen->Height - (DOSBootBase->bm_Screen->Height > 256 ? 32 : 16);
536 D(bug("[BootMenu] initScreen: Screen opened @ %p\n", DOSBootBase->bm_Screen));
538 page = PAGE_MAIN;
539 do {
540 page = initWindow(DOSBootBase, bcfg, page);
541 } while (page != EXIT_BOOT && page != EXIT_BOOT_WNSS);
542 CloseBootScreen(DOSBootBase->bm_Screen, DOSBootBase);
544 return page >= 0;
547 /* From keyboard.device/keyboard_intern.h */
548 #define KB_MAXKEYS 256
549 #define KB_MATRIXSIZE (KB_MAXKEYS/(sizeof(UBYTE)*8))
550 #define ioStd(x) ((struct IOStdReq *)x)
552 static BOOL buttonsPressed(LIBBASETYPEPTR DOSBootBase)
554 BOOL success = FALSE;
555 struct MsgPort *mp = NULL;
556 UBYTE matrix[KB_MATRIXSIZE];
558 #ifdef mc68000
560 * On m68k we may have ciaa.resource (if running on classic Amiga HW)
561 * Let's check mouse buttons.
563 if (OpenResource("ciaa.resource"))
565 volatile UBYTE *cia = (UBYTE*)0xbfe001;
566 volatile UWORD *potinp = (UWORD*)0xdff016;
568 /* check left + right mouse button state */
569 if ((cia[0] & 0x40) == 0 && (potinp[0] & 0x0400) == 0)
570 return TRUE;
572 #endif
574 if ((mp = CreateMsgPort()) != NULL)
576 struct IORequest *io = NULL;
577 if ((io = CreateIORequest(mp, sizeof ( struct IOStdReq))) != NULL)
579 if (0 == OpenDevice("keyboard.device", 0, io, 0))
581 D(bug("[BootMenu] buttonsPressed: Checking KBD_READMATRIX\n"));
582 ioStd(io)->io_Command = KBD_READMATRIX;
583 ioStd(io)->io_Data = matrix;
584 ioStd(io)->io_Length = sizeof(matrix);
585 DoIO(io);
586 if (0 == io->io_Error)
589 int i;
590 bug("[BootMenu] buttonsPressed: Matrix : ");
591 for (i = 0; i < ioStd(io)->io_Actual; i ++)
593 bug("%02x ", matrix[i]);
595 bug("\n");
597 if (matrix[RAWKEY_SPACE/8] & (1<<(RAWKEY_SPACE%8)))
599 D(bug("[BootMenu] SPACEBAR pressed\n"));
600 success = TRUE;
603 CloseDevice(io);
605 DeleteIORequest(io);
607 DeleteMsgPort(mp);
609 return success;
612 int bootmenu_Init(LIBBASETYPEPTR LIBBASE, BOOL WantBootMenu)
614 BOOL bmi_RetVal = FALSE;
616 D(bug("[BootMenu] bootmenu_Init()\n"));
618 #ifdef INITHIDDS_KLUDGE
620 * PCI hardware display drivers still need external initialization.
621 * This urgently needs to be fixed. After fixing this kludge
622 * will not be needed any more.
624 InitBootConfig(&LIBBASE->bm_BootConfig);
625 if (!initHidds(LIBBASE))
626 return FALSE;
627 #endif
629 /* check keyboard if needed */
630 if (!WantBootMenu)
631 WantBootMenu = buttonsPressed(LIBBASE);
633 /* Bring up early startup menu if requested */
634 if (WantBootMenu)
636 D(kprintf("[BootMenu] bootmenu_Init: Entering Boot Menu ...\n"));
637 bmi_RetVal = initScreen(LIBBASE, &LIBBASE->bm_BootConfig);
640 return bmi_RetVal;