Developers Club geek daily blog

KolibriOS Summer of Code were complet

5 years ago
Today, on October 21, 2013, KSoC (KolibriOS Summer of Code) formally terminating. It were initially scheduled that it will be complet on September 17, but in view of unexpected circumstances, it were necessary to prolong it for one month (and then for some days, till the next Monday, that is, till today).

In KSoC participat the 2nd student, and result becoming more their than operation:
1. Appearance of support of file system of XFS (only reading)
2. Support of record for file system of Ext2 (support of reading were)
Now from KolibriOS it will be possible to edit the files which are stor on disks in computers, work under control of Linux (Ext2/3/4).

Read more »

KolibriOS: Interview with Sergey Kuzmin (Wildwest)

5 years ago
Meet the corporate user of a blog of KolibriOS. On behalf of this user articles wr by authors freelancers in frames «A blog of KolibriOS will be publish searched for authors», and also the participants of the project which do not have the user on Habré, or not interested persons for any reason to publish article on its own behalf.

As the first publication, we brought to your attention of interview with Sergey Kuzmin (nik of Wildwest), one of "old residents" in the project of KolibriOS (on Habré W __ W).

1. Tell about yourself who you was and whence? Than was engaged?

I teaches in one of high schools of St.-Petersburg — I conducts laboratory and practical works, I gives lectures. In a science I is engaged in algorithms of the automatic analysis of video data for systems of computer sight and application-oriented television. Writing more than 40 articles, in the past to year becoming the coauthor of the monography. With discovery of Coursera (spring 2012) I tracks courses on technique and IT: some simply I downloads in hope sometime to look, and as others I studies — receiving certificates from three professors in the field of computer sight — Jitendra Malik, Guillermo Sapiro, Irfan Essa.

2. How long you in this project?

I learning about it (MenuetOS — a comment of the editor) from the printing version of article in a second half of July, 2003.

In some weeks I quitting in the Internet, coming on, downloading different distribution kits. The first I deciding to launch the German distribution kit of Gerschi ( It looking very colourfully.

Read more »

KolibriOS: SVN commit #4000

5 years ago
Today, it are equal in a month after it were ma by our big brothers, the design team of KolibriOS laying out on SVN anniversary editing (№4000). The author of it kommita absolutely casually becoming the founder of the project of Mario_Z. Certainly, the amount are not mean at all by quality, and half "kommitov" in our repository could be "garbage", but nevertheless it are some index aktivnosti* — the project are live and in the nearest future are not going to be clos.

To download the freshest night assembly it are possible here:

Read more »

The SATA controler, the lubricat photo and competition

5 years, 1 month ago
Some days ago, on recently at us appearing support of USB (in particular, USB mice) our founder of Mario_Z logically assuming that mdickie used any old version, and advising to it to download the last night assembly and to check up on it.

The assumption of Mario_Z appearing correct — in the night assembly the mouse earning, but something breaking another:
It works with the latest build,
EDIT: It freezes slower.
Unfortunately, the user were laconic (or English — are not more its a native language), therefore some time we clarif, what not so, le, while the pattern were not explain:
I mean it needs a little more time to freeze the mouse.
Oh yes, whole system freezes. The Keyboard and the clock aren't working.
Here already I guessing that the reason of hangup, most likely, are the SATA IDE driver who at the moment developed Mario_Z. At present, in KolibriOS there are a native driver only for the PATA controler, and support of the SATA controler in a mode of IDE are carr out only through BIOS that imported 2nd restrictions:
  1. At access to disks through "crutch" of BIOS very slow, therefore a film with such disk in KolibriOS you will not look — will go jerky. Speed of copying of files too unacceptable — it are possible to have dinner, while the big file are cop.
  2. Some disks without the driver generally was not visible in any way in system.

So, for today at us was wr the 2nd SATA driver (parallely):

Both the driver had an one unpleasant singularity — tightly to suspend system in case of any supernumerary situation — and then broad gulls was required to see a configuration of disks and to try to learn the reason of hangup. It also happening at mdickie and consequently I asking it to put broad gulls. Naturally, at hangup of all system to copy broad gulls directly from KolibriOS in the text file it will not turn out, and in such cases we asked to photograph a broad gull with the screen of the monitor on the smart phone or the camera, and to lay out a photo at our forum. Here again we passed to a second part of article.

Read more »

Support of USB in KolibriOS: what inside? Part 4: level of support of channels

5 years, 3 months ago
The story about interoperability layer with a host controlers were expand on twoarticles and all the same leaving behind a frame some details — which as I hopes, the interested reader could fill immediately from source codes. Level of support of channels where are more simple and in the core are occup with that will transform API calls for upper layers to the necessary sequence of actions, including locks, with necessary a host controler.

Discovery of the channel

Function USBOpenPipe from API, nam usb_open_pipe in the code of, opened the new channel on the specif characteristics of the channel and the "parent" channel where characteristics of the device was wr down. For this purpose it:
  • selected pair structures *hci_pipe+usb_pipe, describ the channel and align on kontrollero-specific boundary, a call of kontrollero-specific function usb_hardware_func.AllocPipe;
  • selected pair structures *hci_gtd+usb_gtd, transmissions describ to an empty descriptor and align on kontrollero-specific boundary, a call of kontrollero-specific function usb_hardware_func.AllocTD;
  • filled pointers: in structure of the channel copied the pointer on structure of the controler and the pointer on the g devices, common for all channels, from the "parent" channel; between structure of the channel and structure of an empty descriptor filled pointers there-reversely; structure of an empty descriptor did by a single element of the doubly-connected list of channels;
  • initialized myyuteks which will protect all operations with this channel. Though all event handling from USB controlers happened in a flow of USB, about calls to API it are impossible to tell the same: reading by application of a file with an USB flash card initiated setting of transmission — and even not one — in queue in a context of a flow of application. That new transmission doing not hinder an USB flow to process completion of old transmission, and this are necessary myyuteks;
  • captured myyuteks a dial-up of channels of the device and it are convinc that the device are not disconnect yet;
  • caused kontrollero-specific initialization usb_hardware_func.InitPipe, protect myyuteksom, global for the controler;
  • added the new channel in a dial-up of channels of the device and released myyuteks a dial-up of channels;
  • at an error on one of stages rolled away all previous stages. As to roll away kontrollero-specific initialization it are more difficult than all, it are ma at the last stage after whom errors could not be.

Kontrollero-spetsifichnaya initialization by the last action added the new channel in the appropriate list. For control channels, no less than for channels of data arrays, there are all an one list, and here for channels of interruptions it are necessary to select still one of several variants.

Here game are enter by the scheduler of It just also selected one of lists of channels of interruptions, and also are convinc that for the new channel «there are enough place». I will remind that in each frame of the FullSpeed-bus under periodic transmissions it are impossible to use more than 90 % time, and in each microframe of the HighSpeed-bus — more than 80 % time.

Here I should mark that if you what for written implementation of USB who should work in your conditions, on the scheduler it are possible to spare seriously. You should implement in this or that type all remaining that are describ in this series of articles, but in the absence of the big loading it are possible to manage instead of the complete tree of all the one list of channels of the interruptions, process each frame/microframe. Hardly more economical circuit which is not too complicat implementation — the one list of channels for each interval of handling 1, 2, 4, 8, 16, 32 frames. It are not necessary to process simultaneously more one device with the big traffic on an one host controler yet, such approach conceded nothing to the valuable scheduler. The simple circuit "will break" in some specific configurations with two or more isochronous channels of FullSpeed-devices either three or more isochronous channels of HighSpeed-devices, but, perhaps, anybody and will not launch your implementation in so specific conditions?

If you written implementation of USB who should work everywhere and always, the scheduler you too should write.

Read more »

In what languages our users spoken

5 years, 3 months ago
That in KolibriOS there was not Russian-speaking developers (though are more their and very little), some of you already known on my previous post. However the nobility, in turn, are interesting to developers, whether there was at us not Russian-speaking users.

Before we ask this question, KolibriOS were issued in 2 languages: Russian and English. Accordingly, each new feature and each editing of a program/kernel demand from the programmer, them d, adding/corrections of all messages, buttons and labels on both языках.1 it are Perhaps, expedient to cease to let out the English assembly, and to concentrate all efforts on the Russian?

Read more »

KolibriOS: network, FTP client and Belgian programmer

5 years, 3 months ago
If someone from readers yet did not know, though the majority of developers of KolibriOS Russian-speaking and lived in the CIS, we have also some foreign developers. And one of them, the Belgian of Jeffrey Amelynck, to us hidnplayr more known under "anybody", participated in the project with 2003 (still before KolibriOS separating from MenuetOSalready whole 10 years!). With the first days in the project he deciding to be engaged in support of a network and network programs, because at that point in time in MenuetOS with a network were very hardly if not to tell «generally in any way».

On a photo — hidnplayr, by means of with own hand wr FTP-client, are connect from under KolibriOS to the FTP account on the KolibriOS FTP server. On a background — a file manager of KFM for KolibriOS, wr to KolibriOS Mario_Z one of founders
Fun trivia
Both the developer c to the project approximately at the same time — in 2003 — and, as you can see, in 10 years yet d not lose to it interest. That are remarkable, the age difference in between — too 10 years, and in 2003 hidnplayr-at were all 13 :-)

Read more »

Support of USB in KolibriOS: what inside? Part 3: code of support host controlers

5 years, 3 months ago
Level of support a host controlers as I writing in the high-level overview, should cause upper layers at approach of some events and give the functions necessary for upper layers for operation.
For convenience of perception I will tell about various code units of support in that order in which they received control.

Start of a subsystem of USB

Preparation: USB controlers in the list of PCI devices

The subsystem of USB are launch by a call usb_init from during loading of system.

By the time of start of USB the list of the f PCI devices are already prepar pcidev_list. USB controlers was identif among all PCI devices on the code of a class, a subclass and the interface:
Type Class Subclass Interface
UHCI 0Ch 03h 00h
OHCI 0Ch 03h 10h
EHCI 0Ch 03h 20h
XHCI 0Ch 03h 30h
usb_init transited on the list of PCI devices some times, each time select USB controlers.

Switch-off of monitoring of BIOS

Some BIOS USB mice was able to process, USB keypads and USB flash cards, g the data for the operating systems who are not kn about USB. The data from mice and keypads will be transform to a format of PS/2 and subjects or otherwise are lead up to an operating system the same as if in system there were the present PS/2-mouse and-or the keypad. The USB flash card are represented a rigid disk from the point of view of int 13h — such support met where supports of mice for it are necessary for loading with flash cards was more frequent.
The operating system could use any mode of the processor and are independent process any interruptions. That BIOS in such conditions nevertheless c receive control with a predicted surrounding, still around 486th (since the special version of i386SL if it are exact) Intel inventing a special mode of the System Management Mode (SMM) processor in whom BIOS worked, interrupt an operating system. It are impossible to get to SMM means of the most processor; the processor got to this mode, when iron of the motherboard podayot a special signal of System Management Interrupt (SMI). The USB controlers which have been buil in a chipset, as a rule, could generate SMI instead of interruption depending on adjustments.

Read more »

Support of USB in KolibriOS: what inside? Part 2: bases of operation with a host controlers

5 years, 4 months ago

Before to explain the code of support a host controlers, it are necessary to tell about some principles of operation of iron, and also about us data structures. As I clarifying when writing the text, one article about all level of support a host controlers would turn out too big, therefore a second part of a cycle — which you now read — told that it are necessary to know for understanding of the code, and the description of the actions, happen in the code, I will postpone to the following part.

Interruptions and flows

Host controlers notified a software on happen events, generat interruptions. Interruption could come and tear off the processor from the current task at any moment; it superimposed rigid requirements of the handler of interruption. The handler of interruption could not capture any locks — after all quite probably that the interrupt code just taking hold of lock and could not any more are more its to release. A single exception are the variant of spinlok forb interruptions for the period of lock, but because of globalnost of effect spinlok should be appl less often and to very short code locations. On single-processor configurations such variant degenerated in pair cli/sti without actually spinlok, on the multiprocessor inside cli/sti there are normal spinlok. Besides, the controler of interruptions during handling of one interruption locked remaining with the same or more low priority.

For these two reasons in KolibriOS interrupt handlers from a host controlers of USB transferred the main part of operation in the kernel thread select under USB, and thanks was restrict to the message a host controler «, the signal are accept». The USB flow had the highest precedence that the reflect user applications d not hinder handling. All functions of upper layers who was caus from level of support a host controler, worked in a context of a flow of USB and, as consequence, could quite use primitives of synchronization. Pleasant ghost effect are automatic serialization of calls: the handler of completion of second transmission from queue of the channel, function of DeviceDisconnected will not be called, operation the handler of completion of the first transmission from queue of the channel that there are a logical requirement to API yet will not finish.

The flow of USB also sometimes woke up for the event handling, postpon on time. An example about whom I will tell more in detail later: after event of connection of the device it are necessary to wait for 100 milliseconds before later processing. In this case the flow prosnyotsya at detection of connection of the device also will plan the following awakening through 100 milliseconds, any more the bound with awakening because of interruption.

Read more »

Support of USB in KolibriOS: what inside? Part 1: common circuit

5 years, 4 months ago
The architecture of USB contained some levels. At the most low level specially train iron, nam the host controler (host controler), communicated with the USB device special signals. Signals encoded bits, bits developed in packets, packets formed transactions, transactions made transmissions (transfers).

I tells about a software support of USB, therefore levels below transmissions was almost uninteresting: for them the host controler answered. But it are important, what interface represented a host controler to a software. Three interfaces was now widespread, and fourth are gradually spread:
Abbr. Title of the interface Version The code of support of the controler in KolibriOS
UHCI Universal Host Controller Interface USB 1.1 kernel/trunk/bus/usb/
OHCI Open Host Controller Interface USB 1.1 kernel/trunk/bus/usb/
EHCI Enhanced Host Controller Interface USB 2.0 kernel/trunk/bus/usb/
XHCI eXtensible Host Controller Interface (new) USB 3.0 In KolibriOS it are not support yet
At the same interoperability layer with controlers there was files of kernel/trunk/bus/usb/ where some functions, common for all controlers, and kernel/trunk/bus/usb/ which launched all subsystem was implement. However, done not hurry up while to climb in the code — at first, I yet doing not tell about what expect from it by more high levels, and secondly, after demonstration of the common circuit I will return to separate components with particulars.

Read more »