Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpc/stand/hpcboot rewind progress bar when boot but...



details:   https://anonhg.NetBSD.org/src/rev/92f13f124976
branches:  trunk
changeset: 504444:92f13f124976
user:      uch <uch%NetBSD.org@localhost>
date:      Fri Mar 02 18:26:37 2001 +0000

description:
rewind progress bar when boot button is pushed.
(SH3) if check box on console window is checked, dump system register.

diffstat:

 sys/arch/hpc/stand/hpcboot/hpcmenu.cpp         |  33 +++++++++++++++++++------
 sys/arch/hpc/stand/hpcboot/hpcmenu.h           |   4 ++-
 sys/arch/hpc/stand/hpcboot/menu/rootwindow.cpp |   5 ++-
 sys/arch/hpc/stand/hpcboot/sh3/sh_arch.cpp     |   8 ++++-
 4 files changed, 37 insertions(+), 13 deletions(-)

diffs (148 lines):

diff -r c0137a1c253f -r 92f13f124976 sys/arch/hpc/stand/hpcboot/hpcmenu.cpp
--- a/sys/arch/hpc/stand/hpcboot/hpcmenu.cpp    Fri Mar 02 17:57:34 2001 +0000
+++ b/sys/arch/hpc/stand/hpcboot/hpcmenu.cpp    Fri Mar 02 18:26:37 2001 +0000
@@ -1,4 +1,4 @@
-/* -*-C++-*-   $NetBSD: hpcmenu.cpp,v 1.2 2001/02/21 16:01:53 uch Exp $        */
+/* -*-C++-*-   $NetBSD: hpcmenu.cpp,v 1.3 2001/03/02 18:26:37 uch Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -255,9 +255,30 @@
        virtual void command(int id, int msg) {
                HpcMenuInterface &menu = HpcMenuInterface::Instance();
                struct HpcMenuInterface::cons_hook_args *hook = 0;
-               int arg = 0;
+               int bit;
 
                switch(id) {
+               case IDC_CONS_CHK0:
+                       /* FALLTHROUGH */
+               case IDC_CONS_CHK1:
+                       /* FALLTHROUGH */
+               case IDC_CONS_CHK2:
+                       /* FALLTHROUGH */
+               case IDC_CONS_CHK3:
+                       /* FALLTHROUGH */
+               case IDC_CONS_CHK4:
+                       /* FALLTHROUGH */
+               case IDC_CONS_CHK5:
+                       /* FALLTHROUGH */
+               case IDC_CONS_CHK6:
+                       /* FALLTHROUGH */
+               case IDC_CONS_CHK7:
+                       bit = 1 << (id - IDC_CONS_CHK_);
+                       if (SendDlgItemMessage(_window, id, BM_GETCHECK, 0, 0))
+                               menu._cons_parameter |= bit;
+                       else
+                               menu._cons_parameter &= ~bit;
+                       break;
                case IDC_CONS_BTN0:
                        /* FALLTHROUGH */
                case IDC_CONS_BTN1:
@@ -265,14 +286,10 @@
                case IDC_CONS_BTN2:
                        /* FALLTHROUGH */
                case IDC_CONS_BTN3:
-                       for (int i = 0; i < IDC_CONS_CHK_END; i++)
-                               if (SendDlgItemMessage(_window,
-                                                      IDC_CONS_CHK_ + i,
-                                                      BM_GETCHECK, 0, 0))
-                                       arg |=(1 << i);
                        hook = &menu._cons_hook[id - IDC_CONS_BTN_];
                        if (hook->func)
-                               hook->func(hook->arg, arg);
+                               hook->func(hook->arg, menu._cons_parameter);
+                       
                        break;
                }
        }
diff -r c0137a1c253f -r 92f13f124976 sys/arch/hpc/stand/hpcboot/hpcmenu.h
--- a/sys/arch/hpc/stand/hpcboot/hpcmenu.h      Fri Mar 02 17:57:34 2001 +0000
+++ b/sys/arch/hpc/stand/hpcboot/hpcmenu.h      Fri Mar 02 18:26:37 2001 +0000
@@ -1,4 +1,4 @@
-/* -*-C++-*-   $NetBSD: hpcmenu.h,v 1.1 2001/02/09 18:34:44 uch Exp $  */
+/* -*-C++-*-   $NetBSD: hpcmenu.h,v 1.2 2001/03/02 18:26:37 uch Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -132,6 +132,7 @@
                void(*func)(void *, unsigned char);
                void *arg;
        } _cons_hook [4];
+       int _cons_parameter; // Console tab window check buttons.
 
 private:
        static HpcMenuInterface *_instance;
@@ -170,6 +171,7 @@
                _pref._version          = HPCBOOT_VERSION;
                _pref._size                     = sizeof(HpcMenuPreferences);
     
+               _cons_parameter = 0;
                memset(_cons_hook, 0, sizeof(struct cons_hook_args) * 4);
                memset(&_boot_hook, 0, sizeof(struct boot_hook_args));
        }
diff -r c0137a1c253f -r 92f13f124976 sys/arch/hpc/stand/hpcboot/menu/rootwindow.cpp
--- a/sys/arch/hpc/stand/hpcboot/menu/rootwindow.cpp    Fri Mar 02 17:57:34 2001 +0000
+++ b/sys/arch/hpc/stand/hpcboot/menu/rootwindow.cpp    Fri Mar 02 18:26:37 2001 +0000
@@ -1,4 +1,4 @@
-/* -*-C++-*-   $NetBSD: rootwindow.cpp,v 1.1 2001/02/09 18:35:01 uch Exp $     */
+/* -*-C++-*-   $NetBSD: rootwindow.cpp,v 1.2 2001/03/02 18:26:38 uch Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -152,6 +152,7 @@
                                        break;
                        }
                boot:
+                       SendMessage(_progress_bar->_window, PBM_SETPOS, 0, 0);
                        menu.print(TEXT("BOOT START\n"));
                        // inquire current options.
                        menu.get_options();
@@ -208,6 +209,7 @@
        // Progress bar
        _progress_bar = new ProgressBar(_app, *this, rect);
        _progress_bar->create(aux);
+       SendMessage(_progress_bar->_window, PBM_SETSTEP, 1, 0);
        SendMessage(_progress_bar->_window, PBM_SETPOS, 0, 0);
 
        // regsiter myself to menu
@@ -301,7 +303,6 @@
                               reinterpret_cast <HMENU>(IDC_PROGRESSBAR),
                               aux->hInstance, NULL);
        SendMessage(_window, PBM_SETRANGE, 0, MAKELPARAM(0, 12));
-       SendMessage(_window, PBM_SETSTEP, 1, 0);
 
        return IsWindow(_window) ? TRUE : FALSE;
 }
diff -r c0137a1c253f -r 92f13f124976 sys/arch/hpc/stand/hpcboot/sh3/sh_arch.cpp
--- a/sys/arch/hpc/stand/hpcboot/sh3/sh_arch.cpp        Fri Mar 02 17:57:34 2001 +0000
+++ b/sys/arch/hpc/stand/hpcboot/sh3/sh_arch.cpp        Fri Mar 02 18:26:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sh_arch.cpp,v 1.2 2001/02/21 16:01:54 uch Exp $        */
+/*     $NetBSD: sh_arch.cpp,v 1.3 2001/03/02 18:26:38 uch Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -164,9 +164,14 @@
 SHArchitecture::systemInfo()
 {
        u_int32_t reg;
+       HpcMenuInterface &menu = HpcMenuInterface::Instance();
 
        Architecture::systemInfo();
 
+       // check debug level.
+       if (menu._cons_parameter == 0)
+               return;
+
        _kmode = SetKMode(1);
 
        // Cache
@@ -212,7 +217,6 @@
 
        // HD64461
        platid_t platform;
-       HpcMenuInterface &menu = HpcMenuInterface::Instance();
        platform.dw.dw0 = menu._pref.platid_hi;
        platform.dw.dw1 = menu._pref.platid_lo;
        hd64461_dump(platform);



Home | Main Index | Thread Index | Old Index