Solaris on SPARC vs x86: sun4u, sun4v, i86pc and What Differs

Solaris Admin Series, part 2. Previous: Solaris 10 and 11.4 Releases, Support Lifecycle and Which to Run. Next up: a tour of the Solaris filesystem layout.

Solaris runs on two very different hardware families: Oracle and Fujitsu SPARC servers, and ordinary x86-64 machines. The commands you type day to day are mostly the same, but boot firmware, consoles, disk labels, virtualization and even memory page sizes are not. This post explains the SPARC machine classes (sun4u and sun4v), the x86 platform (i86pc), how to tell which one you are logged in to, and the differences that trip up admins who move between them.

Applies to: both Solaris 10 and Solaris 11 (11.4), on SPARC and x86. Release-specific differences are called out in each section.

Prerequisites

  • Shell access to a Solaris 10 or Solaris 11.4 host; most commands here work as a normal user
  • Root or a role with the right RBAC profile for prtdiag details, eeprom changes and ldm
  • For the console sections, access to the server’s service processor (ILOM, ALOM or XSCF) or, on x86, its BIOS/UEFI serial console
  • Part 1 of the series for how to read uname -a and isainfo -kv

The three platforms in one table

Solaris groups hardware by machine class, which is what uname -m prints. Everything under /platform and most of the boot path depends on it.

Machine classProcessorsTypical systemsSolaris 10Solaris 11.4
sun4uUltraSPARC II/III/IV, SPARC64 VI/VIISun Fire V240/V490, E2900, SPARC Enterprise M3000 to M9000YesNo (11.3 was the last release for supported sun4u systems)
sun4vUltraSPARC T1/T2/T2 Plus, SPARC T3 to T5, M5/M6, M7/M8, S7, Fujitsu SPARC64 X/X+/XIIT5240, T4-1, T5-2, T7-1, T8-2, S7-2, M8-8, Fujitsu M10/M12Yes (T1 and later)T4 and later, plus Fujitsu M10 and M12
i86pcx86-64 (Intel 64, AMD64); 32-bit x86 on old Solaris 10 hardwareOracle Server X-series, supported third-party x86 servers, VirtualBox and other VMs32-bit and 64-bit kernels64-bit only

The short version: sun4u is the older SPARC design where the operating system talks to the hardware directly. sun4v adds a thin firmware layer, the hypervisor, between Solaris and the hardware. That hypervisor is what makes logical domains (Oracle VM Server for SPARC) possible, and it is the reason Solaris 11.4 on SPARC only runs on sun4v. Always check Oracle’s hardware compatibility list for a specific model before you plan an upgrade.

Step 1: Identify the platform you are logged in to

Three uname flags answer the question. They work the same on Solaris 10 and 11.

# SPARC T8 running Solaris 11.4
$ uname -m; uname -p; uname -i
sun4v
sparc
ORCL,SPARC-T8-1

# Older SPARC running Solaris 10
$ uname -m; uname -p; uname -i
sun4u
sparc
SUNW,SPARC-Enterprise

# x86-64 running Solaris 11.4
$ uname -m; uname -p; uname -i
i86pc
i386
i86pc

uname -m is the machine class, uname -p is the processor family (note that x86 always reports i386, even on a 64-bit kernel) and uname -i is the platform name, which on SPARC identifies the server model. These are sample values; your platform name follows your hardware.

Next, confirm the kernel instruction set and the CPU features Solaris sees:

# SPARC
$ isainfo -v
64-bit sparcv9 applications
        crc32c cbcond pause mont mpmul sha512 sha256 sha1 md5
        camellia des aes ima hpc vis3 fmaf asi_blk_init vis2 vis popc
32-bit sparc applications
        crc32c cbcond pause mont mpmul sha512 sha256 sha1 md5
        ...

# x86-64
$ isainfo -v
64-bit amd64 applications
        avx2 avx xsave pclmulqdq aes movbe sse4.2 sse4.1 ssse3 popcnt
        tscp ahf cx16 sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
        ...

Both platforms run 64-bit and 32-bit applications side by side; only the kernel must be 64-bit on Solaris 11. The feature list matters for software that uses hardware crypto (the SPARC aes, sha256 and mpmul instructions, or x86 aes for AES-NI). isalist prints the same instruction sets in preference order, which is handy in scripts.

Step 2: Look at the hardware

prtdiag is the first command to run on unfamiliar hardware. Its output is very different per platform because it reads different firmware tables.

# SPARC (sample, trimmed)
$ prtdiag | head -15
System Configuration:  Oracle Corporation  sun4v SPARC T8-1
Memory size: 261632 Megabytes

================================ Virtual CPUs ================================

CPU ID Frequency Implementation         Status
------ --------- ---------------------- -------
0      5067 MHz  SPARC-M8               on-line
1      5067 MHz  SPARC-M8               on-line
...

# x86 (sample, trimmed)
$ prtdiag | head -12
System Configuration: Oracle Corporation ORACLE SERVER X8-2
BIOS Configuration: American Megatrends Inc. 51.05.02.00 05/14/2020
BMC Configuration: IPMI 2.0 (KCS: Keyboard Controller Style)

==== Processor Sockets ====================================

Version                          Location Tag
-------------------------------- --------------------------
Intel(R) Xeon(R) Platinum 8260 CPU @ 2.40GHz CPU 0
...

On x86 prtdiag reads SMBIOS, so on a virtual machine it shows the hypervisor’s fake hardware. Use psrinfo -pv on both platforms to see physical chips, cores and hardware threads (virtual processors):

$ psrinfo -pv
The physical processor has 32 cores and 256 virtual processors (0-255)
  The core has 8 virtual processors (0-7)
  ...
    SPARC-M8 (chipid 0, clock 5067 MHz)

A SPARC T-series or M7/M8 chip runs 8 hardware threads per core, so a single socket can show 256 CPUs to Solaris. An x86 core typically shows 2 with hyperthreading. Keep that ratio in mind when you read mpstat, size zones or set CPU caps: a SPARC “CPU” is a hardware thread, not a core.

Two more useful commands on both platforms: prtconf -b prints the firmware’s platform name and banner, and prtconf -pv dumps the device tree the firmware handed to the kernel.

Step 3: Know the firmware and boot path

This is the biggest practical difference between the platforms.

AreaSPARCx86 Solaris 10x86 Solaris 11.4
FirmwareOpenBoot PROM (OBP), the ok promptBIOSBIOS or UEFI
Boot loaderOBP loads the boot archive directly (Solaris 11 also uses an OBP-loaded boot archive)Legacy GRUB (menu.lst)GRUB 2 (grub.cfg, managed with bootadm; never edit by hand)
Boot to single userok boot -sEdit the GRUB kernel$ line, append -sPress e in the GRUB menu, append -s to the $multiboot line
Firmware variableseeprom writes OBP NVRAMeeprom writes /boot/solaris/bootenv.rceeprom writes bootenv.rc; boot menu via bootadm
Break into firmware or debuggerStop-A, or send a break from the service processorNo firmware prompt; boot with -k to load kmdbSame as Solaris 10

On SPARC you will spend real time at the ok prompt. A few commands you need from day one:

ok banner                 \ model, firmware version, memory, host ID
ok printenv boot-device   \ what OBP boots by default
ok devalias               \ short names such as disk0, net0, cdrom
ok show-disks             \ list disk device paths
ok boot cdrom -s          \ boot install media to single user (rescue)
ok setenv auto-boot? false

Check the current boot settings from a running system the same way on both platforms:

# SPARC: reads OBP NVRAM
$ eeprom boot-device
boot-device=/pci@300/pci@1/pci@0/pci@2/scsi@0/disk@w5000cca0xxxxxxxx,0:a disk net

# x86 Solaris 11.4: shows the GRUB menu entries
$ pfexec bootadm list-menu
the location of the boot loader configuration files is: /rpool/boot/grub
default 0
console text
timeout 30
0 Oracle Solaris 11.4

Solaris 11.4 on SPARC also uses bootadm to manage boot environments in the menu that OBP shows with boot -L. Later posts in the series cover OBP, GRUB and boot environments in depth.

Step 4: Consoles and service processors

Every SPARC server is managed through a service processor: ILOM (Integrated Lights Out Manager) on modern Oracle SPARC, ALOM on some older T-series and V-series, and XSCF on Fujitsu M10/M12 and the older M-series. The host console is reached from there:

-> start /HOST/console               # ILOM: attach to the Solaris console
-> set /HOST send_break_action=break # ILOM: send a break, drops to ok or kmdb
XSCF> console -d 0                   # XSCF: console of physical partition 0

Oracle x86 servers also ship ILOM, with the same start /HOST/console command, but third-party x86 hardware uses its own BMC (iDRAC, iLO and so on). On x86 Solaris you usually have to point the console at the serial port yourself, for example with eeprom console=ttya on Solaris 10 or bootadm set-menu console=serial on Solaris 11.4, so that remote console access works when the network is down.

Step 5: Disks, labels and device names

  • SPARC disks carry an SMI (VTOC) label or an EFI (GPT) label directly. Slices are s0 to s7, and by convention s2 is the whole disk on SMI labels.
  • x86 disks first need an fdisk partition table. Solaris lives inside a Solaris partition, and the VTOC slices sit inside that. That is why x86 device names also have p0 (whole disk) to p4 (fdisk partitions), for example c1t0d0p0 as well as c1t0d0s0.
  • Solaris 11.1 and later can boot from GPT (EFI) labeled disks on UEFI x86 systems and on SPARC systems whose firmware supports it, and zpool create on a whole disk writes an EFI label on both platforms. Solaris 10 root disks must use an SMI label.
  • Device paths under /devices differ completely: SPARC paths start at the root complex such as /pci@300, x86 paths look like /pci@0,0/pci8086,.... Never copy a /etc/vfstab or boot-device value between servers.

You can see the label type with prtvtoc on both platforms; on x86 also check the fdisk table:

# x86 only: show the fdisk partition table
$ pfexec fdisk -W - /dev/rdsk/c1t0d0p0 | tail -4
* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  191   128  0      1      1       254    63     1023   16065      585842355

Partition ID 191 (0xBF) is the Solaris2 partition. Later posts on format, VTOC and EFI labels go into this in detail.

Step 6: Memory page sizes

The base page size differs, which matters for tuning databases and reading memory statistics:

# SPARC (sample from a T8)
$ pagesize -a
8192
65536
4194304
268435456
2147483648
17179869184

# x86-64
$ pagesize -a
4096
2097152
1073741824

SPARC uses 8 KB base pages with large pages up to 16 GB on recent chips; x86 uses 4 KB base pages with 2 MB and 1 GB large pages. Tools such as vmstat and swap -s report kilobytes, but kstat page counters and mdb ::memstat page counts must be multiplied by the right page size.

Step 7: Virtualization differences

FeatureSPARCx86
Logical domains (Oracle VM Server for SPARC, ldm)sun4v only, Solaris 10 and 11Not available
Dynamic domains / physical partitionsM-series and Fujitsu M10/M12 (XSCF)Not available
Non-global zonesYes, both releasesYes, both releases
solaris10 branded zones on 11.4YesYes
Kernel zones (Solaris 11.2+)Yes, on supported sun4v hardware (T4 and later with current firmware)Yes, needs Intel VT-x with EPT or AMD-V with RVI
Running Solaris as a guestIn a logical domain or kernel zoneVirtualBox, VMware, KVM, OCI and others (check Oracle’s support list)

On Solaris 11, virtinfo tells you what kind of environment you are in and what you could create inside it:

$ virtinfo
NAME            CLASS
logical-domain  current
non-global-zone supported
kernel-zone     supported

Sample output from a guest domain on SPARC. On an x86 host with VT-x turned off in the BIOS, kernel-zone shows as unsupported, and virtinfo -c unsupported list kernel-zone tells you why. On a SPARC control domain, ldm list shows the domains; that tool simply does not exist on x86.

Step 8: Software and data portability

  • Binaries and packages are platform specific. A SPARC binary will not run on x86 or the other way round. SVR4 packages carry ARCH=sparc or ARCH=i386 in their pkginfo; IPS packages use the variant.arch variant, which you can check with pkg variant variant.arch.
  • Install media and archives are per platform. Solaris 10 flash archives, Solaris 11 Unified Archives and Automated Installer services are built for one architecture; an AI server needs a separate install service for each.
  • Byte order: SPARC is big-endian and x86 is little-endian. ZFS pools are portable between the two (zpool export and zpool import work across platforms), but UFS file systems are not. Plan migrations with ZFS send/receive or file-level copies, not by moving UFS disks.
  • Your own scripts should test uname -p before calling platform-only tools such as ldm, fdisk or eeprom variables that exist on only one side.

A small, portable check you can drop into scripts:

#!/bin/ksh
case "$(uname -p)" in
  sparc) echo "SPARC $(uname -m) on $(uname -i)" ;;
  i386)  echo "x86 $(isainfo -k) on $(uname -i)" ;;
  *)     echo "unknown platform" >&2; exit 1 ;;
esac

Verification

You should be able to answer these for any host in your estate. Run them and record the results in your inventory:

uname -m          # sun4u, sun4v or i86pc
uname -i          # platform/model name
isainfo -kv       # 64-bit sparcv9 or amd64 kernel
psrinfo -pv       # chips, cores, threads
pagesize -a       # base and large page sizes
virtinfo          # Solaris 11: domain, zone or bare metal

Troubleshooting and gotchas

  • A sun4u server will not take Solaris 11.4. The installer refuses unsupported hardware. Run Solaris 10 there, or move the workload into a solaris10 branded zone on a supported sun4v or x86 host.
  • uname -p says i386 on a 64-bit system. That is normal; check isainfo -k, which prints amd64.
  • CPU counts look huge on SPARC. Solaris counts hardware threads. Licensing, capacity planning and zone CPU caps should use psrinfo -pv core counts, not psrinfo | wc -l.
  • Stop-A does nothing on x86. There is no OBP. Boot with -k if you need kmdb, or use the service processor to generate an NMI and force a crash dump.
  • No console output after changing the x86 boot menu. The console setting in GRUB and the BMC serial redirection must agree (same port and speed). Fix it from the GRUB menu at boot, then make it permanent with bootadm set-menu.
  • Kernel zone fails to boot on x86 in a VM. Nested virtualization must be exposed by the outer hypervisor; virtinfo will show kernel-zone unsupported until it is.
  • Copied a boot-device or vfstab line from another server. Device paths are hardware specific. Use devalias at the ok prompt, or format and ls -l /dev/dsk on the running system, to find the right path.

What’s next in the Solaris Admin Series

Next comes a tour of the Solaris filesystem layout (/etc, /var, /usr, /devices, /platform and more), then a deeper look at /devices, /dev and instance numbers. Logical domains, OBP and ILOM each get their own posts later in the series. If you have not read it yet, start with part 1: Solaris 10 and 11.4 Releases, Support Lifecycle and Which to Run.

Official references: Oracle Solaris 11.4 documentation library, Oracle Solaris 10 1/13 documentation library and the Oracle VM Server for SPARC documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *