Print this page
NEX-16819 loader UEFI support
Includes work by Toomas Soome <tsoome@me.com>
Upstream commits:
    loader: pxe receive cleanup
    9475 libefi: Do not return only if ReceiveFilter
    installboot: should support efi system partition
    8931 boot1.efi: scan all display modes rather than
    loader: spinconsole updates
    loader: gfx experiment to try GOP Blt() function.
    sha1 build test
    loader: add sha1 hash calculation
    common/sha1: update for loader build
    loader: biosdisk rework
    uts: 32-bit kernel FB needs mapping in low memory
    uts: add diag-device
    uts: boot console mirror with diag-device
    uts: enable very early console on ttya
    kmdb: add diag-device as input/output device
    uts: test VGA memory exclusion from mapping
    uts: clear boot mapping and protect boot pages test
    uts: add dboot map debug printf
    uts: need to release FB pages in release_bootstrap()
    uts: add screenmap ioctl
    uts: update sys/queue.h
    loader: add illumos uts/common to include path
    loader: tem/gfx font cleanup
    loader: vbe checks
    uts: gfx_private set KD_TEXT when KD_RESETTEXT is
    uts: gfx 8-bit update
    loader: gfx 8-bit fix
    loader: always set media size from partition.
    uts: MB2 support for 32-bit kernel
    loader: x86 should have tem 80x25
    uts: x86 should have tem 80x25
    uts: font update
    loader: font update
    uts: tem attributes
    loader: tem.c comment added
    uts: use font module
    loader: add font module
    loader: build rules for new font setup
    uts: gfx_private update for new font structure
    uts: early boot update for new font structure
    uts: font update
    uts: font build rules update for new fonts
    uts: tem update to new font structure
    loader: module.c needs to include tem_impl.h
    uts: gfx_private 8x16 font rework
    uts: make font_lookup public
    loader: font rework
    uts: font rework
    9259 libefi: efi_alloc_and_read should check for PMBR
    uts: tem utf-8 support
    loader: implement tem utf-8 support
    loader: tem should be able to display UTF-8
    7784 uts: console input should support utf-8
    7796 uts: ldterm default to utf-8
    uts: do not reset serial console
    uts: set up colors even if tem is not console
    uts: add type for early boot properties
    uts: gfx_private experiment with drm and vga
    uts: gfx_private should use setmode drm callback.
    uts: identify FB types and set up gfx_private based
    loader: replace gop and vesa with framebuffer
    uts: boot needs simple tem to support mdb
    uts: boot_keyboard should emit esc sequences for
    uts: gfx_private FB showuld be written by line
    kmdb: set terminal window size
    uts: gfx_private needs to keep track of early boot FB
    pnglite: move pnglite to usr/src/common
    loader: gfx_fb
    ficl-sys: add gfx primitives
    loader: add illumos.png logo
    ficl: add fb-putimage
    loader: add png support
    loader: add alpha blending for gfx_fb
    loader: use term-drawrect for menu frame
    ficl: add simple gfx words
    uts: provide fb_info via fbgattr dev_specific array.
    uts: gfx_private add alpha blending
    uts: update sys/ascii.h
    uts: tem OSC support (incomplete)
    uts: implement env module support and use data from
    uts: tem get colors from early boot data
    loader: use crc32 from libstand (libz)
    loader: optimize for size
    loader: pass tem info to the environment
    loader: import tem for loader console
    loader: UEFI loader needs to set ISADIR based on
    loader: need UEFI32 support
    8918 loader.efi: add vesa edid support
    uts: tem_safe_pix_clear_prom_output() should only
    uts: tem_safe_pix_clear_entire_screen() should use
    uts: tem_safe_check_first_time() should query cursor
    uts: tem implement cls callback & visual_io v4
    uts: gfx_vgatext use block cursor for vgatext
    uts: gfx_private implement cls callback & visual_io
    uts: gfx_private bitmap framebuffer implementation
    uts: early start frame buffer console support
    uts: font functions should check the input char
    uts: font rendering should support 16/24/32bit depths
    uts: use smallest font as fallback default.
    uts: update terminal dimensions based on selected
    7834 uts: vgatext should use gfx_private
    uts: add spacing property to 8859-1.bdf
    terminfo: add underline for sun-color
    terminfo: sun-color has 16 colors
    uts: add font load callback type
    loader: do not repeat int13 calls with error 0x20 and
    8905 loader: add skein/edonr support
    8904 common/crypto: make skein and edonr loader
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Revert "NEX-16819 loader UEFI support"
This reverts commit ec06b9fc617b99234e538bf2e7e4d02a24993e0c.
Reverting due to failures in the zfs-tests and the sharefs-tests
NEX-16819 loader UEFI support
Includes work by Toomas Soome <tsoome@me.com>
Upstream commits:
    loader: pxe receive cleanup
    9475 libefi: Do not return only if ReceiveFilter
    installboot: should support efi system partition
    8931 boot1.efi: scan all display modes rather than
    loader: spinconsole updates
    loader: gfx experiment to try GOP Blt() function.
    sha1 build test
    loader: add sha1 hash calculation
    common/sha1: update for loader build
    loader: biosdisk rework
    uts: 32-bit kernel FB needs mapping in low memory
    uts: add diag-device
    uts: boot console mirror with diag-device
    uts: enable very early console on ttya
    kmdb: add diag-device as input/output device
    uts: test VGA memory exclusion from mapping
    uts: clear boot mapping and protect boot pages test
    uts: add dboot map debug printf
    uts: need to release FB pages in release_bootstrap()
    uts: add screenmap ioctl
    uts: update sys/queue.h
    loader: add illumos uts/common to include path
    loader: tem/gfx font cleanup
    loader: vbe checks
    uts: gfx_private set KD_TEXT when KD_RESETTEXT is
    uts: gfx 8-bit update
    loader: gfx 8-bit fix
    loader: always set media size from partition.
    uts: MB2 support for 32-bit kernel
    loader: x86 should have tem 80x25
    uts: x86 should have tem 80x25
    uts: font update
    loader: font update
    uts: tem attributes
    loader: tem.c comment added
    uts: use font module
    loader: add font module
    loader: build rules for new font setup
    uts: gfx_private update for new font structure
    uts: early boot update for new font structure
    uts: font update
    uts: font build rules update for new fonts
    uts: tem update to new font structure
    loader: module.c needs to include tem_impl.h
    uts: gfx_private 8x16 font rework
    uts: make font_lookup public
    loader: font rework
    uts: font rework
    libefi: efi_alloc_and_read should check for PMBR
    uts: tem utf-8 support
    loader: implement tem utf-8 support
    loader: tem should be able to display UTF-8
    7784 uts: console input should support utf-8
    7796 uts: ldterm default to utf-8
    uts: do not reset serial console
    uts: set up colors even if tem is not console
    uts: add type for early boot properties
    uts: gfx_private experiment with drm and vga
    uts: gfx_private should use setmode drm callback.
    uts: identify FB types and set up gfx_private based
    loader: replace gop and vesa with framebuffer
    uts: boot needs simple tem to support mdb
    uts: boot_keyboard should emit esc sequences for
    uts: gfx_private FB showuld be written by line
    kmdb: set terminal window size
    uts: gfx_private needs to keep track of early boot FB
    pnglite: move pnglite to usr/src/common
    loader: gfx_fb
    ficl-sys: add gfx primitives
    loader: add illumos.png logo
    ficl: add fb-putimage
    loader: add png support
    loader: add alpha blending for gfx_fb
    loader: use term-drawrect for menu frame
    ficl: add simple gfx words
    uts: provide fb_info via fbgattr dev_specific array.
    uts: gfx_private add alpha blending
    uts: update sys/ascii.h
    uts: tem OSC support (incomplete)
    uts: implement env module support and use data from
    uts: tem get colors from early boot data
    loader: use crc32 from libstand (libz)
    loader: optimize for size
    loader: pass tem info to the environment
    loader: import tem for loader console
    loader: UEFI loader needs to set ISADIR based on
    loader: need UEFI32 support
    8918 loader.efi: add vesa edid support
    uts: tem_safe_pix_clear_prom_output() should only
    uts: tem_safe_pix_clear_entire_screen() should use
    uts: tem_safe_check_first_time() should query cursor
    uts: tem implement cls callback & visual_io v4
    uts: gfx_vgatext use block cursor for vgatext
    uts: gfx_private implement cls callback & visual_io
    uts: gfx_private bitmap framebuffer implementation
    uts: early start frame buffer console support
    uts: font functions should check the input char
    uts: font rendering should support 16/24/32bit depths
    uts: use smallest font as fallback default.
    uts: update terminal dimensions based on selected
    7834 uts: vgatext should use gfx_private
    uts: add spacing property to 8859-1.bdf
    terminfo: add underline for sun-color
    terminfo: sun-color has 16 colors
    uts: add font load callback type
    loader: do not repeat int13 calls with error 0x20 and
    8905 loader: add skein/edonr support
    8904 common/crypto: make skein and edonr loader
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/loadkeys/dumpkeys.c
          +++ new/usr/src/cmd/loadkeys/dumpkeys.c
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   * and limitations under the License.
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22      -#ifndef lint
  23      -#ident  "%Z%%M% %I%     %E% SMI"
  24      -#endif
  25   22  
  26   23  /*
  27   24   * Copyright (c) 1988 by Sun Microsystems, Inc.
  28   25   */
  29   26  
  30   27  #include <sys/types.h>
  31   28  #include <ctype.h>
  32   29  #include <stdio.h>
  33   30  #include <fcntl.h>
  34   31  #include <sys/kbd.h>
↓ open down ↓ 24 lines elided ↑ open up ↑
  59   56          { "up",         UPMASK,         SM_UP },
  60   57  };
  61   58  
  62   59  #define NSHIFTS (sizeof (shiftmasks) / sizeof (shiftmasks[0]))
  63   60  
  64   61  static void     printentry(struct kiockeymap *kio);
  65   62  static void     printchar(int character, int delim);
  66   63  
  67   64  /*ARGSUSED*/
  68   65  int
  69      -main(argc, argv)
  70      -        int argc;
  71      -        char **argv;
       66 +main(int argc, char **argv)
  72   67  {
  73   68          register int kbdfd;
  74   69          register int keystation;
  75   70          register int shift;
  76   71          int ktype;
  77   72          struct kiockeymap keyentry[NSHIFTS];
  78   73          register int allsame;
  79   74  
  80   75          if ((kbdfd = open("/dev/kbd", O_WRONLY)) < 0) {
  81   76                  perror("dumpkeys: /dev/kbd");
↓ open down ↓ 153 lines elided ↑ open up ↑
 235  230          "metabit",
 236  231          "systembit",
 237  232  };
 238  233  
 239  234  #define NBUCKYBITS      (sizeof (buckybits) / sizeof (buckybits[0]))
 240  235  
 241  236  static char *funnies[] = {
 242  237          "nop",
 243  238          "oops",
 244  239          "hole",
      240 +        "",                     /* not used */
      241 +        "",                     /* not used */
      242 +        "",                     /* not used */
 245  243          "reset",
 246  244          "error",
 247  245          "idle",
 248  246          "compose",
 249  247          "nonl",
 250  248  };
 251  249  
 252  250  #define NFUNNIES        (sizeof (funnies) / sizeof (funnies[0]))
 253  251  
 254  252  static char *fa_class[] = {
 255  253          "fa_umlaut",
 256  254          "fa_cflex",
 257  255          "fa_tilde",
 258  256          "fa_cedilla",
 259  257          "fa_acute",
 260  258          "fa_grave",
      259 +        "fa_macron",
      260 +        "fa_breve",
      261 +        "fa_dot",
      262 +        "fa_slash",
      263 +        "fa_ring",
      264 +        "fa_apostrophe",
      265 +        "fa_dacute",
      266 +        "fa_ogonek",
      267 +        "fa_caron"
 261  268  };
 262  269  
 263  270  #define NFA_CLASS       (sizeof (fa_class) / sizeof (fa_class[0]))
 264  271  
 265  272  typedef struct {
 266  273          char    *string;
 267  274          char    *name;
 268  275  } builtin_string_t;
 269  276  
 270  277  builtin_string_t builtin_strings[] = {
↓ open down ↓ 33 lines elided ↑ open up ↑
 304  311          "pad2",
 305  312          "pad3",
 306  313          "pad0",
 307  314          "paddot",
 308  315          "padenter",
 309  316  };
 310  317  
 311  318  #define NPADKEYS        (sizeof (padkeys) / sizeof (padkeys[0]))
 312  319  
 313  320  static void
 314      -printentry(kio)
 315      -        register struct kiockeymap *kio;
      321 +printentry(struct kiockeymap *kio)
 316  322  {
 317      -        register int entry = (kio->kio_entry & 0x1F);
 318      -        register int fkeyset;
 319      -        register int i;
 320      -        register int c;
      323 +        int entry = (kio->kio_entry & 0x1F);
      324 +        int fkeyset;
      325 +        int i;
      326 +        int c;
 321  327  
 322      -        switch (kio->kio_entry >> 8) {
      328 +        switch (KEYFLAGS(kio->kio_entry)) {
 323  329  
 324  330          case 0x0:
 325  331                  if (kio->kio_entry == '"')
 326  332                          (void) printf("'\"'");  /* special case */
 327  333                  else if (kio->kio_entry == ' ')
 328  334                          (void) printf("' '");   /* special case */
 329  335                  else
 330  336                          printchar((int)kio->kio_entry, '\'');
 331  337                  break;
 332  338  
 333      -        case SHIFTKEYS >> 8:
      339 +        case SHIFTKEYS:
 334  340                  if (entry < NSHIFTKEYS)
 335  341                          (void) printf("shiftkeys+%s", shiftkeys[entry]);
 336  342                  else
 337  343                          (void) printf("%#4x", kio->kio_entry);
 338  344                  break;
 339  345  
 340      -        case BUCKYBITS >> 8:
      346 +        case BUCKYBITS:
 341  347                  if (entry < NBUCKYBITS)
 342  348                          (void) printf("buckybits+%s", buckybits[entry]);
 343  349                  else
 344  350                          (void) printf("%#4x", kio->kio_entry);
 345  351                  break;
 346  352  
 347      -        case FUNNY >> 8:
      353 +        case FUNNY:
 348  354                  if (entry < NFUNNIES)
 349  355                          (void) printf("%s", funnies[entry]);
 350  356                  else
 351  357                          (void) printf("%#4x", kio->kio_entry);
 352  358                  break;
 353  359  
 354      -        case FA_CLASS >> 8:
      360 +        case FA_CLASS:
 355  361                  if (entry < NFA_CLASS)
 356  362                          (void) printf("%s", fa_class[entry]);
 357  363                  else
 358  364                          (void) printf("%#4x", kio->kio_entry);
 359  365                  break;
 360  366  
 361      -        case STRING >> 8:
      367 +        case STRING:
 362  368                  if (entry < NBUILTIN_STRINGS && strncmp(kio->kio_string,
 363      -                        builtin_strings[entry].string, KTAB_STRLEN) == 0)
      369 +                    builtin_strings[entry].string, KTAB_STRLEN) == 0)
 364  370                          (void) printf("string+%s", builtin_strings[entry].name);
 365  371                  else {
 366  372                          (void) printf("\"");
 367  373                          for (i = 0;
 368  374                              i < KTAB_STRLEN && (c = kio->kio_string[i]) != '\0';
 369  375                              i++)
 370  376                                  printchar(c, '"');
 371  377                          (void) printf("\"");
 372  378                  }
 373  379                  break;
 374  380  
 375      -        case FUNCKEYS >> 8:
      381 +        case FUNCKEYS:
 376  382                  fkeyset = (int)(kio->kio_entry & 0xF0) >> 4;
 377  383                  if (fkeyset < NFKEYSETS)
 378  384                          (void) printf("%s(%d)", fkeysets[fkeyset],
 379      -                                        (entry&0x0F) + 1);
      385 +                            (entry & 0x0F) + 1);
 380  386                  else
 381  387                          (void) printf("%#4x", kio->kio_entry);
 382  388                  break;
 383  389  
 384      -        case PADKEYS >> 8:
      390 +        case PADKEYS:
 385  391                  if (entry < NPADKEYS)
 386  392                          (void) printf("%s", padkeys[entry]);
 387  393                  else
 388  394                          (void) printf("%#4x", kio->kio_entry);
 389  395                  break;
 390  396  
 391  397          default:
 392  398                  (void) printf("%#4x", kio->kio_entry);
 393  399                  break;
 394  400          }
 395  401  }
 396  402  
 397  403  static void
 398      -printchar(character, delim)
 399      -        int character;
 400      -        int delim;
      404 +printchar(int character, int delim)
 401  405  {
 402  406          switch (character) {
 403  407  
 404  408          case '\n':
 405  409                  (void) printf("'\\n'");
 406  410                  break;
 407  411  
 408  412          case '\t':
 409  413                  (void) printf("'\\t'");
 410  414                  break;
↓ open down ↓ 15 lines elided ↑ open up ↑
 426  430                  break;
 427  431  
 428  432          default:
 429  433                  if (isprint(character)) {
 430  434                          if (character == delim)
 431  435                                  (void) printf("'\\'");
 432  436                          (void) printf("%c", character);
 433  437                  } else {
 434  438                          if (character < 040)
 435  439                                  (void) printf("^%c", character + 0100);
 436      -                        else
      440 +                        else if (character <= 0xff)
 437  441                                  (void) printf("'\\%.3o'", character);
      442 +                        else
      443 +                                (void) printf("%#4x", character);
 438  444                  }
 439  445                  break;
 440  446          }
 441  447  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX