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/uts/common/sys/visual_io.h
          +++ new/usr/src/uts/common/sys/visual_io.h
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  #ifndef _SYS_VISUAL_IO_H
  28   28  #define _SYS_VISUAL_IO_H
  29   29  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   30  #ifdef __cplusplus
  33   31  extern "C" {
  34   32  #endif
  35   33  
  36   34  #define VIOC    ('V' << 8)
  37   35  #define VIOCF   ('F' << 8)
  38   36  
  39   37  
  40   38  /*
  41   39   * Device Identification
↓ open down ↓ 91 lines elided ↑ open up ↑
 133  131  #define VIS_PUTCMAP     (VIOC|10)
 134  132  struct vis_cmap {
 135  133          int             index; /* Index into colormap to start updating */
 136  134          int             count; /* Number of entries to update */
 137  135          unsigned char   *red; /* List of red values */
 138  136          unsigned char   *green; /* List of green values */
 139  137          unsigned char   *blue; /* List of blue values */
 140  138  };
 141  139  
 142  140  
 143      -#ifdef _KERNEL
      141 +#if defined(_KERNEL) || defined(_BOOT)
 144  142  /*
 145  143   * The following ioctls are used for communication between the layered
 146  144   * device and the framebuffer.  The layered driver calls the framebuffer
 147  145   * with these ioctls.
 148  146   *
 149  147   * On machines that don't have a prom, kmdb uses the kernel to display
 150  148   * characters.  The kernel in turn will use the routines returned by
 151  149   * VIS_DEVINIT to ask the framebuffer driver to display the data.  The
 152  150   * framebuffer driver CANNOT use any DDI services to display this data.  It
 153  151   * must just dump the data to the framebuffer.  In particular, the mutex and
↓ open down ↓ 6 lines elided ↑ open up ↑
 160  158  typedef short screen_pos_t;
 161  159  typedef short screen_size_t;
 162  160  
 163  161  /*
 164  162   * Union of pixel depths
 165  163   */
 166  164  typedef union {
 167  165          unsigned char  mono;   /* one-bit */
 168  166          unsigned char  four;   /* four bit */
 169  167          unsigned char  eight;  /* eight bit */
      168 +        unsigned char  sixteen[2];  /* 16 bit */
 170  169          unsigned char  twentyfour[3];  /* 24 bit */
 171  170  } color_t;
 172  171  
 173  172  /*
 174  173   * VIS_DEVINIT:
 175  174   * Initialize the framebuffer as a console device.  The terminal emulator
 176  175   * will provide the following structure to the device driver to be filled in.
 177  176   * The driver is expected to fill it in.
 178  177   *
 179  178   * ioctl(fd, VIS_DEVINIT, struct vis_devinit *)
 180  179   */
 181  180  #define VIS_DEVINIT     (VIOC|1)
 182      -#define VIS_CONS_REV            3 /* Console IO interface version */
      181 +#define VIS_CONS_REV            4 /* Console IO interface version */
 183  182  /* Modes */
 184  183  #define VIS_TEXT                0 /* Use text mode when displaying data */
 185  184  #define VIS_PIXEL               1 /* Use pixel mode when displaying data */
 186  185  
 187  186  /*
 188  187   * VIS_DEVFINI:
 189  188   * Tells the framebuffer that it is no longer being used as a console.
 190  189   *
 191  190   * ioctl(fd, VIS_DEVFINI, unused)
 192  191   */
↓ open down ↓ 29 lines elided ↑ open up ↑
 222  221   * VIS_CONSCOPY:
 223  222   * Move data on the framebuffer.  Used to scroll the screen by the terminal
 224  223   * emulator or to move data by applications.  The driver must copy the data
 225  224   * specified by the rectangle (s_col,s_row),(e_col,e_row) to the location
 226  225   * which starts at (t_col,t_row), handling overlapping copies correctly.
 227  226   *
 228  227   * ioctl(fd, VIS_CONSCOPY, struct vis_conscopy *)
 229  228   */
 230  229  #define VIS_CONSCOPY            (VIOC|7)
 231  230  
      231 +/*
      232 + * VIS_CONSCLEAR:
      233 + * Clear the screen using provided color. Used on VIS_PIXEL mode.
      234 + *
      235 + * ioctl(fd, VIS_CONSCLEAR, struct vis_consclear *)
      236 + */
      237 +#define VIS_CONSCLEAR           (VIOC|8)
      238 +
      239 +struct vis_consclear {
      240 +        unsigned char   bg_color; /* Background color */
      241 +};
      242 +
 232  243  struct vis_consdisplay {
 233  244          screen_pos_t    row; /* Row to display data at */
 234  245          screen_pos_t    col; /* Col to display data at */
 235  246          screen_size_t   width; /* Width of data */
 236  247          screen_size_t   height; /* Height of data */
 237  248          unsigned char   *data; /* Data to display */
 238  249          unsigned char   fg_color; /* Foreground color */
 239  250          unsigned char   bg_color; /* Background color */
 240  251  };
 241  252  
↓ open down ↓ 35 lines elided ↑ open up ↑
 277  288          void    (*display)(struct vis_polledio_arg *, struct vis_consdisplay *);
 278  289          void    (*copy)(struct vis_polledio_arg *, struct vis_conscopy *);
 279  290          void    (*cursor)(struct vis_polledio_arg *, struct vis_conscursor *);
 280  291  };
 281  292  
 282  293  struct vis_devinit; /* forward decl. for typedef */
 283  294  
 284  295  typedef void (*vis_modechg_cb_t)(struct vis_modechg_arg *,
 285  296      struct vis_devinit *);
 286  297  
      298 +typedef uint32_t (*color_map_fn_t)(uint8_t color);
      299 +
 287  300  struct vis_devinit {
 288  301          /*
 289  302           * This set of fields are used as parameters passed from the
 290  303           * layered framebuffer driver to the terminal emulator.
 291  304           */
 292  305          int             version;        /* Console IO interface version */
 293  306          screen_size_t   width;          /* Width of the device */
 294  307          screen_size_t   height;         /* Height of the device */
 295  308          screen_size_t   linebytes;      /* Bytes per scan line */
 296  309          int             depth;          /* Device depth */
      310 +        color_map_fn_t  color_map;      /* Color map tem -> fb */
 297  311          short           mode;           /* Mode to use when displaying data */
 298  312          struct vis_polledio *polledio;  /* Polled output routines */
 299  313  
 300  314          /*
 301  315           * The following fields are used as parameters passed from the
 302  316           * terminal emulator to the underlying framebuffer driver.
 303  317           */
 304  318          vis_modechg_cb_t modechg_cb;    /* Video mode change callback */
 305  319          struct vis_modechg_arg *modechg_arg; /* Mode change cb arg */
 306  320  };
 307  321  
 308      -#endif  /* _KERNEL */
      322 +#endif  /* _KERNEL || _BOOT */
 309  323  
 310  324  #ifdef __cplusplus
 311  325  }
 312  326  #endif
 313  327  
 314  328  #endif  /* !_SYS_VISUAL_IO_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX