Monday, 16 May 2022

RedHat Linux 6.2 (Zoot) on PCem Pentium 75

RedHat Linux 6.2 on PCem

X Windows desktop for Red Hat 6.2 (zoot) running on PCem

RedHat Linux

Initially established back in 1994, Red Hat (Wikipedia) is a commercial Linux vendor known for the RedHat Linux, Red Hat Enterprise Linux (RHEL) and Fedora Linux distributions.

RedHat Linux 6.2 was released in 2000, and supported i386 through early Pentium III systems (the Intel Pentium 4 didn't ship until November that year). So it is suitable for comparing our physical Intel Pentium system (tilia) and the PCem emulated equivalent.

PCem

The IBM PC and compatibles emulator PCem supports a range of PC systems, from the original Intel 8088 based IBM PC through to a early 2000s slot 1 based Pentium II system. This includes a couple of systems featuring the Intel 430fx chipset which makes them equivalent to our physical system.

Basing our desired system on tilia and the PCem devices, the target emulated hardware is:

MainboardIntel Advanced/ZP (Zappa); Intel Triton 82430FX PCIset aka. 430FX
CPUIntel Pentium 75
RAM72 MiB (128 MiB max.)
Floppy3.5" 2.88MB
StorageIDE Controller Intel 82371FB aka. PIIX, ATA-2 16 MB/s
IDE hard disk 2048 GB
ATAPI CD-ROM drive
VideoS3 Trio64 based VGA
Network10Mb/s ethernet ISA

Saturday, 14 May 2022

Notes on OpenSSL Performance

OpenSSL

OpenSSL can use three different implementations of the cryptographic methods, providing different performance tiers:

  1. Portable C-based methods: most portable but typically the slowest.
  2. Processor family assembler based methods: faster but less portable, and may have problems on some processor compatible implementations
  3. Methods utilizing hardware acceleration: typically the fastest option, but has specific hardware requirements

A simple compile time option ('no-asm') disables the assembler implementations used by default, so a. & b. are simple to test. For c. appropriate hardware is required. Fortunately three of the options supported by OpenSSL are available to us:

  1. VIA PadLock (Wikipedia): as implemented in the VIA C3 Nehemiah processors (Wikipedia)
  2. Intel Advanced Encryption Standard New Instructions (AES-NI; Wikipedia): implemented on Intel x86_64 since 2010 and AMD x86_64 processors since 2011
  3. Intel SHA extensions (SHA Ext.; Wikipedia): implemented on Intel x86_64 processors from 2016 and AMD Ryzen from 2017

To illustrate the effect on performance a set of methods have been selected which show the effects of each type of implementation.

Using the results for 8,192 byte blocks:

VIA Luke @ 1.0 GHz
OpenSSL 1.1.0l on Debian Linux 11 for x86
MethodAES-256 CBCIDEA CBCMD5SHA-1SHA-256SHA-512
no-asm6,916.78k9,684.21k80,191.49k36,410.71k12,064.09k1,832.28k
asm11,122.01k9,661.10k106,332.16k45,978.97k21,534.04k9,393.49k
Kerneld,e11,127.92k9,655.64k104,336.04k45,566.63k21,515.64k9,374.38k
Padlockb520,596.10k9,662.71k104,357.28k45,472.50k21,460.31k9,376.82k
OpenSSL 3.0.2 on Debian Linux 11 for x86
MethodAES-256 CBCIDEAa CBCMD5SHA-1SHA-256SHA-512
no-asm6,916.47k9,662.71k78,665.19k36,050.26k12,125.81k1,829.55k
asm11,127.47k9,655.64k103,931.19k45,509.29k21,493.73k9,368.92k
Kerneld2,033,909.76k9,627.65k104,328.02k45,512.02k21,442.15k9,366.19k
Padlockb515,844.78k9,658.37k103,765.33k45,520.21k21,435.73k9,368.92k
AMD Ryzen 5 3600
OpenSSL 1.1.0l with Debian Linux 11 for x86_64
MethodAES-256 CBCIDEA CBCMD5SHA-1SHA-256SHA-512
no-asm212,366.68k119,010.65k749,469.70k845,922.30k307,301.03k553,937.58k
asm232,721.07k119,545.86k793,971.37k1,050,842.45k470,701.40k604,972.40k
AES-NI & SHA Ext.1,086,559.57k119,250.94k790,495.23k1,027,295.91k470,671.36k605,863.94k
Kerneld,e1,092,332.20k120,416.94k787,464.19k1,029,693.44k475,791.36k601,159.00k
OpenSSL 3.0.2 with Debian Linux 11 for x86_64
MethodAES-256 CBCIDEAa CBCMD5SHA-1SHA-256SHA-512
no-asm210,668.20k117,587.97k740,698.79k832,288.09k310,059.01k559,205.03k
asmc1,097,910.95k119,048.87k789,848.06k1,036,997.97k473,503.06k599,274.84k
Kerneld37,086,822.40k120,220.33k793,990.49k1,041,334.27k474,685.44k598,278.14k

Notes:

  1. In OpenSSL 3.0.2 access to the IDEA method requires use of the legacy provider (to use without installing $ LD_LIBRARY_PATH=`pwd` apps/openssl speed -provider-path ./providers/ -provider legacy -provider default idea)
  2. The OpenSSL PadLock engine only supports AES on our VIA Luke (C3 Nehemiah) based system, more recent versions of the VIA PadLock hardware provide additional methods, including SHA
  3. On systems that support AES-NI and/or SHA Ext. the standard assembler implementations in OpenSSL 3.0.2, detect and use the instruction set extensions to accelerate the methods
  4. The OpenSSL 'afalg' engine (used for "Kernel") uses the Linux Kernel Crypto API (AF_ALG) to access the methods in the Linux kernel, which make use of hardware acceleration and processor features beyond those used by the standard assembler implementations in OpenSSL
  5. The OpenSSL 1.1.0 implementation of the 'afalg' engine only supports use of the kernel methods for AES-128-CBC

Thursday, 12 May 2022

RedHat Linux 5.2 (Apollo) on PCem Pentium 75

RedHat Linux

Initially established back in 1994, Red Hat (Wikipedia) is a commercial Linux vendor known for the RedHat Linux, Red Hat Enterprise Linux and Fedora Linux distributions.

RedHat Linux 5.2 was released in 1998, and supported i386 through early Pentium II systems. So it is suitable for comparing our physical system (tilia) and the PCem emulated equivalent.

PCem

The IBM PC and compatibles emulator PCem supports a range of PC system, from the original Intel 8088 based IBM PC through to a early 2000s slot 1 based Pentium II system. Including a couple of systems featuring the Intel 430fx chipset, making them equivalent to our reference physical system.

The target hardware for emulation is:

MainboardIntel Advanced/ZP (Zappa); Intel Triton 82430FX PCIset aka. 430FX
CPUIntel Pentium 75
RAM72 MiB (128 MiB max.)
Floppy3.5" 2.88MB
StorageIDE Controller Intel 82371FB aka. PIIX, ATA-2 16 MB/s
IDE hard disk 2048 GB
ATAPI CD-ROM drive
VideoS3 Trio64 based VGA
Network10Mb/s ethernet ISA

Tuesday, 10 May 2022

Linux for m68k on QEMU (q800) - System Information

QEMU running Debian Linux unstable (bookworm/sid) for m86k

Motorola 68000 series

Introduced in 1979 the Motorola 68000 series was used in a wide range of computers through the 1980s and 1990s. Initially using a 32-bit instruction set and 32-bit registers combined with a 16-bit data bus, which Motorola dubbed a 16/32-bit processor, later iterations would implement fully 32-bit architectures, while remaining instruction compatible. The initial models provided 8-bit (68008) and 16-bit (68000, 68010) options for the external data bus allowing the use of cheaper support chips in markets that were typically 8-bit and 16-bit dominated in the early 1980s. The first fully 32-bit model, the 68020 introduced in 1984 (a year before Intel launched the 80386), initially appeared in UNIX workstations and its successors would be at the core of home computers in the 1990s. While 68000 series processors no longer appear in desktop systems, they can still be found in embedded applications.

Linux and Motorola 68000 series

Unsurprisingly the Motorola 68000 series was one of the first systems to have a Linux port (see Linux/m68k: Linux on Motorola's 68000 Processor | Linux Journal). Arguably Linux/m68k was the first port of Linux to a non-x86 architecture, initially starting off as a parallel fork of the Linux kernel, and later being incorporated into the mainline kernel, once work to support multiple platforms was in place (see Linus Torvalds 1997 M.Sc. thesis "Linux: a Portable Operating System").

A wide range of Motorola 68000 series systems are supported. Although a memory management unit (MMU) is required for support, which excludes some system variants using processors which didn't include the MMU or where the MMU is non-functional (systems without an MMU may be supported by μClinux (Wikipedia)). Looking around for a Linux distribution with Motorola 68000 series support and which doesn't require too much setup, it looks like Debian is the best bet.

Debian Linux had official release support in Debian 2.0 (Hamm) through Debian 3.1 (Sarge), and has continued to support the architecture through Debian - Ports. Currently a unofficial Linux/m68k network installation image is available for Debian 10 (buster) (https://cdimage.debian.org/cdimage/ports/10.0/m68k/iso-cd/). That sounds good, so let's give it a go...

QEMU

The wide range of systems that used the Motorola 68000 series means there are a lot of emulation options... Since we've looked at QEMU in previous emulation posts, let's see what QEMU offers for these systems...

QEMU has a relatively limited selection of system emulations for the Motorola 68000 series:

Arnewsh Inc. SBC5206an5206evaluation board
NXP MCF5208 Evaluation Boardmcf5208evbevaluation board
NeXT NeXTcube (Wikipedia)next-cubeUNIX workstation
Apple Macintosh Quadra 800 (Wikipedia)q800desktop system

Note: with QEMU 6.0 support has been added for a virt machine that is more flexible than systems considered here (see QEMU M680x0 support [PDF]).

The QEMU wiki has a description of how to install Linux on the q800 system (Documentation/Platforms/m68k - QEMU), so that sounds like a good place to begin...

Checking Apple Support, EveryMac.com, Wikipedia the hardware specification for the 'q800' would be:

SystemApple Macintosh Quadra 800
CPU68040 @ 33 MHz, includes PMMU & FPU
RAM8 MiB (136 MiB max.)
Floppy3.5" 1.44MB
StorageEmulex SCSI Processor (ESP236) controller
SCSI internal hard disk 230 MB or 500 MB
SCSI 2x CD-ROM drive
Videoframebuffer, 512 KiB or 1.0 MiB
NetworkSONIC (DP83932) 10Mb/s ethernet AAUI-15
Keyboard & MouseADB

Third-party processor clock upgrades could get the 68040 to 40 MHz or 50 MHz, and there was a PowerPC 601 @ 100 MHz upgrade processor option.

Since QEMU is not limited by the physical hardware, there is the option of having more memory than the system could support. For 'q800' it turns out that the maximum RAM is around 1,000 MiB (with 1.0 GiB problems appear).

Thursday, 14 April 2022

Slackware Linux 3.0 on a PCem Pentium 75

PCem Slackware 3.0 X-windows

Slackware

Established back in 1993, Slackware (The Slackware Linux Project; Wikipedia) is the oldest surviving Linux distribution...

Slackware Linux 3.0 was the first Slackware release to have an official CD-ROM distribution and support installation from CD-ROM. Released in November 1995, the same month as the Pentium Pro. So complete system support is limited to i386, i486 and early Pentium systems.

Fortunately I have a Pentium based system that consists of hardware from this era: tilia. And that machine can be approximated using an Intel 430fx based system in PC emulators such as PCem.

PCem

The IBM PC and compatibles emulator PCem supports a range of PC system, from the original Intel 8088 based IBM PC through to a early 2000s slot 1 based Pentium II system. This includes a couple of systems featuring the Intel 430fx chipset which makes them equivalent to our physical system.

So the target emulated hardware is:

MainboardIntel Advanced/ZP (Zappa); Intel Triton 82430FX PCIset aka. 430FX
CPUIntel Pentium 75
RAM72 MiB (128 MiB max.)
Floppy3.5" 2.88MB
StorageIDE Controller Intel 82371FB aka. PIIX, ATA-2 16 MB/s
IDE hard disk 2048 GB
ATAPI CD-ROM drive
VideoS3 Trio64 based VGA
Network10Mb/s ethernet ISA