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>
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R (fix studio build)
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/common/crypto/skein/skein_port.h
          +++ new/usr/src/common/crypto/skein/skein_port.h
   1    1  /*
   2    2   * Platform-specific definitions for Skein hash function.
   3    3   *
   4    4   * Source code author: Doug Whiting, 2008.
   5    5   *
   6    6   * This algorithm and source code is released to the public domain.
   7    7   *
   8    8   * Many thanks to Brian Gladman for his portable header files.
   9    9   *
  10   10   * To port Skein to an "unsupported" platform, change the definitions
  11   11   * in this file appropriately.
  12   12   */
  13   13  /* Copyright 2013 Doug Whiting. This code is released to the public domain. */
  14   14  
  15   15  #ifndef _SKEIN_PORT_H_
  16   16  #define _SKEIN_PORT_H_
  17   17  
  18   18  #include <sys/types.h>  /* get integer type definitions */
  19   19  #include <sys/systm.h>  /* for bcopy() */
  20   20  
  21   21  #ifndef RotL_64
  22   22  #define RotL_64(x, N)   (((x) << (N)) | ((x) >> (64 - (N))))
  23   23  #endif
  24   24  
  25   25  /*
  26   26   * Skein is "natively" little-endian (unlike SHA-xxx), for optimal
  27   27   * performance on x86 CPUs. The Skein code requires the following
  28   28   * definitions for dealing with endianness:
  29   29   *
  30   30   *    SKEIN_NEED_SWAP:  0 for little-endian, 1 for big-endian
  31   31   *    Skein_Put64_LSB_First
  32   32   *    Skein_Get64_LSB_First
  33   33   *    Skein_Swap64
  34   34   *
  35   35   * If SKEIN_NEED_SWAP is defined at compile time, it is used here
  
    | 
      ↓ open down ↓ | 
    35 lines elided | 
    
      ↑ open up ↑ | 
  
  36   36   * along with the portable versions of Put64/Get64/Swap64, which
  37   37   * are slow in general.
  38   38   *
  39   39   * Otherwise, an "auto-detect" of endianness is attempted below.
  40   40   * If the default handling doesn't work well, the user may insert
  41   41   * platform-specific code instead (e.g., for big-endian CPUs).
  42   42   *
  43   43   */
  44   44  #ifndef SKEIN_NEED_SWAP         /* compile-time "override" for endianness? */
  45   45  
       46 +#ifndef _STANDALONE
  46   47  #include <sys/isa_defs.h>       /* get endianness selection */
       48 +#else
       49 +#include <sys/param.h>          /* get endianness selection */
       50 +#define _ALIGNMENT_REQUIRED     1
       51 +#if (_BYTE_ORDER == _LITTLE_ENDIAN)
       52 +#undef _BIG_ENDIAN
       53 +#else
       54 +#undef _LITTLE_ENDIAN
       55 +#endif
       56 +#endif
  47   57  
  48   58  #define PLATFORM_MUST_ALIGN     _ALIGNMENT_REQUIRED
  49   59  #if     defined(_BIG_ENDIAN)
  50   60  /* here for big-endian CPUs */
  51   61  #define SKEIN_NEED_SWAP   (1)
  52   62  #else
  53   63  /* here for x86 and x86-64 CPUs (and other detected little-endian CPUs) */
  54   64  #define SKEIN_NEED_SWAP   (0)
  55   65  #if     PLATFORM_MUST_ALIGN == 0        /* ok to use "fast" versions? */
  56   66  #define Skein_Put64_LSB_First(dst08, src64, bCnt) bcopy(src64, dst08, bCnt)
  57   67  #define Skein_Get64_LSB_First(dst64, src08, wCnt) \
  58   68          bcopy(src08, dst64, 8 * (wCnt))
  59   69  #endif
  60   70  #endif
  61   71  
  62   72  #endif                          /* ifndef SKEIN_NEED_SWAP */
  63   73  
  64   74  /*
  65   75   * Provide any definitions still needed.
  66   76   */
  67   77  #ifndef Skein_Swap64    /* swap for big-endian, nop for little-endian */
  68   78  #if     SKEIN_NEED_SWAP
  69   79  #define Skein_Swap64(w64)                               \
  70   80          (((((uint64_t)(w64)) & 0xFF) << 56) |           \
  71   81          (((((uint64_t)(w64)) >> 8) & 0xFF) << 48) |     \
  72   82          (((((uint64_t)(w64)) >> 16) & 0xFF) << 40) |    \
  73   83          (((((uint64_t)(w64)) >> 24) & 0xFF) << 32) |    \
  74   84          (((((uint64_t)(w64)) >> 32) & 0xFF) << 24) |    \
  75   85          (((((uint64_t)(w64)) >> 40) & 0xFF) << 16) |    \
  76   86          (((((uint64_t)(w64)) >> 48) & 0xFF) << 8) |     \
  77   87          (((((uint64_t)(w64)) >> 56) & 0xFF)))
  78   88  #else
  79   89  #define Skein_Swap64(w64)  (w64)
  80   90  #endif
  81   91  #endif                          /* ifndef Skein_Swap64 */
  82   92  
  83   93  #ifndef Skein_Put64_LSB_First
  84   94  void
  85   95  Skein_Put64_LSB_First(uint8_t *dst, const uint64_t *src, size_t bCnt)
  86   96  #ifdef  SKEIN_PORT_CODE         /* instantiate the function code here? */
  87   97  {
  88   98          /*
  89   99           * this version is fully portable (big-endian or little-endian),
  90  100           * but slow
  91  101           */
  92  102          size_t n;
  93  103  
  94  104          for (n = 0; n < bCnt; n++)
  95  105                  dst[n] = (uint8_t)(src[n >> 3] >> (8 * (n & 7)));
  96  106  }
  97  107  #else
  98  108  ;                               /* output only the function prototype */
  99  109  #endif
 100  110  #endif                          /* ifndef Skein_Put64_LSB_First */
 101  111  
 102  112  #ifndef Skein_Get64_LSB_First
 103  113  void
 104  114  Skein_Get64_LSB_First(uint64_t *dst, const uint8_t *src, size_t wCnt)
 105  115  #ifdef  SKEIN_PORT_CODE         /* instantiate the function code here? */
 106  116  {
 107  117          /*
 108  118           * this version is fully portable (big-endian or little-endian),
 109  119           * but slow
 110  120           */
 111  121          size_t n;
 112  122  
 113  123          for (n = 0; n < 8 * wCnt; n += 8)
 114  124                  dst[n / 8] = (((uint64_t)src[n])) +
 115  125                      (((uint64_t)src[n + 1]) << 8) +
 116  126                      (((uint64_t)src[n + 2]) << 16) +
 117  127                      (((uint64_t)src[n + 3]) << 24) +
 118  128                      (((uint64_t)src[n + 4]) << 32) +
 119  129                      (((uint64_t)src[n + 5]) << 40) +
 120  130                      (((uint64_t)src[n + 6]) << 48) +
 121  131                      (((uint64_t)src[n + 7]) << 56);
 122  132  }
 123  133  #else
 124  134  ;                               /* output only the function prototype */
 125  135  #endif
 126  136  #endif                          /* ifndef Skein_Get64_LSB_First */
 127  137  
 128  138  #endif  /* _SKEIN_PORT_H_ */
  
    | 
      ↓ open down ↓ | 
    72 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX