Print this page
10570 Need workaround to EFI boot on AMI BIOS

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/cmlb.c
          +++ new/usr/src/uts/common/io/cmlb.c
↓ 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 2012 DEY Storage Systems, Inc.  All rights reserved.
  24   24   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  25   25   * Use is subject to license terms.
  26   26   * Copyright 2016 Toomas Soome <tsoome@me.com>
       27 + * Copyright (c) 2019, Joyent, Inc.
  27   28   */
  28   29  
  29   30  /*
  30   31   * This module provides support for labeling operations for target
  31   32   * drivers.
  32   33   */
  33   34  
  34   35  #include <sys/scsi/scsi.h>
  35   36  #include <sys/sunddi.h>
  36   37  #include <sys/dklabel.h>
↓ open down ↓ 2703 lines elided ↑ open up ↑
2740 2741                  p[i].efi_gpe_EndingLBA = LE_64(p[i].efi_gpe_EndingLBA);
2741 2742                  /* PartitionAttrs */
2742 2743          }
2743 2744  }
2744 2745  
2745 2746  static int
2746 2747  cmlb_validate_efi(efi_gpt_t *labp)
2747 2748  {
2748 2749          if (labp->efi_gpt_Signature != EFI_SIGNATURE)
2749 2750                  return (EINVAL);
2750      -        /* at least 96 bytes in this version of the spec. */
     2751 +        /* at least 92 bytes in this version of the spec. */
2751 2752          if (sizeof (efi_gpt_t) - sizeof (labp->efi_gpt_Reserved2) >
2752 2753              labp->efi_gpt_HeaderSize)
2753 2754                  return (EINVAL);
2754 2755          /* this should be 128 bytes */
2755 2756          if (labp->efi_gpt_SizeOfPartitionEntry != sizeof (efi_gpe_t))
2756 2757                  return (EINVAL);
2757 2758          return (0);
2758 2759  }
2759 2760  
2760 2761  /*
↓ open down ↓ 3068 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX