Print this page
3364 dboot should check boot archive integrity
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Garrett D'Amore <garrett@damore.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/dboot/dboot_asm.s
          +++ new/usr/src/uts/i86pc/dboot/dboot_asm.s
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  28      -
  29   27  #include <sys/asm_linkage.h>
  30   28  #include <sys/asm_misc.h>
  31   29  
  32   30  #if defined(__lint)
  33   31  
  34   32  #include "dboot_asm.h"
  35   33  
  36   34  /* ARGSUSED */
  37   35  uint32_t
  38   36  get_cpuid_edx(uint32_t *eax)
↓ open down ↓ 41 lines elided ↑ open up ↑
  80   78          /*
  81   79           * uint8_t inb(int port)
  82   80           */
  83   81          ENTRY(inb)
  84   82          xorl    %eax, %eax
  85   83          movw    %di, %dx
  86   84          inb     (%dx)
  87   85          ret
  88   86          SET_SIZE(inb)
  89   87  
       88 +        ENTRY(htonl)
       89 +        movl    %edi, %eax
       90 +        bswap   %eax
       91 +        ret
       92 +        SET_SIZE(htonl)
       93 +
  90   94  #elif defined(__i386)
  91   95  
  92   96          .code32
  93   97  
  94   98          /*
  95   99           * do a cpuid instruction, returning the eax/edx values
  96  100           *
  97  101           * uint32_t get_cpuid_edx(uint32_t *eax)
  98  102           */
  99  103          ENTRY_NP(get_cpuid_edx)
↓ open down ↓ 21 lines elided ↑ open up ↑
 121  125          /*
 122  126           * uint8_t inb(int port)
 123  127           */
 124  128          ENTRY_NP(inb)
 125  129          movl    4(%esp), %edx
 126  130          inb     (%dx)
 127  131          andl    $0xff, %eax
 128  132          ret
 129  133          SET_SIZE(inb)
 130  134  
      135 +        ENTRY(htonl)
      136 +        movl    4(%esp), %eax
      137 +        bswap   %eax
      138 +        ret
      139 +        SET_SIZE(htonl)
      140 +
 131  141  #endif  /* __i386 */
 132  142  
 133  143  #endif /* __lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX