Print this page
11630 remove checks for 64-bit capable hardware

Split Close
Expand all
Collapse all
          --- old/usr/src/psm/stand/boot/sparc/common/machdep.c
          +++ new/usr/src/psm/stand/boot/sparc/common/machdep.c
↓ open down ↓ 28 lines elided ↑ open up ↑
  29   29  #include <sys/types.h>
  30   30  #include <sys/param.h>
  31   31  #include <sys/fcntl.h>
  32   32  #include <sys/promif.h>
  33   33  #include <sys/prom_plat.h>
  34   34  #include <sys/salib.h>
  35   35  
  36   36  extern int is_sun4v;
  37   37  
  38   38  /*
  39      - * Check if the CPU should default to 64-bit or not.
  40      - * UltraSPARC-1's default to 32-bit mode.
  41      - * Everything else defaults to 64-bit mode.
  42      - */
  43      -
  44      -/*
  45      - * Manufacturer codes for the CPUs we're interested in
  46      - */
  47      -#define TI_JEDEC        0x17
  48      -#define SUNW_JEDEC      0x22
  49      -
  50      -/*
  51      - * Implementation codes for the CPUs we're interested in
  52      - */
  53      -#define IMPL_US_I       0x10
  54      -
  55      -static pnode_t
  56      -visit(pnode_t node)
  57      -{
  58      -        int impl, manu;
  59      -        char name[32];
  60      -        static char ultrasparc[] = "SUNW,UltraSPARC";
  61      -        static char implementation[] = "implementation#";
  62      -        static char manufacturer[] = "manufacturer#";
  63      -
  64      -        /*
  65      -         * if name isn't 'SUNW,UltraSPARC', continue.
  66      -         */
  67      -        if (prom_getproplen(node, "name") != sizeof (ultrasparc))
  68      -                return ((pnode_t)0);
  69      -        (void) prom_getprop(node, "name", name);
  70      -        if (strncmp(name, ultrasparc, sizeof (ultrasparc)) != 0)
  71      -                return ((pnode_t)0);
  72      -
  73      -        if (prom_getproplen(node, manufacturer) != sizeof (int))
  74      -                return ((pnode_t)0);
  75      -        (void) prom_getprop(node, manufacturer, (caddr_t)&manu);
  76      -
  77      -        if ((manu != SUNW_JEDEC) && (manu != TI_JEDEC))
  78      -                return ((pnode_t)0);
  79      -
  80      -        if (prom_getproplen(node, implementation) != sizeof (int))
  81      -                return ((pnode_t)0);
  82      -        (void) prom_getprop(node, implementation, (caddr_t)&impl);
  83      -
  84      -        if (impl != IMPL_US_I)
  85      -                return ((pnode_t)0);
  86      -
  87      -        return (node);
  88      -}
  89      -
  90      -/*
  91      - * visit each node in the device tree, until we get a non-null answer
  92      - */
  93      -static pnode_t
  94      -walk(pnode_t node)
  95      -{
  96      -        pnode_t id;
  97      -
  98      -        if (visit(node))
  99      -                return (node);
 100      -
 101      -        for (node = prom_childnode(node); node; node = prom_nextnode(node))
 102      -                if ((id = walk(node)) != (pnode_t)0)
 103      -                        return (id);
 104      -
 105      -        return ((pnode_t)0);
 106      -}
 107      -
 108      -/*
 109      - * Check if the CPU is an UltraSPARC-1 or not.
 110      - */
 111      -int
 112      -cpu_is_ultrasparc_1(void)
 113      -{
 114      -        static int cpu_checked;
 115      -        static int cpu_default;
 116      -
 117      -        /*
 118      -         * If we already checked or the machine is
 119      -         * a sun4v, we already know the answer.
 120      -         */
 121      -        if (!is_sun4v || cpu_checked == 0) {
 122      -                if (walk(prom_rootnode()))
 123      -                        cpu_default = 1;
 124      -                cpu_checked = 1;
 125      -        }
 126      -
 127      -        return (cpu_default);
 128      -}
 129      -
 130      -/*
 131   39   * Retain a page or reclaim a previously retained page of physical
 132   40   * memory for use by the prom upgrade. If successful, leave
 133   41   * an indication that a page was retained by creating a boolean
 134   42   * property in the root node.
 135   43   *
 136   44   * XXX: SUNW,retain doesn't work as expected on server systems,
 137   45   * so we don't try to retain any memory on those systems.
 138   46   *
 139   47   * XXX: do a '0 to my-self' as a workaround for 4160914
 140   48   */
↓ open down ↓ 35 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX