We continue the review of the new Russian computer of the original architecture "Elbrus". In this part we will talk about system and application software.


')
We remind you that, due to the large volume, the material is divided into parts:
- hardware overview :
- the acquisition process;
- Hardware;
- Software review:
- development tools overview :
- architecture features;
- machine language;
- development tools;
- performance benchmarking :
- description of competing computers;
- benchmark results;
- summarizing.
Enjoy reading!
System startup
The bootstrap program does not look like a BIOS (UEFI) POST and Setup from the x86 world, although it solves the same problem, and it has a user interface - in pure text mode, with a text menu or a command line. But before the first messages appear on the screen, 25 seconds pass. To observe the initialization process in all details from the very beginning, you need to connect to the RS-232 port (which of the two can be configured, as well as disable console access for input or output).
System startup log in automatic mode (
fully on Pastebin ,
dmesg )
BOOT started.
BOOT E2S
VERSION: release-2.13.3.0-E2S ::::::::
(/tags/release-2.13.3.0-E2S at revision 3816)
BUILT BY neo
TARGET: mono
ON Nov 2 2015
AT 18:05:37
COMPILER: lcc: 1.17.12: Nov-27-2012: e2k-linux.cross: i386-linux
Thread model: posix gcc version 3.4.6 compatible.
FLAGS: -DDEBUG_TEST_BOOTBLOCK ........ -DRELEASE
........
By pressing the "Spacebar" when the corresponding prompt appears (45 seconds after power-up), you can interrupt the automatic loading of the system's kernel and get into the menu of the main commands, where the basic parameters of the bootloader are displayed or changed. By pressing the "Tilde" key, you can go from this menu to the command line interface, where fine-tuning of the equipment is available - from setting the date and time of day to setting the operation modes of the peripheral controllers and the system bus. Although the menu has the option to force saving settings, changes from the command line are automatically saved; as a last resort, the settings can be reset using a jumper on the motherboard.
Work log in the system menu (
completely on Pastebin )
BOOT SETUP
Press command letter, or press 'h' to get help
: h
HELP
'p' or 's' - load and Start file
'c' - Change boot parameters
'u' - show cUrrent parameters
'd' - show Disks and partitions
'm' - save params to NVRAM
'b' - start Boot.conf menu
'`', '~' - enter enhanced cmd mode
: `
ENHANCED CMD MODE
Enter command, 'help' to get help, or Esc to exit
# set vga primary 1
[1] core: 0x0, link: 0x0, bus: 0x3, slot: 0x0, func: 0x0,
ven: 0x1002, dev: 0x6779, rev: 0x0, classcode: 0x30000 is selected!
# boot
boot # auto
CPU # 00: Label 'auto' found, loading parameters
Trying to load and start image with the following parameters:
drive_number: '4'
partition_number: '0'
command_string: 'console = tty0 root = / dev / sda3 ........'
filename: '/boot/image-033.6.57'
initrdfilename: ''
CPU # 00: Reading: File - '/boot/image-033.6.57', Drive - 4, Partition - 0
........
Among other things, attention is drawn to the possibility of activating and deactivating the Echelon-E hardware-software module of the trusted boot, although no board, resembling traditional AHMP, is installed in the computer. There was no clear information about such a device, except for one note, which stated that it was a specialized version of the MDZ-Echelon product, which is completely software developed and uses the standard computer hardware.
Directly from the command line, without loading the operating system, you can run tests of the correctness of the hardware (System test and diagnostic programs) - whether those that are stored on disk and are available to run from the operating system, or some other: could not figure out , because you need to specify the exact name of the executable file, and the documentation is missing.
For the same reason, due to the lack of proper documentation, it was not possible to penetrate into the subtleties of managing the operating system loader, or rather, how to load something besides the regular system. After all, the same bootloader (SILO) is used here as on SPARC computers, but there is no intention to work with an alien instruction set. The boot parameters themselves are intuitive: you must specify the partition number and the file name with the system kernel, as well as the kernel launch arguments, the file name with the auxiliary program archive (
initrd , if needed), and the user waited for the cancellation timeout. These parameters are read from the
/boot/boot.conf file in the first partition of the disk, specified from the command line; several parameter sets can be defined in the file — the default is the one specified in the
default directive, or to which the name “
auto ” is assigned. But what needs to be done to run operating systems for the x86 or x86‑64 architecture, whose transparent support is stated as one of the key features of Elbrus? The absence of the
boot.conf file on the Windows installation disc or the popular Linux distribution can be compensated by manually entering through the menu. And how to transfer control to the new loader, which is not the Linux kernel? How to run at least Linux kernel, if it is for x86? Understanding this without documentation did not work out: the case invariably ended with a freeze at the moment of transfer of control from the bootloader to the kernel.
Native bootloader configuration (boot.conf) default = auto
timeout = 3
label = auto
partition = 0
image = / boot / image-033.6.57
cmdline = console = tty0 console = ttyS0,115200 consoleblank = 0
hardreset REBOOT root = / dev / sda3
video = DVI-D-1: 1024x768-24 @ 60 video = VGA-1: 1024x768-24 @ 60 fbcon = map: 10
As for the standard kernels of the Elbrus operating system, the bootloader configuration file contains only one set of parameters, and they point to the default kernel. Besides it, there are two cores - with the suffixes “
nn ” and “
rt ”: judging by the configuration of the assembly of these cores, the first means “no NUMA” (a simplified version for single-processor systems; why not use it on a personal computer?) the second is “real time” (Linux kernel extensions for dispatching tasks with a time limit). Without even having superficial knowledge in these areas, the author finds it difficult to give any comments about the advantages or disadvantages of this or that alternative core.
Regarding PPS and PTP supportThe only familiar configuration parameter is the inclusion of PPS API (pulse per second) support in the “
rt ” core, which allows you to adjust the course of the computer's system clock according to an external clock, for example, from a GPS / GLONASS receiver or from a cesium clock, if you suddenly have such lying around. That's just not clear exactly how to set up this synchronization: unlike FreeBSD, for example, where everything starts working as if by itself after rebuilding the kernel with the required parameter and reconfiguring NTPd to use system discipline, Linux usually requires
dantatach creating a virtual PPS device based on a COM or LPT port — you need the appropriate drivers in the kernel or in separate modules, and you don’t see them here.
The built-in network card also showed no signs of hardware support for time synchronization: the
output of the ethtool utility regarding the PTP protocol indicated the absence of such functions. In any case, that when using the default kernel, which is real time, the only source of system time is the “
lt ” device (“Elbrus timer”?) With 1 μs resolution. Not that it is too rough, but modern computers are quite capable of providing quantization at 25–50 ns, regardless of the current processor frequency.
By default, the operating system starts along with the graphical environment: 12 seconds go to load the kernel into memory and about 23 more until the login prompt appears, only 80 seconds from the moment it was turned on. As already mentioned, we did not succeed in selecting the kernel arguments for running in single-user mode: when specifying "
S " or "
1 " the system still reached level 5, and attempts to lower the level after that using the
init command resulted in the system crash .
Since there are two video adapters in the computer, the virtual terminals are distributed between them in turn: the first terminal opens on a discrete card, the second one - on the integrated controller, the third one - again, the discrete one, and so on. The graphic desktop, being on the seventh terminal, thus gets on the discrete video card which performance does not cause questions. I really wanted to check how responsive the desktop would be if you bring it out through the built-in controller, because it can be difficult for domestic platforms: for example, a simple redrawing of the screen using the Graphics Adapter Module (developed by MCST) can take several seconds - not just slow , but almost like the line-by-line appearance of the splash screen in games for the ZX Spectrum, loaded from a tape cassette. Alas, neither editing
Xorg.conf in the image and likeness, nor the selection of kernel arguments, nor the change of the primary video adapter in the hardware settings did not give the desired effect.
Curious nuanceWhile the primary screen on a discrete video card is initialized in text mode, the same screen on the embedded controller is initialized in graphics mode and shows 4 emblems of the processor (as some Linux kernels do right after its launch), but still uses only the top 25 lines of text.
By default, the kernel starts with the “
hardreset ” argument, which instructs the system to perform a full hardware reset when the computer is restarted. In the x86 world, everyone is accustomed to this option, but alternative platforms, where the “cold” initialization after power-up takes a few minutes, can offer a quick restart of the operating system - and it really works, unlike the lottery with
kexec from Intel / AMD . We did not manage to pick up such an argument that would be supported by the core of the Elbrus system and at the same time gave the desired result.
Software
The Elbrus operating system (OS El, OSL) is standard for all MCST computers, although on the SPARC platform the port of the
MSWS 3.0 system can also function. The official system of identification of software products goes back to their decimal numbers: for example, “OS 316‑10” is decoded as “operating system TGHI.00316‑10 with the kernel TGHI.00315‑03, which is part of the general software TWGI.00311‑05”. On the one hand, it looks more like alphanumeric
names than serial numbers of
versions . On the other hand, a particular software product is usually closely related to a specific hardware product, and does not undergo significant changes during its lifetime. However, you can see the “release 2.2.1” tag in the
/ etc / mcst_version file, and “release 2.13.3.0” in the
/ proc / bootdata pseudo file. However, the user interface does not contain any of these designations.
$ cat / etc / mcst_version
release 2.2.1
$ cat / proc / bootdata
boot_ver = '
release-2.13.3.0-E2S ::::::: (/tags/release-2.13.3.0-E2S at revision 3816)
built on Nov 2 2015 at 18:05:58 '
mb_type = 'MONOCUB'
chipset_type = 'IOHUB'
cpu_type = 'E2S'
cache_lines_damaged = 0
$ cat / proc / version
Linux version 2.6.33-elbrus.033.6.57 (gavrilova_tg @ e2k13)
(gcc version 4.4.0 compatible) # 1 SMP Sun Oct 11 00:10:58 MSK 2015
$ uname -a
Linux MONOCUB-10-XX 2.6.33-elbrus.033.6.57 # 1 SMP Sun Oct 11 00:10:58 MSK 2015
e2k E2S MONOCUB GNU / Linux
The kernel of the system is Linux 2.6.33, ported to the Elbrus-2000 architecture (E2K), and the system is generally based on the Debian distribution with a selective approach to package selection: for the most part, there is compliance with release 7.0 of Wheezy or newer, but versions of some packages are likely closer to 5.0 "Lenny". If you believe the
recent report (PDF, 172 Kbytes), surveys are also carried out on direct porting of the original distribution with all its variety of packages, however, the same “Grandpa Lenin” was chosen as the basis. And all because it is necessary to ensure backward compatibility with application and system software developed for even older versions of libraries and compilers. But why not release several versions of the system, on an older and more new package base, so that the consumer can choose? Probably because there is not enough demand from the target audience, and the problems of certification certainly play an important role.
Once installed, the system is not subject to regular updating from the official repository of the MCST company and immediately contains all the available packages. Here are the versions of some of the most significant (with the exception of the development tools covered in the next part of the article):
- office tools: abiword 2.8.6, evince 2.32.0, geeqie 1.1, gimp 2.6.12, gnumeric 1.10.0, graphviz 2.32.0, mtpaint 3.40, xsane 0.998;
- Internet tools: dillo 3.0.3, firefox 3.6.28, links 2.2, linphone 3.5.2, lynx 3.81, thunderbird 3.1.20, sylpheed 2.7.0;
- cryptography: gnutls 3.1.22, openssl 0.9.8zc, openvpn 2.2.2;
- Multimedia: ffmpeg 1.0, mplayer 1.1.1;
- text editors: ed 1.7, leafpad 0.8.17, vim 7.3 + gvim 7.3;
- file managers: mc 4.7.0.8, thunar 1.4.0;
- command interpreters: bash 4.2.53, pdksh 5.2.14, tcsh 6.18.01, zsh 5.0.2;
- services: openssh 6.1p1, httpd 2.4.3, postgresql 9.2.3 + slony1 2.2.0, zeromq 2.1.11;
- package managers: apt 0.9.7.9, aptitude 0.6.8.2, dpkg 1.16.10, pkgtools 13.1.
In total, the package manager has
679 entries , which is ten times smaller than the Debian source pool, but it should be noted that not all of the actually installed software is in the form of packages: for example, the system actually has a virtual machine and a Java developer kit, but this is not up to date.
The only desktop graphics environment is Xfce 4.10. Surprisingly, in the domestic operating system, newly created user profiles are by default set to English interface languages, and there are no shortcuts in the
program menu for setting the keyboard layout switch, and the indicator for the current layout is also nowhere to be seen. However, experienced users know that domestic Linux-based operating systems usually try to copy the “best” Windows traditions: working as root and switching layouts using Alt + Shift.
Xfce desktop (approximate view)
Update as of 09.02.2016. In the comments suggest that the function of taking screenshots is in the graphical editor GIMP, - the remark is fair, but for this you need to be an experienced user of this program; the author, although he completed the processing of all the illustrations for this article in GIMP, does not belong to such experts. As for taking screenshots using the command line utilities, which are regularly available or assembled on their own, this method was not considered due to the low user friendliness.
As already mentioned, we could not run at least some third-party operating system compiled for the x86 or x86‑64 architecture, due to the lack of documentation. Attempts to launch a custom application compiled for Linux x86‑64 directly from the Elbrus command line were also unsuccessful. There is no WinAPI emulation layer and PE binaries launcher in the system, and in order to build WinE yourself from the source code, it is necessary to port architecturally dependent portions of code. The Qemu emulator is also not in the standard delivery, but it is more or less successfully assembled (with the parameters
‑enable-tcg-interpreter-‑dableable-werror ) and it even seems to work in
i386-softmmu ,
x86_64-softmmu ,
sparc-softmmu ,
sparc64 -softmmu ; porting is however required for “application” options
* -linux-user . Obviously, the creators of the Elbrus binary translation technology didn’t mean it when they talked about x86 hardware emulation, so we didn’t see any reason to test the performance of Qemu, and it was so clear that it would be slow and sad.
Returning to the topic of regular software, we venture to suggest that a typical user of this system will hardly feel deprived, as he will either have to solve problems in specialized third-party programs, or create simple documents in office packages, scan and print, - and for this, few people need the latest version. The only exception here, perhaps, is a web browser: the simplest Dillo and text-based Lynx / Links do not pretend to anything, but Firefox 3.6 is not 1.5 from the MAWS 3.0, but still hopelessly old for modern sites. This version does not support, for example, maps of Yandex and Google (in contrast to OSM and Bing), Google Docs; you will see only the header of Intel sites, Mail.ru and Sberbank. And, of course, in the absence of native support for HTML Video and the Flash plug-in, you will not be able to watch videos on any site, be it a foreign YouTube report on the launch of Doom 3 on Elbrus 401-PC or the ideologically correct Kremlin.ru with speeches from the supreme commander in chief. Apparently, this is also not considered a disadvantage, since the typical scenario for the use of such computers is access to internal, specially designed sites in a closed network of an enterprise or department.
Attempts to access the Internet (the word “Namoroka” in the screenshots is not just another Firefox rebranding for Debian, but just the codename of version 3.6)



But after all, a software update serves not only to extend the functionality, but also eliminates serious errors and vulnerabilities - what about this? Apparently, the ideologists of information security believe that since there is no external access to the private network, and internal users who have physical access to their computers will not consciously undertake malicious actions or connect questionable data carriers through negligence, there is nothing to worry about. In the extreme case, if you are very worried about a bug, and you want to talk about it, the MCST has its own bugzilla with login and tickets, in the sense that you will not get there without your login, and you will only see tickets their own, even if the problem has already been discussed a thousand times with other customers and a solution was found long ago.Part of next of The the article is Devoted to the peculiarities of the Elbrus-2000 architecture and the software development tools for it .