diff options
| author | Vladlen Popolitov <vladlen@FreeBSD.org> | 2026-08-13 14:00:25 +0000 |
|---|---|---|
| committer | Vladlen Popolitov <vladlen@FreeBSD.org> | 2026-08-13 14:00:25 +0000 |
| commit | 29bc0e1a378311e1752e750624902043a6ff5da9 (patch) | |
| tree | 48efc2d48b71e29af9966e92d16398bb012d89ea | |
| parent | a92880d38d8ef2c13b0deafbf4c2cb6e861555ce (diff) | |
update translation of books/arch-handbook to Russian
Differential Revision: https://reviews.freebsd.org/D58800
18 files changed, 1865 insertions, 1909 deletions
diff --git a/documentation/content/ru/books/arch-handbook/boot/_index.adoc b/documentation/content/ru/books/arch-handbook/boot/_index.adoc index 5f3d69baff..086039ef36 100644 --- a/documentation/content/ru/books/arch-handbook/boot/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/boot/_index.adoc @@ -650,7 +650,7 @@ seta20.3: Сервер BTX подготавливает простое окружение и переключается из 16-битного реального режима в 32-битный защищённый режим, непосредственно перед передачей управления клиенту. Это включает инициализацию и обновление следующих структур данных: * Изменяет `Таблицу Векторов Прерываний (IVT)`. IVT предоставляет обработчики исключений и прерываний для кода в Реальном Режиме. -* Создаётся `Таблица дескрипторов прерываний (IDT)`. В ней предусмотрены записи для исключений процессора, аппаратных прерываний, двух системных вызовов и интерфейса V86. IDT предоставляет обработчики исключений и прерываний для кода в защищенном режиме. +* Создаётся `Таблица дескрипторов прерываний (IDT)`. В ней предусмотрены записи для исключений процессора, аппаратных прерываний, двух системных вызовов и интерфейса V86. IDT предоставляет обработчики исключений и прерываний для кода в защищённом режиме. * Создаётся `Сегмент состояния задачи (TSS)`. Это необходимо, потому что процессор работает на _наименее_ привилегированном уровне при выполнении клиента ([.filename]#boot2#), но на _наиболее_ привилегированном уровне при выполнении сервера BTX. * Устанавливается GDT (Глобальная Таблица Дескрипторов). Создаются записи (дескрипторы) для кода и данных супервизора, кода и данных пользователя, а также кода и данных реального режима. footnote:[Код и данные реального режима необходимы при переключении обратно в реальный режим из защищённого режима, как указано в руководствах Intel.] @@ -731,7 +731,7 @@ init.0: mov %bx,(%di) # Store IP .... .[.filename]#stand/i386/btx/btx/btx.S# [[btx-ivt]] -Следующий блок создаёт IDT (таблицу дескрипторов прерываний). IDT в защищенном режиме аналогична IVT в реальном режиме. То есть, IDT описывает различные обработчики исключений и прерываний, используемые, когда процессор работает в защищенном режиме. По сути, она также состоит из массива пар сегмент/смещение, хотя структура несколько сложнее, поскольку сегменты в защищенном режиме отличаются от реального режима, и применяются различные механизмы защиты: +Следующий блок создаёт IDT (таблицу дескрипторов прерываний). IDT в защищённом режиме аналогична IVT в реальном режиме. То есть, IDT описывает различные обработчики исключений и прерываний, используемые, когда процессор работает в защищённом режиме. По сути, она также состоит из массива пар сегмент/смещение, хотя структура несколько сложнее, поскольку сегменты в защищённом режиме отличаются от реального режима, и применяются различные механизмы защиты: [.programlisting] .... @@ -801,7 +801,7 @@ init.8: xorl %ecx,%ecx # Zero .... .[.filename]#stand/i386/btx/btx/btx.S# [[btx-prot]] -Сначала вызывается `setpic` для программирования 8259A PIC (программируемого контроллера прерываний). Этот чип подключен к нескольким источникам аппаратных прерываний. При получении прерывания от устройства он сигнализирует процессору соответствующим вектором прерывания. Это можно настроить так, чтобы определённые прерывания были связаны с конкретными векторами прерываний, как объяснялось ранее. Затем регистры IDTR (Interrupt Descriptor Table Register) и GDTR (Global Descriptor Table Register) загружаются инструкциями `lidt` и `lgdt` соответственно. Эти регистры загружаются базовым адресом и предельным адресом для IDT и GDT. Следующие три инструкции устанавливают бит Protection Enable (PE) в регистре `%cr0`. Это фактически переключает процессор в 32-битный защищенный режим. Затем выполняется дальний переход на `init.8` с использованием селектора сегмента SEL_SCODE, который выбирает сегмент кода супервизора (Supervisor Code Segment). После этого перехода процессор фактически работает на уровне CPL 0 — наиболее привилегированном уровне. Наконец, для стека выбирается сегмент данных супервизора (Supervisor Data Segment) путем присвоения селектора сегмента SEL_SDATA регистру `%ss`. Этот сегмент данных также имеет уровень привилегий `0`. +Сначала вызывается `setpic` для программирования 8259A PIC (программируемого контроллера прерываний). Этот чип подключен к нескольким источникам аппаратных прерываний. При получении прерывания от устройства он сигнализирует процессору соответствующим вектором прерывания. Это можно настроить так, чтобы определённые прерывания были связаны с конкретными векторами прерываний, как объяснялось ранее. Затем регистры IDTR (Interrupt Descriptor Table Register) и GDTR (Global Descriptor Table Register) загружаются инструкциями `lidt` и `lgdt` соответственно. Эти регистры загружаются базовым адресом и предельным адресом для IDT и GDT. Следующие три инструкции устанавливают бит Protection Enable (PE) в регистре `%cr0`. Это фактически переключает процессор в 32-битный защищённый режим. Затем выполняется дальний переход на `init.8` с использованием селектора сегмента SEL_SCODE, который выбирает сегмент кода супервизора (Supervisor Code Segment). После этого перехода процессор фактически работает на уровне CPL 0 — наиболее привилегированном уровне. Наконец, для стека выбирается сегмент данных супервизора (Supervisor Data Segment) путем присвоения селектора сегмента SEL_SDATA регистру `%ss`. Этот сегмент данных также имеет уровень привилегий `0`. Наш последний блок кода отвечает за загрузку TR (Регистра Задач) с селектором сегмента для TSS, который мы создали ранее, и настройку окружения пользовательского режима перед передачей управления исполнения клиенту [.filename]#boot2#. @@ -1144,7 +1144,7 @@ sys/i386/i386/machdep.c: #endif .... -Сегмент состояния задачи (TSS) — это ещё одна структура защищенного режима x86, используемая оборудованием для хранения информации о задаче при переключении задач. +Сегмент состояния задачи (TSS) — это ещё одна структура защищённого режима x86, используемая оборудованием для хранения информации о задаче при переключении задач. Локальная таблица дескрипторов (LDT) используется для ссылки на код и данные пользовательского пространства. Определено несколько селекторов, указывающих на LDT, включая шлюзы системных вызовов, а также селекторы кода и данных пользователя: diff --git a/documentation/content/ru/books/arch-handbook/boot/_index.po b/documentation/content/ru/books/arch-handbook/boot/_index.po index 8dcf7b5bbd..9b1807f9b5 100644 --- a/documentation/content/ru/books/arch-handbook/boot/_index.po +++ b/documentation/content/ru/books/arch-handbook/boot/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2026-04-05 04:45+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbookboot_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Title = @@ -32,13 +32,13 @@ msgid "Chapter 1. Bootstrapping and Kernel Initialization" msgstr "Глава 1. Начальная загрузка и инициализация ядра" #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:52 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:51 #, no-wrap msgid "Synopsis" msgstr "Обзор" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:57 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:56 msgid "" "This chapter is an overview of the boot and system initialization processes, " "starting from the BIOS (firmware) POST, to the first user process creation. " @@ -56,7 +56,7 @@ msgstr "" "темой этого документа." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:61 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:60 msgid "" "The FreeBSD boot process can be surprisingly complex. After control is " "passed from the BIOS, a considerable amount of low-level configuration must " @@ -71,13 +71,13 @@ msgstr "" "возможности для настройки и адаптации." #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:63 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:62 #, no-wrap msgid "Overview" msgstr "Обзор" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:76 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:75 msgid "" "The boot process is an extremely machine-dependent activity. Not only must " "code be written for every computer architecture, but there may also be " @@ -114,7 +114,7 @@ msgstr "" "секторе. Этот загрузочный код запускает трёхэтапный процесс загрузки FreeBSD." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:82 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:81 msgid "" "The key to understanding this process is that it is a series of stages of " "increasing complexity. These stages are [.filename]#boot1#, [." @@ -131,7 +131,7 @@ msgstr "" "Каждая стадия рассматривается в следующих разделах." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:85 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:84 msgid "" "Here is an example of the output generated by the different boot stages. " "Actual output may differ from machine to machine:" @@ -140,25 +140,25 @@ msgstr "" "Фактический вывод может отличаться в зависимости от машины:" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:91 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:90 #, no-wrap msgid "*FreeBSD Component*" msgstr "*Компонент FreeBSD*" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:93 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:92 #, no-wrap msgid "*Output (may vary)*" msgstr "*Вывод (может отличаться)*" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:94 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:93 #, no-wrap msgid "`boot0`" msgstr "`boot0`" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:103 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:102 #, no-wrap msgid "" "[source,bash]\n" @@ -176,13 +176,13 @@ msgstr "" "...." #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:104 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:103 #, no-wrap msgid "`boot2` footnote:[This prompt will appear if the user presses a key just after selecting an OS to boot at the boot0 stage.]" msgstr "`boot2` footnote:[Это приглашение появится, если пользователь нажмет клавишу сразу после выбора ОС для загрузки на этапе boot0.]" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:113 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:112 #, no-wrap msgid "" "[source,bash]\n" @@ -200,13 +200,13 @@ msgstr "" "...." #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:114 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:113 #, no-wrap msgid "[.filename]#loader#" msgstr "[.filename]#loader#" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:130 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:129 #, no-wrap msgid "" "[source,bash]\n" @@ -238,13 +238,13 @@ msgstr "" "...." #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:131 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:130 #, no-wrap msgid "kernel" msgstr "ядро системы" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:144 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:143 #, no-wrap msgid "" "[source,bash]\n" @@ -270,13 +270,13 @@ msgstr "" "...." #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:147 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:146 #, no-wrap msgid "The BIOS" msgstr "BIOS" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:158 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:157 msgid "" "When the computer powers on, the processor's registers are set to some " "predefined values. One of the registers is the _instruction pointer_ " @@ -310,7 +310,7 @@ msgstr "" "устаревшем 16-битном коде." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:161 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:160 msgid "" "The value of `0xfffffff0` is slightly less than 4 GB, so unless the machine " "has 4 GB of physical memory, it cannot point to a valid memory address. The " @@ -323,7 +323,7 @@ msgstr "" "указывал на блок памяти BIOS." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:166 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:165 msgid "" "The BIOS (Basic Input Output System) is a chip on the motherboard that has a " "relatively small amount of read-only memory (ROM). This memory contains " @@ -333,14 +333,14 @@ msgid "" "jump instruction to the BIOS's POST routines." msgstr "" "BIOS (Basic Input Output System) — это микросхема на материнской плате, " -"которая содержит относительно небольшой объём памяти только для чтения (ROM)" -". Эта память включает различные низкоуровневые процедуры, специфичные для " -"оборудования, поставляемого с материнской платой. Процессор сначала " +"которая содержит относительно небольшой объём памяти только для чтения " +"(ROM). Эта память включает различные низкоуровневые процедуры, специфичные " +"для оборудования, поставляемого с материнской платой. Процессор сначала " "переходит по адресу 0xfffffff0, который фактически находится в памяти BIOS. " "Обычно по этому адресу содержится инструкция перехода к процедурам POST BIOS." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:170 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:169 msgid "" "The POST (Power On Self Test) is a set of routines including the memory " "check, system bus check, and other low-level initialization so the CPU can " @@ -357,7 +357,7 @@ msgstr "" "CD-ROM, жёсткого диска или других устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:179 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:178 msgid "" "The very last thing in the POST is the `INT 0x19` instruction. The `INT " "0x19` handler reads 512 bytes from the first sector of boot device into the " @@ -382,7 +382,7 @@ msgstr "" "первой дорожке не используются." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:183 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:182 msgid "" "This sector is our boot-sequence starting point. As we will see, this " "sector contains a copy of our [.filename]#boot0# program. A jump is made by " @@ -393,13 +393,13 @@ msgstr "" "BIOS выполняет переход по адресу `0x7c00`, и она начинает выполняться." #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:185 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:184 #, no-wrap msgid "The Master Boot Record (`boot0`)" msgstr "Главная загрузочная запись (`boot0`)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:194 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:193 msgid "" "After control is received from the BIOS at memory address `0x7c00`, [." "filename]#boot0# starts executing. It is the first piece of code under " @@ -426,7 +426,7 @@ msgstr "" "есть_ MBR." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:197 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:196 msgid "" "As mentioned previously, we're calling the BIOS `INT 0x19` to load the MBR " "([.filename]#boot0#) into memory at address `0x7c00`. The source file for [." @@ -439,7 +439,7 @@ msgstr "" "впечатляющий фрагмент кода, написанный Робертом Нордье." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:202 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:201 msgid "" "A special structure starting from offset `0x1be` in the MBR is called the " "_partition table_. It has four records of 16 bytes each, called _partition " @@ -457,32 +457,32 @@ msgstr "" "продолжать работу." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:204 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:203 msgid "A partition record has the following fields:" msgstr "Запись о разделе содержит следующие поля:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:206 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:205 msgid "the 1-byte filesystem type" msgstr "1-байтовый тип файловой системы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:207 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:206 msgid "the 1-byte bootable flag" msgstr "1-байтовый флаг загрузки (`bootable`)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:208 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:207 msgid "the 6 byte descriptor in CHS format" msgstr "6-байтовый дескриптор в формате CHS" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:209 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:208 msgid "the 8 byte descriptor in LBA format" msgstr "8-байтовый дескриптор в формате LBA" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:213 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:212 msgid "" "A partition record descriptor contains information about where exactly the " "partition resides on the drive. Both descriptors, LBA and CHS, describe the " @@ -499,7 +499,7 @@ msgstr "" "завершается специальной сигнатурой `0xaa55`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:218 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:217 msgid "" "The MBR must fit into 512 bytes, a single disk sector. This program uses " "low-level \"tricks\" like taking advantage of the side effects of certain " @@ -517,7 +517,7 @@ msgstr "" "будьте очень внимательны при изменении [.filename]#boot0.S#." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:223 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:222 msgid "" "Note that the [.filename]#boot0.S# source file is assembled \"as is\": " "instructions are translated one by one to binary, with no additional " @@ -537,7 +537,7 @@ msgstr "" "корректной работы." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:230 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:229 msgid "" "It is worth looking at the [.filename]#Makefile# for [.filename]#boot0# ([." "filename]#stand/i386/boot0/Makefile#), as it defines some of the run-time " @@ -563,7 +563,7 @@ msgstr "" "форматирование файла):" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:235 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:234 #, no-wrap msgid "" " BOOT_BOOT0_ORG?=0x600\n" @@ -573,13 +573,13 @@ msgstr "" " ORG=${BOOT_BOOT0_ORG}\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:237 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:236 #, no-wrap msgid "[.filename]#stand/i386/boot0/Makefile# [[boot-boot0-makefile-as-is]]" msgstr "[.filename]#stand/i386/boot0/Makefile# [[boot-boot0-makefile-as-is]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:239 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:238 msgid "" "Let us now start our study of the MBR, or [.filename]#boot0#, starting where " "execution begins." @@ -587,7 +587,7 @@ msgstr "" "Приступим к изучению MBR, или [.filename]#boot0#, начиная с точки входа." #. type: delimited block = 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:245 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:244 msgid "" "Some modifications have been made to some instructions in favor of better " "exposition. For example, some macros are expanded, and some macro tests are " @@ -600,7 +600,7 @@ msgstr "" "примерам кода." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:256 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:255 #, no-wrap msgid "" "start:\n" @@ -620,13 +620,13 @@ msgstr "" " movw $LOAD,%sp\t\t# stack\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:258 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:257 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-entrypoint]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-entrypoint]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:264 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:263 msgid "" "This first block of code is the entry point of the program. It is where the " "BIOS transfers control. First, it makes sure that the string operations " @@ -647,7 +647,7 @@ msgstr "" "чтобы обеспечить работоспособный стек." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:266 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:265 msgid "" "The next block is responsible for the relocation and subsequent jump to the " "relocated code." @@ -656,7 +656,7 @@ msgstr "" "коду." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:280 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:279 #, no-wrap msgid "" " movw %sp,%si # Source\n" @@ -684,13 +684,13 @@ msgstr "" " jmp main-LOAD+ORIGIN\t# Jump to relocated code\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:282 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:281 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-relocation]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-relocation]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:293 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:292 msgid "" "As [.filename]#boot0# is loaded by the BIOS to address `0x7C00`, it copies " "itself to address `0x600` and then transfers control there (recall that it " @@ -727,7 +727,7 @@ msgstr "" "копируют 2 байта (1 слово) за одну итерацию." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:304 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:303 msgid "" "Next, the destination register `%di` is copied to `%bp`. `%bp` gets the " "value `0x800`. The value `8` is copied to `%cl` in preparation for a new " @@ -756,7 +756,7 @@ msgstr "" "абсолютные адреса избегались." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:306 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:305 msgid "" "The following code block tests whether the drive number provided by the BIOS " "should be used, or the one stored in [.filename]#boot0#." @@ -765,7 +765,7 @@ msgstr "" "предоставленный BIOS, или тот, что хранится в [.filename]#boot0#." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:318 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:317 #, no-wrap msgid "" "main:\n" @@ -789,13 +789,13 @@ msgstr "" "#endif\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:320 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:319 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-drivenumber]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-drivenumber]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:327 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:326 msgid "" "This code tests the `SETDRV` bit (`0x20`) in the _flags_ variable. Recall " "that register `%bp` points to address location `0x800`, so the test is done " @@ -817,7 +817,7 @@ msgstr "" "предоставил корректный номер диска, поэтому переходим к `save_curdrive`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:329 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:328 msgid "" "The next block saves the drive number provided by the BIOS, and calls `putn` " "to print a new line on the screen." @@ -826,7 +826,7 @@ msgstr "" "`putn` для вывода новой строки на экран." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:341 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:340 #, no-wrap msgid "" "save_curdrive:\n" @@ -850,13 +850,13 @@ msgstr "" " callw putn\t\t# Print a newline\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:343 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:342 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-savedrivenumber]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-savedrivenumber]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:345 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:344 msgid "" "Note that we assume `TEST` is not defined, so the conditional code in it is " "not assembled and will not appear in our executable [.filename]#boot0#." @@ -866,7 +866,7 @@ msgstr "" "filename]#boot0#." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:351 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:350 msgid "" "Our next block implements the actual scanning of the partition table. It " "prints to the screen the partition type for each of the four entries in the " @@ -883,7 +883,7 @@ msgstr "" "`ufs2` (FreeBSD, ID 0xa5). Реализация довольно проста." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:356 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:355 #, no-wrap msgid "" " movw $(partbl+0x4),%bx\t# Partition table (+4)\n" @@ -893,7 +893,7 @@ msgstr "" " xorw %dx,%dx\t\t# Item number\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:372 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:371 #, no-wrap msgid "" "read_entry:\n" @@ -929,7 +929,7 @@ msgstr "" " callw putx\t\t# Display it\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:377 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:376 #, no-wrap msgid "" "next_entry:\n" @@ -943,13 +943,13 @@ msgstr "" " jnc read_entry\t\t# Till done\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:379 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:378 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-partition-scan]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-partition-scan]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:383 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:382 msgid "" "It is important to note that the active flag for each entry is cleared, so " "after the scanning, _no_ partition entry is active in our memory copy of [." @@ -964,7 +964,7 @@ msgstr "" "существует, если пользователь решит записать изменения обратно на диск." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:388 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:387 msgid "" "The next block tests for other drives. At startup, the BIOS writes the " "number of drives present in the computer to address `0x475`. If there are " @@ -979,7 +979,7 @@ msgstr "" "диске." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:397 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:396 #, no-wrap msgid "" " popw %ax\t\t\t# Drive number\n" @@ -997,13 +997,13 @@ msgstr "" " jz print_prompt\t\t# Yes\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:399 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:398 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-test-drives]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-test-drives]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:402 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:401 msgid "" "We make the assumption that a single drive is present, so the jump to " "`print_drive` is not performed. We also assume nothing strange happened, so " @@ -1014,7 +1014,7 @@ msgstr "" "не произошло, поэтому переходим к `print_prompt`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:404 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:403 msgid "" "This next block just prints out a prompt followed by the default option:" msgstr "" @@ -1022,7 +1022,7 @@ msgstr "" "умолчанию:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:414 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:413 #, no-wrap msgid "" "print_prompt:\n" @@ -1042,13 +1042,13 @@ msgstr "" " jmp start_input\t\t# Skip beep\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:416 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:415 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-prompt]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-prompt]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:418 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:417 msgid "" "Finally, a jump is performed to `start_input`, where the BIOS services are " "used to start a timer and for reading user input from the keyboard; if the " @@ -1059,7 +1059,7 @@ msgstr "" "таймер истекает, будет выбран вариант по умолчанию:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:434 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:433 #, no-wrap msgid "" "start_input:\n" @@ -1091,13 +1091,13 @@ msgstr "" " jb read_key\t\t# No\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:436 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:435 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-start-input]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-start-input]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:449 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:448 msgid "" "An interrupt is requested with number `0x1a` and argument `0` in register `" "%ah`. The BIOS has a predefined set of services, requested by applications " @@ -1144,7 +1144,7 @@ msgstr "" "пользователя; это делается через `int 0x16`, аргумент `1` в `%ah`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:457 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:456 msgid "" "Whether a key was pressed or the time expired, subsequent code validates the " "selection. Based on the selection, the register `%si` is set to point to " @@ -1165,7 +1165,7 @@ msgstr "" "обратно в MBR на диске. Мы оставляем детали этой реализации читателю." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:459 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:458 msgid "" "We now end our study with the last code block from the [.filename]#boot0# " "program:" @@ -1174,7 +1174,7 @@ msgstr "" "filename]#boot0#:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:472 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:471 #, no-wrap msgid "" " movw $LOAD,%bx\t\t# Address for read\n" @@ -1200,13 +1200,13 @@ msgstr "" " jmp *%bx\t\t\t# Invoke bootstrap\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:474 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:473 #, no-wrap msgid "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-check-bootable]]" msgstr "[.filename]#stand/i386/boot0/boot0.S# [[boot-boot0-check-bootable]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:478 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:477 msgid "" "Recall that `%si` points to the selected partition entry. This entry tells " "us where the partition begins on disk. We assume, of course, that the " @@ -1217,7 +1217,7 @@ msgstr "" "выбранный раздел действительно является срезом FreeBSD." #. type: delimited block = 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:482 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:481 msgid "" "From now on, we will favor the use of the technically more accurate term " "\"slice\" rather than \"partition\"." @@ -1226,7 +1226,7 @@ msgstr "" "термина \"слайс\" вместо \"раздел\"." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:488 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:487 msgid "" "The transfer buffer is set to `0x7c00` (register `%bx`), and a read for the " "first sector of the FreeBSD slice is requested by calling `intx13`. We " @@ -1246,18 +1246,18 @@ msgstr "" "выполнение нашего следующего этапа (только что прочитанного блока)." #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:490 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:489 #, no-wrap msgid "`boot1` Stage" msgstr "Этап `boot1`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:493 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:492 msgid "So far we have gone through the following sequence:" msgstr "До сих пор мы прошли следующую последовательность:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:497 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:496 msgid "" "The BIOS did some early hardware initialization, including the POST. The " "MBR ([.filename]#boot0#) was loaded from absolute disk sector one to address " @@ -1268,7 +1268,7 @@ msgstr "" "один с диска. Управление выполнением было передано по этому адресу." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:500 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:499 msgid "" "[.filename]#boot0# relocated itself to the location it was linked to execute " "(`0x600`), followed by a jump to continue execution at the appropriate " @@ -1283,7 +1283,7 @@ msgstr "" "Управление выполнением было передано по этому адресу." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:513 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:512 msgid "" "[.filename]#boot1# is the next step in the boot-loading sequence. It is the " "first of three boot stages. Note that we have been dealing exclusively with " @@ -1327,7 +1327,7 @@ msgstr "" "он фактически загружает [.filename]#boot1# и передаёт ему управление." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:518 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:517 msgid "" "The main task of [.filename]#boot1# is to load the next boot stage. This " "next stage is somewhat more complex. It is composed of a server called the " @@ -1342,7 +1342,7 @@ msgstr "" "сервера BTX." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:520 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:519 msgid "" "Let us now look in detail at what exactly is done by [.filename]#boot1#, " "starting like we did for [.filename]#boot0#, at its entry point:" @@ -1351,7 +1351,7 @@ msgstr "" "начиная, как мы это делали для [.filename]#boot0#, с точки входа:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:525 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:524 #, no-wrap msgid "" "start:\n" @@ -1361,13 +1361,13 @@ msgstr "" "\tjmp main\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:527 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:526 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-entry]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-entry]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:529 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:528 msgid "" "The entry point at `start` simply jumps past a special data area to the " "label `main`, which in turn looks like this:" @@ -1376,7 +1376,7 @@ msgstr "" "метке `main`, которая, в свою очередь, выглядит следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:544 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:543 #, no-wrap msgid "" "main:\n" @@ -1406,13 +1406,13 @@ msgstr "" " movsw\t\t\t# code\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:546 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:545 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-main]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-main]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:551 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:550 msgid "" "Just like [.filename]#boot0#, this code relocates [.filename]#boot1#, this " "time to memory address `0x700`. However, unlike [.filename]#boot0#, it does " @@ -1427,7 +1427,7 @@ msgstr "" "перемещения будет рассмотрена далее." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:556 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:555 msgid "" "Next comes a loop that looks for the FreeBSD slice. Although [." "filename]#boot0# loaded [.filename]#boot1# from the FreeBSD slice, no " @@ -1448,7 +1448,7 @@ msgstr "" "Для этого он перечитывает MBR:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:564 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:563 #, no-wrap msgid "" " mov $part4,%si\t\t# Partition\n" @@ -1464,13 +1464,13 @@ msgstr "" " callw nread\t\t# Read MBR\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:566 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:565 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-find-freebsd]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-find-freebsd]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:574 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:573 msgid "" "In the code above, register `%dl` maintains information about the boot " "device. This is passed on by the BIOS and preserved by the MBR. Numbers " @@ -1489,7 +1489,7 @@ msgstr "" "Ниже приведены данные фальшивого раздела:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:582 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:581 #, no-wrap msgid "" " part4:\n" @@ -1505,13 +1505,13 @@ msgstr "" "\t.byte 0x50, 0xc3, 0x00, 0x00\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:584 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:583 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot2-make-fake-partition]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot2-make-fake-partition]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:589 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:588 msgid "" "In particular, the LBA for this fake partition is hardcoded to zero. This " "is used as an argument to the BIOS for reading absolute sector one from the " @@ -1526,12 +1526,12 @@ msgstr "" "абсолютному сектору один." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:591 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:590 msgid "Let us now proceed to take a look at `nread`:" msgstr "Продолжим, рассмотрев `nread`:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:601 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:600 #, no-wrap msgid "" "nread:\n" @@ -1551,13 +1551,13 @@ msgstr "" " jnc return\t\t# If success, return\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:603 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:602 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-nread]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-nread]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:612 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:611 msgid "" "Recall that `%si` points to the fake partition. The word footnote:[In the " "context of 16-bit real mode, a word is 2 bytes.] at offset `0x8` is copied " @@ -1580,7 +1580,7 @@ msgstr "" "использует `xread.1`. Этот механизм будет рассмотрен в следующем разделе." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:614 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:613 msgid "" "The code at `xread.1` further calls the `read` function, which actually " "calls the BIOS asking for the disk sector:" @@ -1589,7 +1589,7 @@ msgstr "" "к BIOS с запросом на чтение сектора диска:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:631 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:630 #, no-wrap msgid "" "xread.1:\n" @@ -1623,13 +1623,13 @@ msgstr "" "\tlret\t\t\t# To far caller\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:633 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:632 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-xread1]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-xread1]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:637 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:636 msgid "" "Note the long return instruction at the end of this block. This instruction " "pops out the `%cs` register pushed by `nread`, and returns. Finally, " @@ -1640,7 +1640,7 @@ msgstr "" "управление. В конце `nread` также возвращает управление." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:639 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:638 msgid "" "With the MBR loaded to memory, the actual loop for searching the FreeBSD " "slice begins:" @@ -1648,7 +1648,7 @@ msgstr "" "С загрузкой MBR в память начинается фактический цикл поиска слайса FreeBSD:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:659 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:658 #, no-wrap msgid "" "\tmov $0x1,%cx\t\t # Two passes\n" @@ -1688,13 +1688,13 @@ msgstr "" "\tjcxz main.1\t\t # passes\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:661 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:660 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-find-part]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-find-part]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:665 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:664 msgid "" "If a FreeBSD slice is identified, execution continues at `main.5`. Note " "that when a FreeBSD slice is found `%si` points to the appropriate entry in " @@ -1708,7 +1708,7 @@ msgstr "" "метке `main.5`:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:680 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:679 #, no-wrap msgid "" "main.5:\n" @@ -1738,13 +1738,13 @@ msgstr "" "\tmovsb\t\t\t\t # client\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:682 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:681 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-main5]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-main5]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:688 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:687 msgid "" "Recall that at this point, register `%si` points to the FreeBSD slice entry " "in the MBR partition table, so a call to `nread` will effectively read " @@ -1766,7 +1766,7 @@ msgstr "" "посмотрим на размер этих файлов в файловой системе:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:695 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:694 #, no-wrap msgid "" "-r--r--r-- 1 root wheel 512B Jan 8 00:15 /boot/boot0\n" @@ -1780,7 +1780,7 @@ msgstr "" "-r--r--r-- 1 root wheel 8.0K Jan 8 00:15 /boot/boot\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:703 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:702 msgid "" "Both [.filename]#boot0# and [.filename]#boot1# are 512 bytes each, so they " "fit _exactly_ in one disk sector. [.filename]#boot2# is much bigger, " @@ -1807,7 +1807,7 @@ msgstr "" "единый файл [.filename]#boot#, выглядит просто как `cat boot1 boot2 > boot`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:707 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:706 msgid "" "So [.filename]#boot1# occupies exactly the first 512 bytes of [." "filename]#boot# and, because [.filename]#boot# is written to the first " @@ -1827,7 +1827,7 @@ msgstr "" "filename]#boot2#, мы увидим в следующем разделе." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:713 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:712 msgid "" "Recall that `nread` uses memory address `0x8c00` as the transfer buffer to " "hold the sectors read. This address is conveniently chosen. Indeed, " @@ -1847,7 +1847,7 @@ msgstr "" "bsdlabel[8]]." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:721 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:720 msgid "" "Starting at address `0x9000` is the beginning of the BTX server, and " "immediately following is the [.filename]#boot2# client. The BTX server acts " @@ -1870,7 +1870,7 @@ msgstr "" "`0xa000`. Мы подробно рассмотрим это в следующем разделе." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:724 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:723 msgid "" "The last code block of [.filename]#boot1# enables access to memory above 1MB " "footnote:[This is necessary for legacy reasons.] and concludes with a jump " @@ -1881,7 +1881,7 @@ msgstr "" "к начальной точке сервера BTX:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:732 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:731 #, no-wrap msgid "" "seta20:\n" @@ -1897,7 +1897,7 @@ msgstr "" "\tjz seta20.3\t\t# Yes\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:747 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:746 #, no-wrap msgid "" "\tinb $0x64,%al\t\t# Get status\n" @@ -1931,25 +1931,25 @@ msgstr "" "\tjmp 0x9010\t\t# Start BTX\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:749 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:748 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-seta20]]" msgstr "[.filename]#stand/i386/boot2/boot1.S# [[boot-boot1-seta20]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:751 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:750 msgid "Note that right before the jump, interrupts are enabled." msgstr "" "Обратите внимание, что непосредственно перед переходом прерывания включаются." #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:753 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:752 #, no-wrap msgid "The BTX Server" msgstr "Сервер BTX" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:757 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:756 msgid "" "Next in our boot sequence is the BTX Server. Let us quickly remember how we " "got here:" @@ -1958,7 +1958,7 @@ msgstr "" "вспомним, как мы сюда попали:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:759 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:758 msgid "" "The BIOS loads the absolute sector one (the MBR, or [.filename]#boot0#), to " "address `0x7c00` and jumps there." @@ -1967,7 +1967,7 @@ msgstr "" "`0x7c00` и переходит туда." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:761 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:760 msgid "" "[.filename]#boot0# relocates itself to `0x600`, the address it was linked to " "execute, and jumps over there. It then reads the first sector of the " @@ -1980,7 +1980,7 @@ msgstr "" "переходит туда." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:766 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:765 msgid "" "[.filename]#boot1# loads the first 16 sectors of the FreeBSD slice into " "address `0x8c00`. This 16 sectors, or 8192 bytes, is the whole file [." @@ -1997,7 +1997,7 @@ msgstr "" "точке входа сервера BTX." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:770 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:769 msgid "" "Before studying the BTX Server in detail, let us further review how the " "single, all-in-one [.filename]#boot# file is created. The way [." @@ -2006,12 +2006,13 @@ msgid "" "the [.filename]#boot# file:" msgstr "" "Прежде чем изучать сервер BTX подробно, давайте рассмотрим, как создаётся " -"единый, всеобъемлющий файл [.filename]#boot#. Способ сборки [.filename]#boot#" -" определен в его [.filename]#Makefile# ([.filename]#stand/i386/boot2/" -"Makefile#). Рассмотрим правило, которое создаёт файл [.filename]#boot#:" +"единый, всеобъемлющий файл [.filename]#boot#. Способ сборки [." +"filename]#boot# определен в его [.filename]#Makefile# ([.filename]#stand/" +"i386/boot2/Makefile#). Рассмотрим правило, которое создаёт файл [." +"filename]#boot#:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:775 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:774 #, no-wrap msgid "" " boot: boot1 boot2\n" @@ -2021,13 +2022,13 @@ msgstr "" "\tcat boot1 boot2 > boot\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:777 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:776 #, no-wrap msgid "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot]]" msgstr "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:780 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:779 msgid "" "This tells us that [.filename]#boot1# and [.filename]#boot2# are needed, and " "the rule simply concatenates them to produce a single file called [." @@ -2040,7 +2041,7 @@ msgstr "" "просты:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:785 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:784 #, no-wrap msgid "" " boot1: boot1.out\n" @@ -2050,7 +2051,7 @@ msgstr "" "\t${OBJCOPY} -S -O binary boot1.out ${.TARGET}\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:788 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:787 #, no-wrap msgid "" " boot1.out: boot1.o\n" @@ -2060,13 +2061,13 @@ msgstr "" "\t${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} boot1.o\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:790 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:789 #, no-wrap msgid "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot1]]" msgstr "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot1]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:799 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:798 msgid "" "To apply the rule for creating [.filename]#boot1#, [.filename]#boot1.out# " "must be resolved. This, in turn, depends on the existence of [." @@ -2085,17 +2086,17 @@ msgstr "" "filename]#boot1.out#. Это, в свою очередь, зависит от наличия [." "filename]#boot1.o#. Последний файл является результатом ассемблирования " "нашего знакомого [.filename]#boot1.S# без компоновки. Теперь применяется " -"правило создания [.filename]#boot1.out#. Оно указывает, что [.filename]#boot1" -".o# должен быть скомпонован с точкой входа `start` и начальным адресом " -"`0x7c00`. Наконец, [.filename]#boot1# создаётся из [.filename]#boot1.out# " -"применением соответствующего правила. Это команда [.filename]#objcopy#, " -"применяемая к [.filename]#boot1.out#. Обратите внимание на флаги, " -"передаваемые [.filename]#objcopy#: `-S` указывает на удаление всей " +"правило создания [.filename]#boot1.out#. Оно указывает, что [." +"filename]#boot1.o# должен быть скомпонован с точкой входа `start` и " +"начальным адресом `0x7c00`. Наконец, [.filename]#boot1# создаётся из [." +"filename]#boot1.out# применением соответствующего правила. Это команда [." +"filename]#objcopy#, применяемая к [.filename]#boot1.out#. Обратите внимание " +"на флаги, передаваемые [.filename]#objcopy#: `-S` указывает на удаление всей " "информации о перемещении и символов; `-O binary` указывает формат вывода, то " "есть простой, неформатированный двоичный файл." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:801 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:800 msgid "" "Having [.filename]#boot1#, let us take a look at how [.filename]#boot2# is " "constructed:" @@ -2103,7 +2104,7 @@ msgstr "" "Имея [.filename]#boot1#, давайте посмотрим, как устроен [.filename]#boot2#:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:808 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:807 #, no-wrap msgid "" " boot2: boot2.ld\n" @@ -2117,7 +2118,7 @@ msgstr "" "\t${DD} if=${.ALLSRC} of=${.TARGET} bs=${BOOT2SIZE} conv=sync\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:812 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:811 #, no-wrap msgid "" " boot2.ld: boot2.ldr boot2.bin ${BTXKERN}\n" @@ -2129,7 +2130,7 @@ msgstr "" "\t -o ${.TARGET} -P 1 boot2.bin\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:815 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:814 #, no-wrap msgid "" " boot2.ldr:\n" @@ -2139,7 +2140,7 @@ msgstr "" "\t${DD} if=/dev/zero of=${.TARGET} bs=512 count=1\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:818 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:817 #, no-wrap msgid "" " boot2.bin: boot2.out\n" @@ -2149,7 +2150,7 @@ msgstr "" "\t${OBJCOPY} -S -O binary boot2.out ${.TARGET}\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:821 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:820 #, no-wrap msgid "" " boot2.out: ${BTXCRT} boot2.o sio.o ashldi3.o\n" @@ -2159,7 +2160,7 @@ msgstr "" "\t${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC}\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:828 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:827 #, no-wrap msgid "" " boot2.h: boot1.out\n" @@ -2177,13 +2178,13 @@ msgstr "" "\t REL1=`printf \"%d\" ${REL1}` > ${.TARGET}\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:830 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:829 #, no-wrap msgid "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot2]]" msgstr "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot2]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:834 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:833 msgid "" "The mechanism for building [.filename]#boot2# is far more elaborate. Let us " "point out the most relevant facts. The dependency list is as follows:" @@ -2192,7 +2193,7 @@ msgstr "" "моменты. Список зависимостей выглядит следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:842 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:841 #, no-wrap msgid "" " boot2: boot2.ld\n" @@ -2208,13 +2209,13 @@ msgstr "" " boot2.h: boot1.out\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:844 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:843 #, no-wrap msgid "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot2-more]]" msgstr "[.filename]#stand/i386/boot2/Makefile# [[boot-boot1-make-boot2-more]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:847 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:846 msgid "" "Note that initially there is no header file [.filename]#boot2.h#, but its " "creation depends on [.filename]#boot1.out#, which we already have. The rule " @@ -2227,19 +2228,19 @@ msgstr "" "filename]#boot2.h#, выглядит примерно так:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:851 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:850 #, no-wrap msgid "#define XREADORG 0x725\n" msgstr "#define XREADORG 0x725\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:853 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:852 #, no-wrap msgid "[.filename]#stand/i386/boot2/boot2.h# [[boot-boot1-make-boot2h]]" msgstr "[.filename]#stand/i386/boot2/boot2.h# [[boot-boot1-make-boot2h]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:859 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:858 msgid "" "Recall that [.filename]#boot1# was relocated (i.e., copied from `0x7c00` to " "`0x700`). This relocation will now make sense, because as we will see, the " @@ -2260,7 +2261,7 @@ msgstr "" "filename]#boot1#. Теперь эта функция доступна из клиента [.filename]#boot2#." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:868 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:867 msgid "" "The next rule directs the linker to link various files ([.filename]#ashldi3." "o#, [.filename]#boot2.o# and [.filename]#sio.o#). Note that the output " @@ -2293,7 +2294,7 @@ msgstr "" "зарезервировано для bsdlabel." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:873 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:872 msgid "" "Now that we have files [.filename]#boot1#, [.filename]#boot2.bin# and [." "filename]#boot2.ldr#, only the BTX server is missing before creating the all-" @@ -2313,7 +2314,7 @@ msgstr "" "`0x9000`. Подробности можно найти в [.filename]#stand/i386/btx/btx/Makefile#." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:880 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:879 msgid "" "Having the files that comprise the [.filename]#boot# program, the final step " "is to _merge_ them. This is done by a special program called [." @@ -2339,7 +2340,7 @@ msgstr "" "перейдем к изучению программы сервера BTX." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:883 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:882 msgid "" "The BTX server prepares a simple environment and switches from 16-bit real " "mode to 32-bit protected mode, right before passing control to the client. " @@ -2351,7 +2352,7 @@ msgstr "" "следующих структур данных:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:886 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:885 msgid "" "Modifies the `Interrupt Vector Table (IVT)`. The IVT provides exception and " "interrupt handlers for Real-Mode code." @@ -2360,7 +2361,7 @@ msgstr "" "исключений и прерываний для кода в Реальном Режиме." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:889 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:888 msgid "" "The `Interrupt Descriptor Table (IDT)` is created. Entries are provided for " "processor exceptions, hardware interrupts, two system calls and V86 " @@ -2370,10 +2371,10 @@ msgstr "" "Создаётся `Таблица дескрипторов прерываний (IDT)`. В ней предусмотрены " "записи для исключений процессора, аппаратных прерываний, двух системных " "вызовов и интерфейса V86. IDT предоставляет обработчики исключений и " -"прерываний для кода в защищенном режиме." +"прерываний для кода в защищённом режиме." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:891 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:890 msgid "" "A `Task-State Segment (TSS)` is created. This is necessary because the " "processor works in the _least_ privileged level when executing the client ([." @@ -2386,7 +2387,7 @@ msgstr "" "выполнении сервера BTX." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:894 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:893 msgid "" "The GDT (Global Descriptor Table) is set up. Entries (descriptors) are " "provided for supervisor code and data, user code and data, and real-mode " @@ -2401,7 +2402,7 @@ msgstr "" "режима, как указано в руководствах Intel.]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:899 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:898 msgid "" "Let us now start studying the actual implementation. Recall that [." "filename]#boot1# made a jump to address `0x9010`, the BTX server's entry " @@ -2417,7 +2418,7 @@ msgstr "" "образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:915 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:914 #, no-wrap msgid "" "start:\t\t\t\t\t\t# Start of code\n" @@ -2449,13 +2450,13 @@ msgstr "" "\t\t.long 0x0\t\t\t# Entry address\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:917 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:916 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-header]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-header]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:922 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:921 msgid "" "Note the first two bytes are `0xeb` and `0xe`. In the IA-32 architecture, " "these two bytes are interpreted as a relative jump past the header into the " @@ -2472,12 +2473,12 @@ msgstr "" "filename]#boot2#)b2. Это поле исправляется во время компоновки." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:924 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:923 msgid "Immediately following the header is the BTX server's entry point:" msgstr "Сразу после заголовка следует точка входа сервера BTX:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:938 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:937 #, no-wrap msgid "" "/*\n" @@ -2505,13 +2506,13 @@ msgstr "" "\t\tpopfl\t\t\t\t# flags\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:940 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:939 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-init]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-init]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:944 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:943 msgid "" "This code disables interrupts, sets up a working stack (starting at address " "`0x1800`) and clears the flags in the EFLAGS register. Note that the " @@ -2528,7 +2529,7 @@ msgstr "" "EFLAGS всегда был равен 1)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:947 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:946 msgid "" "Our next code block clears (sets to `0`) the memory range `0x5e00-0x8fff`. " "This range is where the various data structures will be created:" @@ -2537,7 +2538,7 @@ msgstr "" "`0x5e00-0x8fff`. В этом диапазоне будут созданы различные структуры данных:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:957 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:956 #, no-wrap msgid "" "/*\n" @@ -2557,13 +2558,13 @@ msgstr "" "\t\tstosw\t\t\t\t# memory\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:959 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:958 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-clear-mem]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-clear-mem]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:962 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:961 msgid "" "Recall that [.filename]#boot1# was originally loaded to address `0x7c00`, " "so, with this memory initialization, that copy effectively disappeared. " @@ -2577,7 +2578,7 @@ msgstr "" "использовать." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:970 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:969 msgid "" "Next, the real-mode IVT (Interrupt Vector Table is updated. The IVT is an " "array of segment/offset pairs for exception and interrupt handlers. The " @@ -2608,7 +2609,7 @@ msgstr "" "использования обработчиков, предоставляемых BIOS:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:985 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:984 #, no-wrap msgid "" "/*\n" @@ -2638,13 +2639,13 @@ msgstr "" "\t\tloop init.0\t\t\t# Next IRQ\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:987 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:986 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-ivt]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-ivt]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:992 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:991 msgid "" "The next block creates the IDT (Interrupt Descriptor Table). The IDT is " "analogous, in protected mode, to the IVT in real mode. That is, the IDT " @@ -2655,15 +2656,15 @@ msgid "" "and various protection mechanisms apply:" msgstr "" "Следующий блок создаёт IDT (таблицу дескрипторов прерываний). IDT в " -"защищенном режиме аналогична IVT в реальном режиме. То есть, IDT описывает " +"защищённом режиме аналогична IVT в реальном режиме. То есть, IDT описывает " "различные обработчики исключений и прерываний, используемые, когда процессор " -"работает в защищенном режиме. По сути, она также состоит из массива пар " +"работает в защищённом режиме. По сути, она также состоит из массива пар " "сегмент/смещение, хотя структура несколько сложнее, поскольку сегменты в " -"защищенном режиме отличаются от реального режима, и применяются различные " +"защищённом режиме отличаются от реального режима, и применяются различные " "механизмы защиты:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1019 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1018 #, no-wrap msgid "" "/*\n" @@ -2717,13 +2718,13 @@ msgstr "" "\t\tjmp init.1\t\t\t# Continue\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1021 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1020 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-idt]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-idt]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1029 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1028 msgid "" "Each entry in the `IDT` is 8 bytes long. Besides the segment/offset " "information, they also describe the segment type, privilege level, and " @@ -2764,7 +2765,7 @@ msgstr "" "обрабатываются корректно, независимо от фактических привилегий." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1034 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1033 msgid "" "The next step is to initialize the TSS (Task-State Segment). The TSS is a " "hardware feature that helps the operating system or executive software " @@ -2784,7 +2785,7 @@ msgstr "" "определить TSS:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1043 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1042 #, no-wrap msgid "" "/*\n" @@ -2802,13 +2803,13 @@ msgstr "" "\t\tmovb $_TSSIO,TSS_MAP(%di)\t# Set I/O bit map base\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1045 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1044 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-tss]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-tss]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1049 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1048 msgid "" "Note that a value is given for the Privilege Level 0 stack pointer and stack " "segment in the TSS. This is needed because, if an interrupt or exception is " @@ -2828,7 +2829,7 @@ msgstr "" "битовой карты перенаправления прерываний." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1052 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1051 msgid "" "After the IDT and TSS are created, the processor is ready to switch to " "protected mode. This is done in the next block:" @@ -2837,7 +2838,7 @@ msgstr "" "выполняется в следующем блоке:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1070 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1069 #, no-wrap msgid "" "/*\n" @@ -2873,13 +2874,13 @@ msgstr "" "\t\tmovw %cx,%ss\t\t\t# stack\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1072 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1071 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-prot]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-prot]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1085 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1084 msgid "" "First, a call is made to `setpic` to program the 8259A PIC (Programmable " "Interrupt Controller). This chip is connected to multiple hardware " @@ -2909,7 +2910,7 @@ msgstr "" "загружаются инструкциями `lidt` и `lgdt` соответственно. Эти регистры " "загружаются базовым адресом и предельным адресом для IDT и GDT. Следующие " "три инструкции устанавливают бит Protection Enable (PE) в регистре `%cr0`. " -"Это фактически переключает процессор в 32-битный защищенный режим. Затем " +"Это фактически переключает процессор в 32-битный защищённый режим. Затем " "выполняется дальний переход на `init.8` с использованием селектора сегмента " "SEL_SCODE, который выбирает сегмент кода супервизора (Supervisor Code " "Segment). После этого перехода процессор фактически работает на уровне CPL 0 " @@ -2919,7 +2920,7 @@ msgstr "" "привилегий `0`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1087 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1086 msgid "" "Our last code block is responsible for loading the TR (Task Register) with " "the segment selector for the TSS we created earlier, and setting the User " @@ -2932,7 +2933,7 @@ msgstr "" "filename]#boot2#." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1123 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1122 #, no-wrap msgid "" "/*\n" @@ -3004,13 +3005,13 @@ msgstr "" "\t\tiret\t\t\t\t# To user mode\n" #. type: Block title -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1125 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1124 #, no-wrap msgid "[.filename]#stand/i386/btx/btx/btx.S# [[btx-end]]" msgstr "[.filename]#stand/i386/btx/btx/btx.S# [[btx-end]]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1149 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1148 msgid "" "Note that the client's environment include a stack segment selector and " "stack pointer (registers `%ss` and `%esp`). Indeed, once the TR is loaded " @@ -3075,7 +3076,7 @@ msgstr "" "точки входа ``boot0``." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1153 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1152 msgid "" "It is important to note how the User Code Segment is defined. This " "segment's _base address_ is set to `0xa000`. This means that code memory " @@ -3090,13 +3091,13 @@ msgstr "" "будет `0xa000+0x2000=0xc000`." #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1155 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1154 #, no-wrap msgid "boot2 Stage" msgstr "Этап загрузки boot2" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1162 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1161 msgid "" "`boot2` defines an important structure, `struct bootinfo`. This structure " "is initialized by `boot2` and passed to the loader, and then further to the " @@ -3114,7 +3115,7 @@ msgstr "" "так:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1187 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1186 #, no-wrap msgid "" "/usr/include/machine/bootinfo.h:\n" @@ -3164,7 +3165,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1194 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1193 msgid "" "`boot2` enters into an infinite loop waiting for user input, then calls " "`load()`. If the user does not press anything, the loop breaks by a " @@ -3188,7 +3189,7 @@ msgstr "" "загрузчика:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1201 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1200 #, no-wrap msgid "" "stand/i386/boot2/boot2.c:\n" @@ -3202,13 +3203,13 @@ msgstr "" "\t 0, 0, 0, VTOP(&bootinfo));\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1204 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1203 #, no-wrap msgid "loader Stage" msgstr "Этап загрузчика (loader)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1209 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1208 msgid "" "loader is a BTX client as well. I will not describe it here in detail, " "there is a comprehensive man page written by Mike Smith, man:loader[8]. The " @@ -3219,7 +3220,7 @@ msgstr "" "loader[8]. Основные механизмы и BTX были рассмотрены выше." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1212 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1211 msgid "" "The main task for the loader is to boot the kernel. When the kernel is " "loaded into memory, it is being called by the loader:" @@ -3228,7 +3229,7 @@ msgstr "" "загрузчик вызывает его:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1218 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1217 #, no-wrap msgid "" "stand/common/boot.c:\n" @@ -3240,13 +3241,13 @@ msgstr "" " file_formats[fp->f_loader]->l_exec(fp);\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1221 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1220 #, no-wrap msgid "Kernel Initialization" msgstr "Инициализация ядра" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1228 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1227 msgid "" "Let us take a look at the command that links the kernel. This will help " "identify the exact location where the loader passes execution to the " @@ -3263,7 +3264,7 @@ msgstr "" "#." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1235 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1234 #, no-wrap msgid "" "/usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.meta:\n" @@ -3277,7 +3278,7 @@ msgstr "" "<lots of kernel .o files>\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1241 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1240 msgid "" "A few interesting things can be seen here. First, the kernel is an ELF " "dynamically linked binary, but the dynamic linker for kernel is [.filename]#/" @@ -3294,7 +3295,7 @@ msgstr "" "строк, видим, что строка" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1246 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1245 #, no-wrap msgid "" "sys/conf/ldscript.i386:\n" @@ -3304,7 +3305,7 @@ msgstr "" "ENTRY(btext)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1250 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1249 msgid "" "says that a kernel's entry point is the symbol `btext`. This symbol is " "defined in [.filename]#locore.s#:" @@ -3313,7 +3314,7 @@ msgstr "" "[.filename]#locore.s#:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1261 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1260 #, no-wrap msgid "" "sys/i386/i386/locore.s:\n" @@ -3335,7 +3336,7 @@ msgstr "" "NON_GPROF_ENTRY(btext)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1265 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1264 msgid "" "First, the register EFLAGS is set to a predefined value of 0x00000002. Then " "all the segment registers are initialized:" @@ -3344,7 +3345,7 @@ msgstr "" "0x00000002. Затем инициализируются все сегментные регистры:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1272 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1271 #, no-wrap msgid "" "sys/i386/i386/locore.s:\n" @@ -3358,7 +3359,7 @@ msgstr "" "\tpopfl\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1280 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1279 #, no-wrap msgid "" "/*\n" @@ -3378,7 +3379,7 @@ msgstr "" "\tmov\t%ax, %gs\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1284 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1283 msgid "" "btext calls the routines `recover_bootinfo()`, `identify_cpu()`, which are " "also defined in [.filename]#locore.s#. Here is a description of what they " @@ -3388,13 +3389,13 @@ msgstr "" "также определены в [.filename]#locore.s#. Вот описание их функций:" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1290 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1289 #, no-wrap msgid "`recover_bootinfo`" msgstr "`recover_bootinfo`" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1294 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1293 #, no-wrap msgid "" "This routine parses the parameters to the kernel passed from the bootstrap.\n" @@ -3406,26 +3407,26 @@ msgstr "" "Эта функция определяет метод загрузки и сохраняет структуру `struct bootinfo` в памяти ядра." #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1295 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1294 #, no-wrap msgid "`identify_cpu`" msgstr "`identify_cpu`" #. type: Table -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1296 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1295 #, no-wrap msgid "This function tries to find out what CPU it is running on, storing the value found in a variable `_cpu`." msgstr "Эта функция пытается определить, на каком процессоре она выполняется, сохраняя найденное значение в переменной `_cpu`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1299 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1298 msgid "The next steps are enabling VME, if the CPU supports it:" msgstr "" "Следующие шаги включают активацию VME, если процессор поддерживает эту " "функцию:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1307 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1306 #, no-wrap msgid "" "sys/i386/i386/mpboot.s:\n" @@ -3441,12 +3442,12 @@ msgstr "" "3:\tmovl\t%eax,%cr4\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1310 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1309 msgid "Then, enabling paging:" msgstr "Затем, включение подкачки:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1320 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1319 #, no-wrap msgid "" "sys/i386/i386/mpboot.s:\n" @@ -3466,7 +3467,7 @@ msgstr "" "\tmovl\t%eax,%cr0\t\t\t/* and let's page NOW! */\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1323 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1322 msgid "" "The next three lines of code are because the paging was set, so the jump is " "needed to continue the execution in virtualized address space:" @@ -3476,7 +3477,7 @@ msgstr "" "адресном пространстве:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1329 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1328 #, no-wrap msgid "" "sys/i386/i386/mpboot.s:\n" @@ -3488,7 +3489,7 @@ msgstr "" "\tret\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1332 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1331 #, no-wrap msgid "" "/* now running relocated at KERNBASE where the system is linked to run */\n" @@ -3498,7 +3499,7 @@ msgstr "" "mp_begin:\t/* now running relocated at KERNBASE */\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1337 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1336 msgid "" "The function `init386()` is called with a pointer to the first free physical " "page, after that `mi_startup()`. `init386` is an architecture dependent " @@ -3514,7 +3515,7 @@ msgstr "" "`mi_startup()`, и, вызывая её, завершает загрузку:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1347 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1346 #, no-wrap msgid "" "sys/i386/i386/locore.s:\n" @@ -3534,13 +3535,13 @@ msgstr "" "\t/* NOTREACHED */\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1349 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1348 #, no-wrap msgid "`init386()`" msgstr "`init386()`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1354 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1353 msgid "" "`init386()` is defined in [.filename]#sys/i386/i386/machdep.c# and performs " "low-level initialization specific to the i386 chip. The switch to protected " @@ -3557,7 +3558,7 @@ msgstr "" "выполнения в защищённом режиме:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1356 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1355 msgid "" "Initialize the kernel tunable parameters, passed from the bootstrapping " "program." @@ -3566,42 +3567,42 @@ msgstr "" "программы." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1357 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1356 msgid "Prepare the GDT." msgstr "Подготовить GDT." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1358 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1357 msgid "Prepare the IDT." msgstr "Подготовить IDT." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1359 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1358 msgid "Initialize the system console." msgstr "Инициализировать системную консоль." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1360 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1359 msgid "Initialize the DDB, if it is compiled into kernel." msgstr "Инициализировать DDB, если он скомпилирован в ядро." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1361 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1360 msgid "Initialize the TSS." msgstr "Инициализировать TSS." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1362 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1361 msgid "Prepare the LDT." msgstr "Подготовить LDT." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1363 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1362 msgid "Set up thread0's pcb." msgstr "Настройка pcb для thread0." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1366 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1365 msgid "" "`init386()` initializes the tunable parameters passed from bootstrap by " "setting the environment pointer (envp) and calling `init_param1()`. The " @@ -3612,7 +3613,7 @@ msgstr "" "envp был передан из loader в структуре `bootinfo`:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1372 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1371 #, no-wrap msgid "" "sys/i386/i386/machdep.c:\n" @@ -3624,7 +3625,7 @@ msgstr "" "\tinit_param1();\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1376 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1375 msgid "" "`init_param1()` is defined in [.filename]#sys/kern/subr_param.c#. That file " "has a number of sysctls, and two functions, `init_param1()` and " @@ -3635,7 +3636,7 @@ msgstr "" "которые вызываются из `init386()`:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1384 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1383 #, no-wrap msgid "" "sys/kern/subr_param.c:\n" @@ -3651,14 +3652,14 @@ msgstr "" "\t\thz = vm_guest > VM_GUEST_NO ? HZ_VM : HZ;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1387 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1386 msgid "" "TUNABLE_<typename>_FETCH is used to fetch the value from the environment:" msgstr "" "`TUNABLE_<typename>_FETCH` используется для получения значения из окружения:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1392 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1391 #, no-wrap msgid "" "/usr/src/sys/sys/kernel.h:\n" @@ -3668,7 +3669,7 @@ msgstr "" "#define\tTUNABLE_INT_FETCH(path, var)\tgetenv_int((path), (var))\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1396 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1395 msgid "" "Sysctl `kern.hz` is the system clock tick. Additionally, these sysctls are " "set by `init_param1()`: `kern.maxswzone, kern.maxbcache, kern.maxtsiz, kern." @@ -3680,7 +3681,7 @@ msgstr "" "maxssiz, kern.sgrowsiz`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1404 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1403 msgid "" "Then `init386()` prepares the Global Descriptors Table (GDT). Every task on " "an x86 is running in its own virtual address space, and this space is " @@ -3708,7 +3709,7 @@ msgstr "" "содержит дескрипторы для 15 селекторов на каждый CPU:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1410 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1409 #, no-wrap msgid "" "sys/i386/i386/machdep.c:\n" @@ -3720,7 +3721,7 @@ msgstr "" "union descriptor *gdt = gdt0;\t/* global descriptor table */\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1435 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1434 #, no-wrap msgid "" "sys/x86/include/segments.h:\n" @@ -3774,7 +3775,7 @@ msgstr "" "#define\tNGDT\t\t19\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1439 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1438 msgid "" "Note that those #defines are not selectors themselves, but just a field " "INDEX of a selector, so they are exactly the indices of the GDT. for " @@ -3787,7 +3788,7 @@ msgstr "" "`0x20`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1447 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1446 msgid "" "The next step is to initialize the Interrupt Descriptor Table (IDT). This " "table is referenced by the processor when a software or hardware interrupt " @@ -3810,7 +3811,7 @@ msgstr "" "выделяет NIDT записей для IDT, где NIDT — это максимум (256):" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1453 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1452 #, no-wrap msgid "" "sys/i386/i386/machdep.c:\n" @@ -3822,7 +3823,7 @@ msgstr "" "struct gate_descriptor *idt = &idt0[0];\t/* interrupt descriptor table */\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1457 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1456 msgid "" "For each interrupt, an appropriate handler is set. The syscall gate for " "`INT 0x80` is set as well:" @@ -3831,7 +3832,7 @@ msgstr "" "настраивается шлюз системного вызова для `INT 0x80`:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1463 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1462 #, no-wrap msgid "" "sys/i386/i386/machdep.c:\n" @@ -3843,7 +3844,7 @@ msgstr "" "\t\t\tSDT_SYS386IGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL));\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1466 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1465 msgid "" "So when a userland application issues the `INT 0x80` instruction, control " "will transfer to the function `_Xint0x80_syscall`, which is in the kernel " @@ -3854,12 +3855,12 @@ msgstr "" "сегменте кода ядра и будет выполнена с привилегиями супервизора." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1468 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1467 msgid "Console and DDB are then initialized:" msgstr "Консоль и DDB инициализируются:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1479 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1478 #, no-wrap msgid "" "sys/i386/i386/machdep.c:\n" @@ -3881,17 +3882,17 @@ msgstr "" "#endif\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1482 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1481 msgid "" "The Task State Segment is another x86 protected mode structure, the TSS is " "used by the hardware to store task information when a task switch occurs." msgstr "" -"Сегмент состояния задачи (TSS) — это ещё одна структура защищенного режима " +"Сегмент состояния задачи (TSS) — это ещё одна структура защищённого режима " "x86, используемая оборудованием для хранения информации о задаче при " "переключении задач." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1485 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1484 msgid "" "The Local Descriptors Table is used to reference userland code and data. " "Several selectors are defined to point to the LDT, they are the system call " @@ -3903,7 +3904,7 @@ msgstr "" "пользователя:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1494 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1493 #, no-wrap msgid "" "sys/x86/include/segments.h:\n" @@ -3921,7 +3922,7 @@ msgstr "" "#define\tNLDT\t\t(LUDATA_SEL + 1)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1499 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1498 msgid "" "Next, proc0's Process Control Block (`struct pcb`) structure is " "initialized. proc0 is a `struct proc` structure that describes a kernel " @@ -3933,7 +3934,7 @@ msgstr "" "Она всегда присутствует во время работы ядра, поэтому связана с thread0:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1507 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1506 #, no-wrap msgid "" "sys/i386/i386/machdep.c:\n" @@ -3949,7 +3950,7 @@ msgstr "" " /* ... skipped ... */\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1511 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1510 #, no-wrap msgid "" " proc_linkup0(&proc0, &thread0);\n" @@ -3961,7 +3962,7 @@ msgstr "" "}\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1515 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1514 msgid "" "The structure `struct pcb` is a part of a proc structure. It is defined in " "[.filename]#/usr/include/machine/pcb.h# and has a process's information " @@ -3972,13 +3973,13 @@ msgstr "" "специфичную для архитектуры i386, такую как значения регистров." #. type: Title === -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1516 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1515 #, no-wrap msgid "`mi_startup()`" msgstr "`mi_startup()`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1519 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1518 msgid "" "This function performs a bubble sort of all the system initialization " "objects and then calls the entry of each object one by one:" @@ -3987,7 +3988,7 @@ msgstr "" "системы, а затем вызывает вход каждого объекта по очереди:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1524 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1523 #, no-wrap msgid "" "sys/kern/init_main.c:\n" @@ -3997,13 +3998,13 @@ msgstr "" "\tfor (sipp = sysinit; sipp < sysinit_end; sipp++) {\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1526 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1525 #, no-wrap msgid "\t\t/* ... skipped ... */\n" msgstr "\t\t/* ... skipped ... */\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1531 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1530 #, no-wrap msgid "" "\t\t/* Call function */\n" @@ -4017,7 +4018,7 @@ msgstr "" "\t}\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1534 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1533 msgid "" "Although the sysinit framework is described in the extref:{developers-" "handbook}[Developers' Handbook], I will discuss the internals of it." @@ -4026,7 +4027,7 @@ msgstr "" "разработчика], я рассмотрю его внутреннее устройство." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1538 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1537 msgid "" "Every system initialization object (sysinit object) is created by calling a " "SYSINIT() macro. Let us take as example an `announce` sysinit object. This " @@ -4037,7 +4038,7 @@ msgstr "" "объект выводит сообщение об авторских правах:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1549 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1548 #, no-wrap msgid "" "sys/kern/init_main.c:\n" @@ -4059,7 +4060,7 @@ msgstr "" "SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1553 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1552 msgid "" "The subsystem ID for this object is SI_SUB_COPYRIGHT (0x0800001). So, the " "copyright message will be printed out first, just after the console " @@ -4070,7 +4071,7 @@ msgstr "" "после инициализации консоли." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1557 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1556 msgid "" "Let us take a look at what exactly the macro `SYSINIT()` does. It expands " "to a `C_SYSINIT()` macro. The `C_SYSINIT()` macro then expands to a static " @@ -4081,7 +4082,7 @@ msgstr "" "объявление структуры `struct sysinit` с вызовом другого макроса `DATA_SET`:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1565 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1564 #, no-wrap msgid "" "/usr/include/sys/kernel.h:\n" @@ -4097,7 +4098,7 @@ msgstr "" " _sys_init);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1569 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1568 #, no-wrap msgid "" "#define\tSYSINIT(uniquifier, subsystem, order, func, ident)\t\\\n" @@ -4109,7 +4110,7 @@ msgstr "" "\t(sysinit_cfunc_t)(sysinit_nfunc_t)func, (void *)(ident))\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1572 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1571 msgid "" "The `DATA_SET()` macro expands to a `_MAKE_SET()`, and that macro is the " "point where all the sysinit magic is hidden:" @@ -4118,7 +4119,7 @@ msgstr "" "скрыта вся магия инициализации системы:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1578 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1577 #, no-wrap msgid "" "/usr/include/linker_set.h:\n" @@ -4130,7 +4131,7 @@ msgstr "" "#define DATA_SET(set, sym) _MAKE_SET(set, sym)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1582 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1581 msgid "" "After executing these macros, various sections were made in the kernel, " "including`set.sysinit_set`. Running objdump on a kernel binary, you may " @@ -4141,7 +4142,7 @@ msgstr "" "заметить наличие таких небольших разделов:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1594 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1593 #, no-wrap msgid "" "% llvm-objdump -h /kernel\n" @@ -4165,7 +4166,7 @@ msgstr "" " 41 set_sysinit_set 000014d8 018fabb0 DATA\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1598 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1597 msgid "" "This screen dump shows that the size of set.sysinit_set section is 0x14d8 " "bytes, so `0x14d8/sizeof(void *)` sysinit objects are compiled into the " @@ -4178,7 +4179,7 @@ msgstr "" "представляют другие наборы компоновщика." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1600 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1599 msgid "" "By defining a variable of type `struct sysinit` the content of `set." "sysinit_set` section will be \"collected\" into that variable:" @@ -4187,7 +4188,7 @@ msgstr "" "sysinit_set` будет \"собрано\" в эту переменную:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1605 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1604 #, no-wrap msgid "" "sys/kern/init_main.c:\n" @@ -4197,12 +4198,12 @@ msgstr "" " SET_DECLARE(sysinit_set, struct sysinit);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1608 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1607 msgid "The `struct sysinit` is defined as follows:" msgstr "`struct sysinit` определена следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1618 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1617 #, no-wrap msgid "" "sys/sys/kernel.h:\n" @@ -4222,7 +4223,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1623 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1622 msgid "" "Returning to the `mi_startup()` discussion, it is must be clear now, how the " "sysinit objects are being organized. The `mi_startup()` function sorts them " @@ -4233,7 +4234,7 @@ msgstr "" "каждый. Самый последний объект — это системный планировщик:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1635 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1634 #, no-wrap msgid "" "/usr/include/sys/kernel.h:\n" @@ -4257,7 +4258,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1640 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1639 msgid "" "The system scheduler sysinit object is defined in the file [.filename]#sys/" "vm/vm_glue.c#, and the entry point for that object is `scheduler()`. That " @@ -4272,7 +4273,7 @@ msgstr "" "его описания." #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1642 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1641 msgid "" "The first user process, called _init_, is created by the sysinit object " "`init`:" @@ -4281,7 +4282,7 @@ msgstr "" "sysinit `init`:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1653 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1652 #, no-wrap msgid "" "sys/kern/init_main.c:\n" @@ -4303,7 +4304,7 @@ msgstr "" "\tint error;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1686 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1685 #, no-wrap msgid "" "\tbzero(&fr, sizeof(fr));\n" @@ -4373,7 +4374,7 @@ msgstr "" "SYSINIT(init, SI_SUB_CREATE_INIT, SI_ORDER_FIRST, create_init, NULL);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1692 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1691 msgid "" "The function `create_init()` allocates a new process by calling `fork1()`, " "but does not mark it runnable. When this new process is scheduled for " @@ -4392,7 +4393,7 @@ msgstr "" "filename]#/sbin/init.bak# и, наконец, [.filename]#/rescue/init#:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1702 +#: documentation/content/en/books/arch-handbook/boot/_index.adoc:1701 #, no-wrap msgid "" "sys/kern/init_main.c:\n" diff --git a/documentation/content/ru/books/arch-handbook/isa/_index.adoc b/documentation/content/ru/books/arch-handbook/isa/_index.adoc index 5bc691b28c..2522e7f485 100644 --- a/documentation/content/ru/books/arch-handbook/isa/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/isa/_index.adoc @@ -208,7 +208,7 @@ device xxx at isa? Вызов процедур обнаружения и присоединения всех устройств, не поддерживающих PNP, выполняется аналогичным образом. -Устройства PnP выводятся из состояния сна и получают запрошенные ресурсы: диапазоны адресов ввода-вывода и памяти, IRQ и DRQ, причем все они не конфликтуют с подключенными устаревшими устройствами. +Устройства PnP выводятся из состояния сна и получают запрошенные ресурсы: диапазоны адресов ввода-вывода и памяти, IRQ и DRQ, причём все они не конфликтуют с подключёнными устаревшими устройствами. Затем для каждого устройства PnP вызываются процедуры обнаружения всех присутствующих драйверов ISA. Первый драйвер, который заявит о поддержке устройства, будет присоединен. Возможна ситуация, когда несколько драйверов заявят о поддержке устройства с разным приоритетом; в этом случае побеждает драйвер с наивысшим приоритетом. Процедуры обнаружения должны вызывать `ISA_PNP_PROBE()` для сравнения фактического PnP ID со списком ID, поддерживаемых драйвером, и если ID отсутствует в таблице, возвращать ошибку. Это означает, что абсолютно каждый драйвер, даже те, которые не поддерживают никакие PnP устройства, должны вызывать `ISA_PNP_PROBE()`, хотя бы с пустой таблицей PnP ID, чтобы возвращать ошибку для неизвестных PnP устройств. @@ -278,7 +278,7 @@ device xxx at isa? Удаляет ресурс, делает его неопределённым. * `struct resource * bus_alloc_resource(device_t dev, int type, int *rid, u_long start, u_long end, u_long count, u_int flags)` + -Выделяет ресурс как диапазон значений count, не выделенных никем другим, где-то между start и end. Увы, выравнивание не поддерживается. Если ресурс ещё не был установлен, он автоматически создаётся. Специальные значения start равное 0 и end равное ~0 (все единицы) означают, что должны использоваться фиксированные значения, ранее установленные `bus_set_resource()`: start и count как есть, а end=(start+count). В этом случае, если ресурс не был определён ранее, возвращается ошибка. Хотя rid передаётся по ссылке, он нигде не устанавливается кодом выделения ресурсов шины ISA. Другие шины могут использовать иной подход и изменять его. +Выделяет ресурс как диапазон значений count, не выделённых никем другим, где-то между start и end. Увы, выравнивание не поддерживается. Если ресурс ещё не был установлен, он автоматически создаётся. Специальные значения start равное 0 и end равное ~0 (все единицы) означают, что должны использоваться фиксированные значения, ранее установленные `bus_set_resource()`: start и count как есть, а end=(start+count). В этом случае, если ресурс не был определён ранее, возвращается ошибка. Хотя rid передаётся по ссылке, он нигде не устанавливается кодом выделения ресурсов шины ISA. Другие шины могут использовать иной подход и изменять его. Флаги представляют собой битовую карту. Интересные для вызывающей стороны флаги: diff --git a/documentation/content/ru/books/arch-handbook/isa/_index.po b/documentation/content/ru/books/arch-handbook/isa/_index.po index 38e962e4a9..0b612d58cf 100644 --- a/documentation/content/ru/books/arch-handbook/isa/_index.po +++ b/documentation/content/ru/books/arch-handbook/isa/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" -"PO-Revision-Date: 2026-04-05 04:45+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbookisa_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Title = @@ -32,13 +32,13 @@ msgid "Chapter 10. ISA Device Drivers" msgstr "Глава 10. Драйверы устройств ISA" #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:52 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:51 #, no-wrap msgid "Synopsis" msgstr "Обзор" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:55 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:54 msgid "" "This chapter introduces the issues relevant to writing a driver for an ISA " "device. The pseudo-code presented here is rather detailed and reminiscent of " @@ -55,18 +55,18 @@ msgstr "" "источниками информации." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:57 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:56 #, no-wrap msgid "Basic Information" msgstr "Основная информация" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:60 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:59 msgid "A typical ISA driver would need the following include files:" msgstr "Типичному драйверу ISA могут потребоваться следующие включаемые файлы:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:68 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:67 #, no-wrap msgid "" "#include <sys/module.h>\n" @@ -82,7 +82,7 @@ msgstr "" "#include <sys/rman.h>\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:71 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:70 #, no-wrap msgid "" "#include <isa/isavar.h>\n" @@ -92,13 +92,13 @@ msgstr "" "#include <isa/pnpvar.h>\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:74 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:73 msgid "They describe the things specific to the ISA and generic bus subsystem." msgstr "" "Они описывают особенности, специфичные для подсистемы ISA и обобщенной шины." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:76 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:75 msgid "" "The bus subsystem is implemented in an object-oriented fashion, its main " "structures are accessed by associated method functions." @@ -107,7 +107,7 @@ msgstr "" "структуры доступны через методы, связанные с объектами." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:78 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:77 msgid "" "The list of bus methods implemented by an ISA driver is like one for any " "other bus. For a hypothetical driver named \"xxx\" they would be:" @@ -116,7 +116,7 @@ msgstr "" "другой шины. Для гипотетического драйвера с именем \"xxx\" они будут:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:80 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:79 msgid "" "`static void xxx_isa_identify (driver_t *, device_t);` Normally used for bus " "drivers, not device drivers. But for ISA devices this method may have " @@ -130,7 +130,7 @@ msgstr "" "процедура может его реализовывать." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:81 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:80 msgid "" "`static int xxx_isa_probe (device_t dev);` Probe for a device at a known (or " "PnP) location. This routine can also accommodate device-specific auto-" @@ -142,7 +142,7 @@ msgstr "" "настроенных устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:82 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:81 msgid "" "`static int xxx_isa_attach (device_t dev);` Attach and initialize device." msgstr "" @@ -150,7 +150,7 @@ msgstr "" "устройства." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:83 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:82 msgid "" "`static int xxx_isa_detach (device_t dev);` Detach device before unloading " "the driver module." @@ -159,7 +159,7 @@ msgstr "" "выгрузкой модуля драйвера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:84 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:83 msgid "" "`static int xxx_isa_shutdown (device_t dev);` Execute shutdown of the device " "before system shutdown." @@ -168,7 +168,7 @@ msgstr "" "устройства перед выключением системы." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:85 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:84 msgid "" "`static int xxx_isa_suspend (device_t dev);` Suspend the device before the " "system goes to the power-save state. May also abort transition to the power-" @@ -179,7 +179,7 @@ msgstr "" "переход в энергосберегающий режим." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:86 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:85 msgid "" "`static int xxx_isa_resume (device_t dev);` Resume the device activity after " "return from power-save state." @@ -188,7 +188,7 @@ msgstr "" "устройства после возврата из энергосберегающего состояния." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:88 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:87 msgid "" "`xxx_isa_probe()` and `xxx_isa_attach()` are mandatory, the rest of the " "routines are optional, depending on the device's needs." @@ -197,13 +197,13 @@ msgstr "" "процедуры опциональны и зависят от потребностей устройства." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:90 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:89 msgid "" "The driver is linked to the system with the following set of descriptions." msgstr "Драйвер связан с системой следующим набором описаний." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:104 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:103 #, no-wrap msgid "" " /* table of supported bus methods */\n" @@ -231,7 +231,7 @@ msgstr "" " DEVMETHOD(device_resume, xxx_isa_resume),\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:107 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:106 #, no-wrap msgid "" "\tDEVMETHOD_END\n" @@ -241,7 +241,7 @@ msgstr "" " };\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:113 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:112 #, no-wrap msgid "" " static driver_t xxx_isa_driver = {\n" @@ -257,13 +257,13 @@ msgstr "" " };\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:115 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:114 #, no-wrap msgid " static devclass_t xxx_devclass;\n" msgstr " static devclass_t xxx_devclass;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:118 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:117 #, no-wrap msgid "" " DRIVER_MODULE(xxx, isa, xxx_isa_driver, xxx_devclass,\n" @@ -273,7 +273,7 @@ msgstr "" " load_function, load_argument);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:121 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:120 msgid "" "Here struct `xxx_softc` is a device-specific structure that contains private " "driver data and descriptors for the driver's resources. The bus code " @@ -285,7 +285,7 @@ msgstr "" "по мере необходимости." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:123 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:122 msgid "" "If the driver is implemented as a loadable module then `load_function()` is " "called to do driver-specific initialization or clean-up when the driver is " @@ -297,13 +297,13 @@ msgstr "" "Если драйвер реализован в виде загружаемого модуля, то `load_function()` " "вызывается для выполнения специфичной для драйвера инициализации или очистки " "при загрузке или выгрузке драйвера, а `load_argument` передаётся в качестве " -"одного из её аргументов. Если драйвер не поддерживает динамическую загрузку (" -"другими словами, он всегда должен быть связан с ядром), то эти значения " +"одного из её аргументов. Если драйвер не поддерживает динамическую загрузку " +"(другими словами, он всегда должен быть связан с ядром), то эти значения " "должны быть установлены в 0, и последнее определение будет выглядеть " "следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:128 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:127 #, no-wrap msgid "" " DRIVER_MODULE(xxx, isa, xxx_isa_driver,\n" @@ -313,7 +313,7 @@ msgstr "" " xxx_devclass, 0, 0);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:131 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:130 msgid "" "If the driver is for a device which supports PnP then a table of supported " "PnP IDs must be defined. The table consists of a list of PnP IDs supported " @@ -326,7 +326,7 @@ msgstr "" "обеспечения и моделей, имеющих эти ID. Это выглядит следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:140 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:139 #, no-wrap msgid "" " static struct isa_pnp_id xxx_pnp_ids[] = {\n" @@ -344,7 +344,7 @@ msgstr "" " };\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:143 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:142 msgid "" "If the driver does not support PnP devices it still needs an empty PnP ID " "table, like:" @@ -353,7 +353,7 @@ msgstr "" "таблица идентификаторов PnP, например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:149 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:148 #, no-wrap msgid "" " static struct isa_pnp_id xxx_pnp_ids[] = {\n" @@ -365,13 +365,13 @@ msgstr "" " };\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:152 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:151 #, no-wrap msgid "`device_t` Pointer" msgstr "Указатель `device_t`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:155 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:154 msgid "" "`device_t` is the pointer type for the device structure. Here we consider " "only the methods interesting from the device driver writer's standpoint. The " @@ -383,20 +383,20 @@ msgstr "" "структуре устройства следующие:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:157 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:156 msgid "`device_t device_get_parent(dev)` Get the parent bus of a device." msgstr "" "`device_t device_get_parent(dev)` Получить родительскую шину устройства." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:158 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:157 msgid "`driver_t device_get_driver(dev)` Get pointer to its driver structure." msgstr "" "`driver_t device_get_driver(dev)` Получить указатель на структуру его " "драйвера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:159 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:158 msgid "" "`char *device_get_name(dev)` Get the driver name, such as `\"xxx\"` for our " "example." @@ -405,7 +405,7 @@ msgstr "" "нашем примере." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:160 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:159 msgid "" "`int device_get_unit(dev)` Get the unit number (units are numbered from 0 " "for the devices associated with each driver)." @@ -414,7 +414,7 @@ msgstr "" "с 0 для устройств, связанных с каждым драйвером)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:161 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:160 msgid "" "`char *device_get_nameunit(dev)` Get the device name including the unit " "number, such as \"xxx0\", \"xxx1\" and so on." @@ -423,7 +423,7 @@ msgstr "" "юнита, например, \"xxx0\", \"xxx1\" и так далее." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:162 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:161 msgid "" "`char *device_get_desc(dev)` Get the device description. Normally it " "describes the exact model of device in human-readable form." @@ -432,7 +432,7 @@ msgstr "" "описывает точную модель устройства в удобочитаемом виде." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:163 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:162 msgid "" "`device_set_desc(dev, desc)` Set the description. This makes the device " "description point to the string desc which may not be deallocated or changed " @@ -443,7 +443,7 @@ msgstr "" "изменена после этого." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:164 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:163 msgid "" "`device_set_desc_copy(dev, desc)` Set the description. The description is " "copied into an internal dynamically allocated buffer, so the string desc may " @@ -454,16 +454,16 @@ msgstr "" "изменена впоследствии без негативных последствий." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:165 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:164 msgid "" "`void *device_get_softc(dev)` Get pointer to the device descriptor (struct " "`xxx_softc`) associated with this device." msgstr "" -"`void *device_get_softc(dev)` Получить указатель на дескриптор устройства (" -"структура `xxx_softc`), связанный с данным устройством." +"`void *device_get_softc(dev)` Получить указатель на дескриптор устройства " +"(структура `xxx_softc`), связанный с данным устройством." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:166 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:165 msgid "" "`u_int32_t device_get_flags(dev)` Get the flags specified for the device in " "the configuration file." @@ -472,7 +472,7 @@ msgstr "" "файле конфигурации." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:168 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:167 msgid "" "A convenience function `device_printf(dev, fmt, ...)` may be used to print " "the messages from the device driver. It automatically prepends the unitname " @@ -483,27 +483,26 @@ msgstr "" "устройства и двоеточие перед сообщением." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:170 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:169 msgid "" -"The device_t methods are implemented in the file [.filename]#kern/" -"bus_subr.c#." +"The device_t methods are implemented in the file [.filename]#kern/bus_subr." +"c#." msgstr "Методы device_t реализованы в файле [.filename]#kern/bus_subr.c#." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:172 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:171 #, no-wrap msgid "Configuration File and the Order of Identifying and Probing During Auto-Configuration" -msgstr "" -"Файл конфигурации и порядок определения и проверки при автоматической " -"настройке" +msgstr "Файл конфигурации и порядок определения и проверки при автоматической настройке" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:175 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:174 msgid "The ISA devices are described in the kernel configuration file like:" -msgstr "Устройства ISA описываются в файле конфигурации ядра следующим образом:" +msgstr "" +"Устройства ISA описываются в файле конфигурации ядра следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:180 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:179 #, no-wrap msgid "" "device xxx0 at isa? port 0x300 irq 10 drq 5\n" @@ -513,7 +512,7 @@ msgstr "" " iomem 0xd0000 flags 0x1 sensitive\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:183 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:182 msgid "" "The values of port, IRQ and so on are converted to the resource values " "associated with the device. They are optional, depending on the device's " @@ -532,7 +531,7 @@ msgstr "" "или `isa1`, иначе устройство будет искаться на всех шинах ISA." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:185 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:184 msgid "" "`sensitive` is a resource requesting that this device must be probed before " "all non-sensitive devices. It is supported but does not seem to be used in " @@ -543,7 +542,7 @@ msgstr "" "похоже, не используется ни в одном текущем драйвере." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:187 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:186 msgid "" "For legacy ISA devices in many cases the drivers are still able to detect " "the configuration parameters. But each device to be configured in the system " @@ -558,19 +557,19 @@ msgstr "" "драйвера есть только одна строка конфигурации, например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:190 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:189 #, no-wrap msgid "device xxx0 at isa?\n" msgstr "device xxx0 at isa?\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:192 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:191 #, no-wrap msgid " then only one device will be configured.\n" msgstr " тогда будет настроено только одно устройство.\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:194 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:193 msgid "" "But for the devices supporting automatic identification by the means of Plug-" "n-Play or some proprietary protocol one configuration line is enough to " @@ -582,13 +581,13 @@ msgstr "" "выше или просто:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:198 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:197 #, no-wrap msgid "device xxx at isa?\n" msgstr "device xxx at isa?\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:201 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:200 msgid "" "If a driver supports both auto-identified and legacy devices and both kinds " "are installed at once in one machine then it is enough to describe in the " @@ -601,13 +600,13 @@ msgstr "" "Автоматически определяемые устройства будут добавлены автоматически." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:203 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:202 msgid "When an ISA bus is auto-configured the events happen as follows:" msgstr "" "При автоматической настройке шины ISA события происходят в следующем порядке:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:205 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:204 msgid "" "All the drivers' identify routines (including the PnP identify routine which " "identifies all the PnP devices) are called in random order. As they identify " @@ -625,7 +624,7 @@ msgstr "" "добавляет." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:207 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:206 msgid "" "The PnP devices are put to sleep using the PnP protocol to prevent them from " "being probed as legacy devices." @@ -634,7 +633,7 @@ msgstr "" "предотвратить их обнаружение как устаревших устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:209 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:208 msgid "" "The probe routines of non-PnP devices marked as `sensitive` are called. If " "probe for a device went successfully, the attach routine is called for it." @@ -644,7 +643,7 @@ msgstr "" "завершилась успешно, вызывается процедура присоединения для него." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:211 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:210 msgid "" "The probe and attach routines of all non-PNP devices are called likewise." msgstr "" @@ -652,18 +651,18 @@ msgstr "" "PNP, выполняется аналогичным образом." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:213 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:212 msgid "" "The PnP devices are brought back from the sleep state and assigned the " "resources they request: I/O and memory address ranges, IRQs and DRQs, all of " "them not conflicting with the attached legacy devices." msgstr "" "Устройства PnP выводятся из состояния сна и получают запрошенные ресурсы: " -"диапазоны адресов ввода-вывода и памяти, IRQ и DRQ, причем все они не " -"конфликтуют с подключенными устаревшими устройствами." +"диапазоны адресов ввода-вывода и памяти, IRQ и DRQ, причём все они не " +"конфликтуют с подключёнными устаревшими устройствами." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:215 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:214 msgid "" "Then for each PnP device the probe routines of all the present ISA drivers " "are called. The first one that claims the device gets attached. It is " @@ -688,7 +687,7 @@ msgstr "" "устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:217 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:216 msgid "" "The probe routine returns a positive value (the error code) on error, zero " "or negative value on success." @@ -697,7 +696,7 @@ msgstr "" "случае ошибки, ноль или отрицательное значение в случае успеха." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:219 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:218 msgid "" "The negative return values are used when a PnP device supports multiple " "interfaces. For example, an older compatibility interface and a newer " @@ -728,7 +727,7 @@ msgstr "" "может быть уверен, что выиграл арбитраж приоритетов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:221 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:220 msgid "" "The device-specific identify routines can also assign not a driver but a " "class of drivers to the device. Then all the drivers in the class are probed " @@ -742,7 +741,7 @@ msgstr "" "документе не рассматривается." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:223 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:222 msgid "" "As the PnP devices are disabled when probing the legacy devices they will " "not be attached twice (once as legacy and once as PnP). But in case of " @@ -758,7 +757,7 @@ msgstr "" "раз как автоматически идентифицированное), лежит на драйвере." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:225 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:224 msgid "" "Another practical consequence for the auto-identified devices (both PnP and " "device-specific) is that the flags can not be passed to them from the kernel " @@ -766,21 +765,21 @@ msgid "" "flags from the device unit 0 for all the auto-identified devices or use the " "sysctl interface instead of flags." msgstr "" -"Еще одно практическое следствие для автоматически определяемых устройств (" -"как PnP, так и специфичных для устройства) заключается в том, что флаги не " +"Еще одно практическое следствие для автоматически определяемых устройств " +"(как PnP, так и специфичных для устройства) заключается в том, что флаги не " "могут быть переданы им из файла конфигурации ядра. Поэтому они либо не " "должны использовать флаги вообще, либо использовать флаги из устройства unit " "0 для всех автоматически определяемых устройств, либо использовать интерфейс " "sysctl вместо флагов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:227 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:226 msgid "" "Other unusual configurations may be accommodated by accessing the " "configuration resources directly with functions of families " "`resource_query_*()` and `resource_*_value()`. Their implementations are " -"located in [.filename]#kern/subr_bus.c#. The old IDE disk driver " -"[.filename]#i386/isa/wd.c# contains examples of such use. But the standard " +"located in [.filename]#kern/subr_bus.c#. The old IDE disk driver [." +"filename]#i386/isa/wd.c# contains examples of such use. But the standard " "means of configuration must always be preferred. Leave parsing the " "configuration resources to the bus configuration code." msgstr "" @@ -793,13 +792,13 @@ msgstr "" "конфигурации коду настройки шины." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:229 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:228 #, no-wrap msgid "Resources" msgstr "Ресурсы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:232 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:231 msgid "" "The information that a user enters into the kernel configuration file is " "processed and passed to the kernel as configuration resources. This " @@ -819,7 +818,7 @@ msgstr "" "и это не рекомендуется, поэтому данный вопрос далее не рассматривается." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:234 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:233 msgid "" "The bus resources are associated with each device. They are identified by " "type and number within the type. For the ISA bus the following types are " @@ -829,17 +828,17 @@ msgstr "" "номеру внутри типа. Для шины ISA определены следующие типы:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:236 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:235 msgid "_SYS_RES_IRQ_ - interrupt number" msgstr "_SYS_RES_IRQ_ - номер прерывания" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:237 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:236 msgid "_SYS_RES_DRQ_ - ISA DMA channel number" msgstr "_SYS_RES_DRQ_ - номер канала ISA DMA" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:238 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:237 msgid "" "_SYS_RES_MEMORY_ - range of device memory mapped into the system memory space" msgstr "" @@ -847,12 +846,12 @@ msgstr "" "адресное пространство" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:239 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:238 msgid "_SYS_RES_IOPORT_ - range of device I/O registers" msgstr "_SYS_RES_IOPORT_ - диапазон регистров ввода-вывода устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:241 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:240 msgid "" "The enumeration within types starts from 0, so if a device has two memory " "regions it would have resources of type `SYS_RES_MEMORY` numbered 0 and 1. " @@ -864,13 +863,13 @@ msgid "" msgstr "" "Перечисление внутри типов начинается с 0, поэтому если устройство имеет две " "области памяти, оно будет иметь ресурсы типа `SYS_RES_MEMORY` с номерами 0 и " -"1. Тип ресурса не связан с типом языка C, все значения ресурсов имеют тип `" -"unsigned long` в языке C и должны быть приведены по мере необходимости. " +"1. Тип ресурса не связан с типом языка C, все значения ресурсов имеют тип " +"`unsigned long` в языке C и должны быть приведены по мере необходимости. " "Номера ресурсов не обязательно должны быть последовательными, хотя для ISA " "они обычно таковыми являются. Допустимые номера ресурсов для устройств ISA:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:248 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:247 #, no-wrap msgid "" " IRQ: 0-1\n" @@ -884,7 +883,7 @@ msgstr "" " IOPORT: 0-7\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:251 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:250 msgid "" "All the resources are represented as ranges, with a start value and count. " "For IRQ and DRQ resources the count would normally be equal to 1. The values " @@ -895,27 +894,27 @@ msgstr "" "памяти относятся к физическим адресам." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:253 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:252 msgid "Three types of activities can be performed on resources:" msgstr "Три типа действий могут выполняться над ресурсами:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:255 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:254 msgid "set/get" msgstr "Установка — set/get" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:256 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:255 msgid "allocate/release" msgstr "Выделение — allocate/release" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:257 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:256 msgid "activate/deactivate" msgstr "Активация — activate/deactivate" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:259 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:258 msgid "" "Setting sets the range used by the resource. Allocation reserves the " "requested range that no other driver would be able to reserve it (and " @@ -932,12 +931,12 @@ msgstr "" "это может быть отображение в виртуальное адресное пространство ядра)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:261 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:260 msgid "The functions to manipulate resources are:" msgstr "Функции для управления ресурсами:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:263 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:262 msgid "" "`int bus_set_resource(device_t dev, int type, int rid, u_long start, u_long " "count)`" @@ -946,7 +945,7 @@ msgstr "" "count)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:265 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:264 msgid "" "Set a range for a resource. Returns 0 if successful, error code otherwise. " "Normally, this function will return an error only if one of `type`, `rid`, " @@ -958,27 +957,27 @@ msgstr "" "за пределы допустимого диапазона." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:267 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:266 msgid "dev - driver's device" msgstr "dev - устройство драйвера" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:268 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:267 msgid "type - type of resource, SYS_RES_*" msgstr "тип - тип ресурса, SYS_RES_*" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:269 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:268 msgid "rid - resource number (ID) within type" msgstr "rid - номер ресурса (ID) в пределах типа" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:270 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:269 msgid "start, count - resource range" msgstr "начало, количество - диапазон ресурсов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:272 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:271 msgid "" "`int bus_get_resource(device_t dev, int type, int rid, u_long *startp, " "u_long *countp)`" @@ -987,7 +986,7 @@ msgstr "" "u_long *countp)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:274 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:273 msgid "" "Get the range of resource. Returns 0 if successful, error code if the " "resource is not defined yet." @@ -996,7 +995,7 @@ msgstr "" "ещё не определён." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:275 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:274 msgid "" "`u_long bus_get_resource_start(device_t dev, int type, int rid) u_long " "bus_get_resource_count (device_t dev, int type, int rid)`" @@ -1005,7 +1004,7 @@ msgstr "" "bus_get_resource_count (device_t dev, int type, int rid)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:277 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:276 msgid "" "Convenience functions to get only the start or count. Return 0 in case of " "error, so if the resource start has 0 among the legitimate values it would " @@ -1019,17 +1018,17 @@ msgstr "" "начальное значение, равное 0." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:278 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:277 msgid "`void bus_delete_resource(device_t dev, int type, int rid)`" msgstr "`void bus_delete_resource(device_t dev, int type, int rid)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:280 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:279 msgid "Delete a resource, make it undefined." msgstr "Удаляет ресурс, делает его неопределённым." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:281 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:280 msgid "" "`struct resource * bus_alloc_resource(device_t dev, int type, int *rid, " "u_long start, u_long end, u_long count, u_int flags)`" @@ -1038,7 +1037,7 @@ msgstr "" "u_long start, u_long end, u_long count, u_int flags)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:283 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:282 msgid "" "Allocate a resource as a range of count values not allocated by anyone else, " "somewhere between start and end. Alas, alignment is not supported. If the " @@ -1050,7 +1049,7 @@ msgid "" "anywhere by the resource allocation code of the ISA bus. (The other buses " "may use a different approach and modify it)." msgstr "" -"Выделяет ресурс как диапазон значений count, не выделенных никем другим, где-" +"Выделяет ресурс как диапазон значений count, не выделённых никем другим, где-" "то между start и end. Увы, выравнивание не поддерживается. Если ресурс ещё " "не был установлен, он автоматически создаётся. Специальные значения start " "равное 0 и end равное ~0 (все единицы) означают, что должны использоваться " @@ -1061,14 +1060,14 @@ msgstr "" "могут использовать иной подход и изменять его." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:285 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:284 msgid "Flags are a bitmap, the flags interesting for the caller are:" msgstr "" "Флаги представляют собой битовую карту. Интересные для вызывающей стороны " "флаги:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:287 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:286 msgid "" "_RF_ACTIVE_ - causes the resource to be automatically activated after " "allocation." @@ -1077,7 +1076,7 @@ msgstr "" "выделения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:288 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:287 msgid "" "_RF_SHAREABLE_ - resource may be shared at the same time by multiple drivers." msgstr "" @@ -1085,7 +1084,7 @@ msgstr "" "драйверами." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:289 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:288 msgid "" "_RF_TIMESHARE_ - resource may be time-shared by multiple drivers, i.e., " "allocated at the same time by many but activated only by one at any given " @@ -1096,7 +1095,7 @@ msgstr "" "момент времени." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:290 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:289 msgid "" "Returns 0 on error. The allocated values may be obtained from the returned " "handle using methods `rhand_*()`." @@ -1105,7 +1104,7 @@ msgstr "" "возвращённого дескриптора с использованием методов `rhand_*()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:291 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:290 msgid "" "`int bus_release_resource(device_t dev, int type, int rid, struct resource " "*r)`" @@ -1114,7 +1113,7 @@ msgstr "" "*r)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:292 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:291 msgid "" "Release the resource, r is the handle returned by `bus_alloc_resource()`. " "Returns 0 on success, error code otherwise." @@ -1123,7 +1122,7 @@ msgstr "" "Возвращает 0 при успехе, код ошибки в противном случае." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:293 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:292 msgid "" "`int bus_activate_resource(device_t dev, int type, int rid, struct resource " "*r) int bus_deactivate_resource(device_t dev, int type, int rid, struct " @@ -1134,7 +1133,7 @@ msgstr "" "resource *r)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:294 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:293 msgid "" "Activate or deactivate resource. Return 0 on success, error code otherwise. " "If the resource is time-shared and currently activated by another driver " @@ -1145,18 +1144,18 @@ msgstr "" "другим драйвером, возвращается `EBUSY`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:295 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:294 msgid "" "`int bus_setup_intr(device_t dev, struct resource *r, int flags, " "driver_intr_t *handler, void *arg, void **cookiep) int " "bus_teardown_intr(device_t dev, struct resource *r, void *cookie)`" msgstr "" "`int bus_setup_intr(device_t dev, struct resource *r, int flags, " -"driver_intr_t *handler, void *arg, void **cookiep) int bus_teardown_intr(" -"device_t dev, struct resource *r, void *cookie)`" +"driver_intr_t *handler, void *arg, void **cookiep) int " +"bus_teardown_intr(device_t dev, struct resource *r, void *cookie)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:296 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:295 msgid "" "Associate or de-associate the interrupt handler with a device. Return 0 on " "success, error code otherwise." @@ -1165,17 +1164,17 @@ msgstr "" "Возвращает 0 при успехе, код ошибки в противном случае." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:297 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:296 msgid "r - the activated resource handler describing the IRQ" msgstr "r - активированный обработчик ресурсов, описывающий IRQ" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:299 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:298 msgid "flags - the interrupt priority level, one of:" msgstr "flags - уровень приоритета прерывания, один из:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:301 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:300 msgid "" "`INTR_TYPE_TTY` - terminals and other likewise character-type devices. To " "mask them use `spltty()`." @@ -1184,7 +1183,7 @@ msgstr "" "их маскировки используйте `spltty()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:302 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:301 msgid "" "`(INTR_TYPE_TTY | INTR_TYPE_FAST)` - terminal type devices with small input " "buffer, critical to the data loss on input (such as the old-fashioned serial " @@ -1195,7 +1194,7 @@ msgstr "" "последовательные порты). Для их маскирования используйте `spltty()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:303 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:302 msgid "" "`INTR_TYPE_BIO` - block-type devices, except those on the CAM controllers. " "To mask them use `splbio()`." @@ -1204,7 +1203,7 @@ msgstr "" "контроллерам CAM. Для их маскирования используйте `splbio()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:304 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:303 msgid "" "`INTR_TYPE_CAM` - CAM (Common Access Method) bus controllers. To mask them " "use `splcam()`." @@ -1213,7 +1212,7 @@ msgstr "" "маскирования используйте `splcam()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:305 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:304 msgid "" "`INTR_TYPE_NET` - network interface controllers. To mask them use `splimp()`." msgstr "" @@ -1221,7 +1220,7 @@ msgstr "" "используйте `splimp()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:306 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:305 msgid "" "`INTR_TYPE_MISC` - miscellaneous devices. There is no other way to mask them " "than by `splhigh()` which masks all interrupts." @@ -1230,7 +1229,7 @@ msgstr "" "кроме `splhigh()`, который маскирует все прерывания." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:308 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:307 msgid "" "When an interrupt handler executes all the other interrupts matching its " "priority level will be masked. The only exception is the MISC level for " @@ -1243,7 +1242,7 @@ msgstr "" "блокируются и который сам не блокируется другими прерываниями." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:310 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:309 msgid "" "_handler_ - pointer to the handler function, the type driver_intr_t is " "defined as `void driver_intr_t(void *)`" @@ -1252,7 +1251,7 @@ msgstr "" "`void driver_intr_t(void *)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:311 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:310 msgid "" "_arg_ - the argument passed to the handler to identify this particular " "device. It is cast from void* to any real type by the handler. The old " @@ -1267,7 +1266,7 @@ msgstr "" "предполагает использование указателя на структуру softc устройства." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:312 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:311 msgid "" "_cookie[p]_ - the value received from `setup()` is used to identify the " "handler when passed to `teardown()`" @@ -1276,7 +1275,7 @@ msgstr "" "идентификации обработчика при передаче в `teardown()`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:314 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:313 msgid "" "A number of methods are defined to operate on the resource handlers (struct " "resource *). Those of interest to the device driver writers are:" @@ -1286,7 +1285,7 @@ msgstr "" "драйверов устройств:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:316 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:315 msgid "" "`u_long rman_get_start(r) u_long rman_get_end(r)` Get the start and end of " "allocated resource range." @@ -1295,7 +1294,7 @@ msgstr "" "выделенного диапазона ресурсов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:317 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:316 msgid "" "`void *rman_get_virtual(r)` Get the virtual address of activated memory " "resource." @@ -1304,13 +1303,13 @@ msgstr "" "ресурса памяти." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:319 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:318 #, no-wrap msgid "Bus Memory Mapping" msgstr "Отображение памяти шины" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:322 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:321 msgid "" "In many cases data is exchanged between the driver and the device through " "the memory. Two variants are possible:" @@ -1319,17 +1318,17 @@ msgstr "" "память. Возможны два варианта:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:324 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:323 msgid "(a) memory is located on the device card" msgstr "(а) память расположена на карте устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:326 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:325 msgid "(b) memory is the main memory of the computer" msgstr "(b) память — это основная память компьютера" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:328 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:327 msgid "" "In case (a) the driver always copies the data back and forth between the on-" "card memory and the main memory as necessary. To map the on-card memory into " @@ -1350,7 +1349,7 @@ msgstr "" "Теперь это один из внутренних шагов активации ресурса." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:330 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:329 msgid "" "Most of the ISA cards will have their memory configured for physical " "location somewhere in range 640KB-1MB. Some of the ISA cards require larger " @@ -1374,7 +1373,7 @@ msgstr "" "может не работать в старых BIOS)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:332 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:331 msgid "" "In case (b) just the address of the data is sent to the device, and the " "device uses DMA to actually access the data in the main memory. Two " @@ -1394,7 +1393,7 @@ msgstr "" "остальное должно быть реализовано самими драйверами." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:334 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:333 msgid "" "Two structures are used for DMA memory allocation, `bus_dma_tag_t` and " "`bus_dmamap_t`. Tag describes the properties required for the DMA memory. " @@ -1407,7 +1406,7 @@ msgstr "" "этими свойствами. С одним тегом может быть связано несколько карт." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:336 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:335 msgid "" "Tags are organized into a tree-like hierarchy with inheritance of the " "properties. A child tag inherits all the requirements of its parent tag, and " @@ -1418,7 +1417,7 @@ msgstr "" "строгими, но никогда более мягкими." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:338 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:337 msgid "" "Normally one top-level tag (with no parent) is created for each device unit. " "If multiple memory areas with different requirements are needed for each " @@ -1431,12 +1430,12 @@ msgstr "" "отношению к родительскому тегу." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:340 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:339 msgid "The tags can be used to create a map in two ways." msgstr "Теги могут быть использованы для создания карты двумя способами." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:342 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:341 msgid "" "First, a chunk of contiguous memory conformant with the tag requirements may " "be allocated (and later may be freed). This is normally used to allocate " @@ -1451,7 +1450,7 @@ msgstr "" "один блок в соответствующем диапазоне физической памяти." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:344 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:343 msgid "" "Second, an arbitrary area of virtual memory may be loaded into a map. Each " "page of this memory will be checked for conformance to the map requirement. " @@ -1468,8 +1467,8 @@ msgstr "" "Второй момент: произвольная область виртуальной памяти может быть загружена " "в карту. Каждая страница этой памяти будет проверяться на соответствие " "требованиям карты. Если она соответствует, то остаётся на своём исходном " -"месте. Если нет, то выделяется новая соответствующая промежуточная страница (" -"bounce page), которая используется как промежуточное хранилище. При записи " +"месте. Если нет, то выделяется новая соответствующая промежуточная страница " +"(bounce page), которая используется как промежуточное хранилище. При записи " "данных с несоответствующих исходных страниц они сначала копируются на свои " "промежуточные страницы, а затем передаются с промежуточных страниц на " "устройство. При чтении данные поступают с устройства на промежуточные " @@ -1479,12 +1478,12 @@ msgstr "" "каждой передачи загружается, передача выполняется, и буфер выгружается." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:346 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:345 msgid "The functions working on the DMA memory are:" msgstr "Функции, работающие с памятью DMA:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:348 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:347 msgid "" "`int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, " "bus_size_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, " @@ -1497,19 +1496,19 @@ msgstr "" "nsegments, bus_size_t maxsegsz, int flags, bus_dma_tag_t *dmat)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:350 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:349 msgid "Create a new tag. Returns 0 on success, the error code otherwise." msgstr "" "Создать новый тег. Возвращает 0 при успехе, код ошибки в противном случае." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:352 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:351 msgid "_parent_ - parent tag, or NULL to create a top-level tag." msgstr "" "_parent_ - родительский тег, или NULL для создания тега верхнего уровня." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:353 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:352 msgid "" "_alignment_ - required physical alignment of the memory area to be allocated " "for this tag. Use value 1 for \"no specific alignment\". Applies only to the " @@ -1521,15 +1520,15 @@ msgstr "" "`bus_dmamem_alloc()`, но не `bus_dmamap_create()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:354 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:353 msgid "" "_boundary_ - physical address boundary that must not be crossed when " "allocating the memory. Use value 0 for \"no boundary\". Applies only to the " "future `bus_dmamem_alloc()` but not `bus_dmamap_create()` calls. Must be " -"power of 2. If the memory is planned to be used in non-cascaded DMA mode " -"(i.e., the DMA addresses will be supplied not by the device itself but by " -"the ISA DMA controller) then the boundary must be no larger than 64KB " -"(64*1024) due to the limitations of the DMA hardware." +"power of 2. If the memory is planned to be used in non-cascaded DMA mode (i." +"e., the DMA addresses will be supplied not by the device itself but by the " +"ISA DMA controller) then the boundary must be no larger than 64KB (64*1024) " +"due to the limitations of the DMA hardware." msgstr "" "_boundary_ - физическая граница адреса, которую нельзя пересекать при " "выделении памяти. Используйте значение 0 для обозначения \"нет границы\". " @@ -1540,7 +1539,7 @@ msgstr "" "превышать 64 КБ (64*1024) из-за ограничений аппаратного обеспечения DMA." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:355 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:354 msgid "" "_lowaddr, highaddr_ - the names are slightly misleading; these values are " "used to limit the permitted range of physical addresses used to allocate the " @@ -1552,7 +1551,7 @@ msgstr "" "предполагаемого будущего использования:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:357 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:356 msgid "" "For `bus_dmamem_alloc()` all the addresses from 0 to lowaddr-1 are " "considered permitted, the higher ones are forbidden." @@ -1561,7 +1560,7 @@ msgstr "" "разрешёнными, а более высокие — запрещёнными." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:358 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:357 msgid "" "For `bus_dmamap_create()` all the addresses outside the inclusive range " "[lowaddr; highaddr] are considered accessible. The addresses of pages inside " @@ -1575,22 +1574,22 @@ msgstr "" "предоставлена, то весь диапазон считается недоступным." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:359 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:358 msgid "For the ISA devices the normal values (with no filter function) are:" msgstr "Для устройств ISA обычные значения (без функции фильтрации) следующие:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:361 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:360 msgid "lowaddr = BUS_SPACE_MAXADDR_24BIT" msgstr "lowaddr = BUS_SPACE_MAXADDR_24BIT" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:363 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:362 msgid "highaddr = BUS_SPACE_MAXADDR" msgstr "highaddr = BUS_SPACE_MAXADDR" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:365 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:364 msgid "" "_filter, filterarg_ - the filter function and its argument. If NULL is " "passed for filter then the whole range [lowaddr, highaddr] is considered " @@ -1609,7 +1608,7 @@ msgstr "" "страница доступна, и ненулевое значение в противном случае." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:366 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:365 msgid "" "_maxsize_ - the maximal size of memory (in bytes) that may be allocated " "through this tag. In case it is difficult to estimate or could be " @@ -1622,7 +1621,7 @@ msgstr "" "`BUS_SPACE_MAXSIZE_24BIT`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:367 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:366 msgid "" "_nsegments_ - maximal number of scatter-gather segments supported by the " "device. If unrestricted then the value `BUS_SPACE_UNRESTRICTED` should be " @@ -1640,12 +1639,12 @@ msgstr "" "тегов. Теги с nsegments равным `BUS_SPACE_UNRESTRICTED` не могут " "использоваться для фактической загрузки отображений, они могут применяться " "только как родительские теги. Практический предел для nsegments составляет " -"около 250-300, более высокие значения вызовут переполнение стека ядра (" -"аппаратное обеспечение обычно не поддерживает такое большое количество " +"около 250-300, более высокие значения вызовут переполнение стека ядра " +"(аппаратное обеспечение обычно не поддерживает такое большое количество " "scatter-gather буферов в любом случае)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:368 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:367 msgid "" "_maxsegsz_ - maximal size of a scatter-gather segment supported by the " "device. The maximal value for ISA device would be `BUS_SPACE_MAXSIZE_24BIT`." @@ -1655,12 +1654,12 @@ msgstr "" "`BUS_SPACE_MAXSIZE_24BIT`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:369 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:368 msgid "_flags_ - a bitmap of flags. The only interesting flag is:" msgstr "_flags_ - битовая маска флагов. Единственный интересный флаг:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:371 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:370 msgid "" "_BUS_DMA_ALLOCNOW_ - requests to allocate all the potentially needed bounce " "pages when creating the tag." @@ -1669,27 +1668,28 @@ msgstr "" "промежуточных страниц при создании тега." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:373 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:372 msgid "_dmat_ - pointer to the storage for the new tag to be returned." msgstr "_dmat_ - указатель на хранилище для нового возвращаемого тега." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:375 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:374 msgid "`int bus_dma_tag_destroy(bus_dma_tag_t dmat)`" msgstr "`int bus_dma_tag_destroy(bus_dma_tag_t dmat)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:377 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:376 msgid "Destroy a tag. Returns 0 on success, the error code otherwise." -msgstr "Уничтожить тег. Возвращает 0 при успехе, код ошибки в противном случае." +msgstr "" +"Уничтожить тег. Возвращает 0 при успехе, код ошибки в противном случае." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:379 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:378 msgid "dmat - the tag to be destroyed." msgstr "dmat - тег, который должен быть уничтожен." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:380 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:379 msgid "" "`int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, " "bus_dmamap_t *mapp)`" @@ -1698,7 +1698,7 @@ msgstr "" "bus_dmamap_t *mapp)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:382 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:381 msgid "" "Allocate an area of contiguous memory described by the tag. The size of " "memory to be allocated is tag's maxsize. Returns 0 on success, the error " @@ -1711,15 +1711,15 @@ msgstr "" "перед использованием для получения физического адреса памяти." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:384 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:396 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:404 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:419 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:383 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:395 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:403 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:418 msgid "_dmat_ - the tag" msgstr "_dmat_ - тег" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:385 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:384 msgid "" "_vaddr_ - pointer to the storage for the kernel virtual address of the " "allocated area to be returned." @@ -1728,12 +1728,12 @@ msgstr "" "выделенной области." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:386 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:385 msgid "flags - a bitmap of flags. The only interesting flag is:" msgstr "flags - битовая карта флагов. Единственный интересный флаг:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:388 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:387 msgid "" "_BUS_DMA_NOWAIT_ - if the memory is not immediately available return the " "error. If this flag is not set then the routine is allowed to sleep until " @@ -1744,19 +1744,19 @@ msgstr "" "память не станет доступной." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:390 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:389 msgid "_mapp_ - pointer to the storage for the new map to be returned." msgstr "_mapp_ - указатель на хранилище для возвращаемой новой карты." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:392 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:391 msgid "" "`void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)`" msgstr "" "`void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:394 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:393 msgid "" "Free the memory allocated by `bus_dmamem_alloc()`. At present, freeing of " "the memory allocated with ISA restrictions is not implemented. Due to this " @@ -1774,24 +1774,24 @@ msgstr "" "образом." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:397 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:396 msgid "_vaddr_ - the kernel virtual address of the memory" msgstr "_vaddr_ - виртуальный адрес памяти ядра" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:398 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:397 msgid "_map_ - the map of the memory (as returned from `bus_dmamem_alloc()`)" msgstr "_map_ - карта памяти (как возвращается из `bus_dmamem_alloc()`)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:400 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:399 msgid "" "`int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)`" msgstr "" "`int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:402 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:401 msgid "" "Create a map for the tag, to be used in `bus_dmamap_load()` later. Returns 0 " "on success, the error code otherwise." @@ -1800,7 +1800,7 @@ msgstr "" "позже. Возвращает 0 при успехе, в противном случае — код ошибки." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:405 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:404 msgid "" "_flags_ - theoretically, a bit map of flags. But no flags are defined yet, " "so at present it will be always 0." @@ -1809,34 +1809,34 @@ msgstr "" "определены, поэтому в настоящее время значение всегда будет 0." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:406 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:405 msgid "_mapp_ - pointer to the storage for the new map to be returned" msgstr "" "_mapp_ - указатель на хранилище для новой карты, которая будет возвращена" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:408 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:407 msgid "`int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)`" msgstr "`int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:410 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:409 msgid "Destroy a map. Returns 0 on success, the error code otherwise." msgstr "" "Уничтожить карту. Возвращает 0 при успехе, в противном случае — код ошибки." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:412 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:411 msgid "dmat - the tag to which the map is associated" msgstr "dmat - тег, с которым ассоциирована карта" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:413 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:412 msgid "map - the map to be destroyed" msgstr "map - карта, подлежащая уничтожению" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:415 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:414 msgid "" "`int bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, " "bus_size_t buflen, bus_dmamap_callback_t *callback, void *callback_arg, int " @@ -1847,7 +1847,7 @@ msgstr "" "flags)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:417 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:416 msgid "" "Load a buffer into the map (the map must be previously created by " "`bus_dmamap_create()` or `bus_dmamem_alloc()`). All the pages of the buffer " @@ -1877,27 +1877,27 @@ msgstr "" "является обязанностью драйвера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:420 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:419 msgid "_map_ - the map" msgstr "_map_ - карта" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:421 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:420 msgid "_buf_ - kernel virtual address of the buffer" msgstr "_buf_ - виртуальный адрес буфера в пространстве ядра" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:422 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:421 msgid "_buflen_ - length of the buffer" msgstr "_buflen_ - длина буфера" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:423 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:422 msgid "_callback_, `callback_arg` - the callback function and its argument" msgstr "_callback_, `callback_arg` - функция обратного вызова и её аргумент" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:425 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:424 msgid "" "The prototype of callback function is: `void callback(void *arg, " "bus_dma_segment_t *seg, int nseg, int error)`" @@ -1906,23 +1906,23 @@ msgstr "" "bus_dma_segment_t *seg, int nseg, int error)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:427 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:426 msgid "_arg_ - the same as callback_arg passed to `bus_dmamap_load()`" msgstr "" "_arg_ - то же самое, что и callback_arg, переданный в `bus_dmamap_load()`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:428 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:427 msgid "_seg_ - array of the segment descriptors" msgstr "_seg_ - массив дескрипторов сегментов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:429 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:428 msgid "_nseg_ - number of descriptors in array" msgstr "_nseg_ - количество дескрипторов в массиве" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:430 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:429 msgid "" "_error_ - indication of the segment number overflow: if it is set to `EFBIG` " "then the buffer did not fit into the maximal number of segments permitted by " @@ -1939,44 +1939,44 @@ msgstr "" "ошибкой, либо разделить буфер на две части и обработать вторую часть отдельно" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:432 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:431 msgid "Each entry in the segments array contains the fields:" msgstr "Каждая запись в массиве segments содержит поля:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:434 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:433 msgid "_ds_addr_ - physical bus address of the segment" msgstr "_ds_addr_ - физический адрес шины сегмента" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:435 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:434 msgid "_ds_len_ - length of the segment" msgstr "_ds_len_ - длина сегмента" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:437 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:436 msgid "`void bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)`" msgstr "`void bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:439 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:438 msgid "unload the map." msgstr "выгрузить карту." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:441 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:448 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:440 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:447 msgid "_dmat_ - tag" msgstr "_dmat_ - тег" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:442 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:449 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:441 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:448 msgid "_map_ - loaded map" msgstr "_map_ - загруженная карта" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:444 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:443 msgid "" "`void bus_dmamap_sync (bus_dma_tag_t dmat, bus_dmamap_t map, " "bus_dmasync_op_t op)`" @@ -1985,7 +1985,7 @@ msgstr "" "bus_dmasync_op_t op)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:446 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:445 msgid "" "Synchronise a loaded buffer with its bounce pages before and after physical " "transfer to or from device. This is the function that does all the necessary " @@ -1999,32 +1999,32 @@ msgstr "" "и после выполнения передачи." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:450 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:449 msgid "_op_ - type of synchronization operation to perform:" msgstr "_op_ - тип операции синхронизации для выполнения:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:452 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:451 msgid "`BUS_DMASYNC_PREREAD` - before reading from device into buffer" msgstr "`BUS_DMASYNC_PREREAD` - перед чтением с устройства в буфер" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:453 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:452 msgid "`BUS_DMASYNC_POSTREAD` - after reading from device into buffer" msgstr "`BUS_DMASYNC_POSTREAD` - после чтения из устройства в буфер" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:454 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:453 msgid "`BUS_DMASYNC_PREWRITE` - before writing the buffer to device" msgstr "`BUS_DMASYNC_PREWRITE` - перед записью буфера в устройство" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:455 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:454 msgid "`BUS_DMASYNC_POSTWRITE` - after writing the buffer to device" msgstr "`BUS_DMASYNC_POSTWRITE` - после записи буфера в устройство" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:457 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:456 msgid "" "As of now PREREAD and POSTWRITE are null operations but that may change in " "the future, so they must not be ignored in the driver. Synchronization is " @@ -2035,7 +2035,7 @@ msgstr "" "Синхронизация не требуется для памяти, полученной из `bus_dmamem_alloc()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:459 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:458 msgid "" "Before calling the callback function from `bus_dmamap_load()` the segment " "array is stored in the stack. And it gets pre-allocated for the maximal " @@ -2065,7 +2065,7 @@ msgstr "" "загрузить следующую часть буфера и так далее." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:461 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:460 msgid "" "Another practical consequence is that the number of segments may limit the " "size of the buffer. If all the pages in the buffer happen to be physically " @@ -2085,7 +2085,7 @@ msgstr "" "специальные приемы." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:463 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:462 msgid "" "If the hardware does not support scatter-gather at all or the driver wants " "to support some buffer size even if it is heavily fragmented then the " @@ -2098,7 +2098,7 @@ msgstr "" "его в качестве промежуточного хранилища, если исходный буфер не подходит." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:465 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:464 msgid "" "Below are the typical call sequences when using a map depend on the use of " "the map. The characters -> are used to show the flow of time." @@ -2108,7 +2108,7 @@ msgstr "" "обозначения последовательности во времени." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:467 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:466 msgid "" "For a buffer which stays practically fixed during all the time between " "attachment and detachment of a device:" @@ -2117,7 +2117,7 @@ msgstr "" "между присоединением и отсоединением устройства:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:469 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:468 msgid "" "bus_dmamem_alloc -> bus_dmamap_load -> ...use buffer... -> -> " "bus_dmamap_unload -> bus_dmamem_free" @@ -2126,13 +2126,13 @@ msgstr "" "bus_dmamap_unload -> bus_dmamem_free" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:471 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:470 msgid "" "For a buffer that changes frequently and is passed from outside the driver:" msgstr "Для буфера, который часто изменяется и передаётся извне драйвера:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:480 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:479 #, no-wrap msgid "" " bus_dmamap_create ->\n" @@ -2152,7 +2152,7 @@ msgstr "" " -> bus_dmamap_destroy\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:483 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:482 msgid "" "When loading a map created by `bus_dmamem_alloc()` the passed address and " "size of the buffer must be the same as used in `bus_dmamem_alloc()`. In this " @@ -2166,16 +2166,16 @@ msgstr "" "`bus_dmamem_alloc()`. В этом случае гарантируется, что весь буфер будет " "отображён как один сегмент (так что обратный вызов может основываться на " "этом предположении) и запрос будет выполнен немедленно (EINPROGRESS никогда " -"не будет возвращен). Все, что нужно сделать обратному вызову в этом случае, —" -" это сохранить физический адрес." +"не будет возвращен). Все, что нужно сделать обратному вызову в этом случае, " +"— это сохранить физический адрес." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:485 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:484 msgid "A typical example would be:" msgstr "Типичный пример:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:493 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:492 #, no-wrap msgid "" " static void\n" @@ -2185,14 +2185,13 @@ msgid "" " }\n" msgstr "" " static void\n" -" alloc_callback(void *arg, bus_dma_segment_t *seg, int nseg, int " -"error)\n" +" alloc_callback(void *arg, bus_dma_segment_t *seg, int nseg, int error)\n" " {\n" " *(bus_addr_t *)arg = seg[0].ds_addr;\n" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:504 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:503 #, no-wrap msgid "" " ...\n" @@ -2218,7 +2217,7 @@ msgstr "" " ...\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:512 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:511 #, no-wrap msgid "" " error=bus_dma_tag_create(parent_tag, alignment,\n" @@ -2230,8 +2229,7 @@ msgid "" " return error;\n" msgstr "" " error=bus_dma_tag_create(parent_tag, alignment,\n" -" boundary, lowaddr, highaddr, /*filter*/ NULL, /*filterarg*/ NULL," -"\n" +" boundary, lowaddr, highaddr, /*filter*/ NULL, /*filterarg*/ NULL,\n" " /*maxsize*/ sizeof(struct somedata), /*nsegments*/ 1,\n" " /*maxsegsz*/ sizeof(struct somedata), /*flags*/ 0,\n" " &tag_somedata);\n" @@ -2239,7 +2237,7 @@ msgstr "" " return error;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:517 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:516 #, no-wrap msgid "" " error = bus_dmamem_alloc(tag_somedata, &vsomedata, /* flags*/ 0,\n" @@ -2253,7 +2251,7 @@ msgstr "" " return error;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:521 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:520 #, no-wrap msgid "" " bus_dmamap_load(tag_somedata, map_somedata, (void *)vsomedata,\n" @@ -2265,7 +2263,7 @@ msgstr "" " (void *) &psomedata, /*flags*/0);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:524 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:523 msgid "" "Looks a bit long and complicated but that is the way to do it. The practical " "consequence is: if multiple memory areas are allocated always together it " @@ -2278,7 +2276,7 @@ msgstr "" "единое целое (если ограничения выравнивания и границ позволяют)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:526 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:525 msgid "" "When loading an arbitrary buffer into the map created by " "`bus_dmamap_create()` special measures must be taken to synchronize with the " @@ -2289,7 +2287,7 @@ msgstr "" "если он будет задержан. Код будет выглядеть следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:532 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:531 #, no-wrap msgid "" " {\n" @@ -2301,7 +2299,7 @@ msgstr "" " int error;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:551 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:550 #, no-wrap msgid "" " s = splsoftvm();\n" @@ -2343,12 +2341,12 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:554 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:553 msgid "Two possible approaches for the processing of requests are:" msgstr "Два возможных подхода для обработки запросов:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:556 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:555 msgid "" "If requests are completed by marking them explicitly as done (such as the " "CAM requests) then it would be simpler to put all the further processing " @@ -2365,7 +2363,7 @@ msgstr "" "завершения этого запроса." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:558 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:557 msgid "" "If requests are completed when the function returns (such as classic read or " "write requests on character devices) then a synchronization flag should be " @@ -2379,23 +2377,23 @@ msgid "" msgstr "" "Если запросы завершаются при возврате функции (например, классические " "запросы на чтение или запись для символьных устройств), то в дескрипторе " -"буфера должен быть установлен флаг синхронизации и вызвана функция `tsleep()`" -". Позже, когда будет вызван обратный вызов, он выполнит свою обработку и " -"проверит этот флаг синхронизации. Если флаг установлен, обратный вызов " -"должен инициировать пробуждение. При таком подходе функция обратного вызова " -"может либо выполнить всю необходимую обработку (как в предыдущем случае), " -"либо просто сохранить массив сегментов в дескрипторе буфера. Затем после " -"завершения обратного вызова вызывающая функция может использовать этот " +"буфера должен быть установлен флаг синхронизации и вызвана функция " +"`tsleep()`. Позже, когда будет вызван обратный вызов, он выполнит свою " +"обработку и проверит этот флаг синхронизации. Если флаг установлен, обратный " +"вызов должен инициировать пробуждение. При таком подходе функция обратного " +"вызова может либо выполнить всю необходимую обработку (как в предыдущем " +"случае), либо просто сохранить массив сегментов в дескрипторе буфера. Затем " +"после завершения обратного вызова вызывающая функция может использовать этот " "сохранённый массив сегментов и выполнить всю обработку." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:560 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:559 #, no-wrap msgid "DMA" msgstr "DMA" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:563 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:562 msgid "" "The Direct Memory Access (DMA) is implemented in the ISA bus through the DMA " "controller (actually, two of them but that is an irrelevant detail). To make " @@ -2412,7 +2410,7 @@ msgstr "" "работы контроллера DMA от драйверов устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:565 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:564 msgid "" "The simplest case is for the fairly intelligent devices. Like the bus master " "devices on PCI they can generate the bus cycles and memory addresses all by " @@ -2424,19 +2422,19 @@ msgid "" msgstr "" "Самый простой случай — для достаточно интеллектуальных устройств. Например, " "устройства с bus mastering на PCI могут сами генерировать шинные циклы и " -"адреса памяти. Единственное, что им действительно нужно от контроллера DMA, —" -" это арбитраж шины. Для этой цели они притворяются каскадированными " +"адреса памяти. Единственное, что им действительно нужно от контроллера DMA, " +"— это арбитраж шины. Для этой цели они притворяются каскадированными " "подчинёнными контроллерами DMA. И единственное, что требуется от системного " "контроллера DMA, — это включить каскадный режим на канале DMA, вызвав " "следующую функцию при присоединении драйвера:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:567 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:566 msgid "`void isa_dmacascade(int channel_number)`" msgstr "`void isa_dmacascade(int channel_number)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:569 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:568 msgid "" "All the further activity is done by programming the device. When detaching " "the driver no DMA-related functions need to be called." @@ -2445,7 +2443,7 @@ msgstr "" "отсоединении драйвера нет необходимости вызывать функции, связанные с DMA." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:571 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:570 msgid "" "For the simpler devices things get more complicated. The functions used are:" msgstr "" @@ -2453,12 +2451,12 @@ msgstr "" "функции:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:573 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:572 msgid "`int isa_dma_acquire(int chanel_number)`" msgstr "`int isa_dma_acquire(int chanel_number)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:575 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:574 msgid "" "Reserve a DMA channel. Returns 0 on success or EBUSY if the channel was " "already reserved by this or a different driver. Most of the ISA devices are " @@ -2476,12 +2474,12 @@ msgstr "" "использовать, то в дальнейшем другие процедуры DMA вызовут панику ядра." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:576 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:575 msgid "`int isa_dma_release(int chanel_number)`" msgstr "`int isa_dma_release(int chanel_number)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:578 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:577 msgid "" "Release a previously reserved DMA channel. No transfers must be in progress " "when the channel is released (in addition the device must not try to " @@ -2492,12 +2490,12 @@ msgstr "" "инициировать передачу после освобождения канала)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:579 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:578 msgid "`void isa_dmainit(int chan, u_int bouncebufsize)`" msgstr "`void isa_dmainit(int chan, u_int bouncebufsize)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:581 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:580 msgid "" "Allocate a bounce buffer for use with the specified channel. The requested " "size of the buffer can not exceed 64KB. This bounce buffer will be " @@ -2523,22 +2521,22 @@ msgstr "" "собирать." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:583 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:582 msgid "_chan_ - channel number" msgstr "_chan_ - номер канала" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:584 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:583 msgid "_bouncebufsize_ - size of the bounce buffer in bytes" msgstr "_bouncebufsize_ - размер промежуточного буфера в байтах" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:586 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:585 msgid "`void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)`" msgstr "`void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:588 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:587 msgid "" "Prepare to start a DMA transfer. This function must be called to set up the " "DMA controller before actually starting transfer on the device. It checks " @@ -2558,7 +2556,7 @@ msgstr "" "будут автоматически скопированы в этот буфер." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:589 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:588 msgid "" "flags - a bitmask determining the type of operation to be done. The " "direction bits B_READ and B_WRITE are mutually exclusive." @@ -2567,17 +2565,17 @@ msgstr "" "направления B_READ и B_WRITE являются взаимоисключающими." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:591 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:590 msgid "B_READ - read from the ISA bus into memory" msgstr "B_READ - чтение с шины ISA в память" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:592 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:591 msgid "B_WRITE - write from the memory to the ISA bus" msgstr "B_WRITE - запись из памяти на шину ISA" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:593 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:592 msgid "" "B_RAW - if set then the DMA controller will remember the buffer and after " "the end of transfer will automatically re-initialize itself to repeat " @@ -2596,12 +2594,12 @@ msgstr "" "B_RAW имеет смысл только если промежуточный буфер не используется." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:595 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:594 msgid "addr - virtual address of the buffer" msgstr "addr - виртуальный адрес буфера" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:596 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:595 msgid "" "nbytes - length of the buffer. Must be less or equal to 64KB. Length of 0 is " "not allowed: the DMA controller will understand it as 64KB while the kernel " @@ -2617,17 +2615,17 @@ msgstr "" "по 2 байта за раз. В случае нечётной длины последний байт не будет передан." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:597 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:596 msgid "chan - channel number" msgstr "chan - номер канала" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:598 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:597 msgid "`void isa_dmadone(int flags, caddr_t addr, int nbytes, int chan)`" msgstr "`void isa_dmadone(int flags, caddr_t addr, int nbytes, int chan)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:600 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:599 msgid "" "Synchronize the memory after device reports that transfer is done. If that " "was a read operation with a bounce buffer then the data will be copied from " @@ -2642,12 +2640,12 @@ msgstr "" "`isa_dmadone()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:601 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:600 msgid "`int isa_dmastatus(int channel_number)`" msgstr "`int isa_dmastatus(int channel_number)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:603 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:602 msgid "" "Returns the number of bytes left in the current transfer to be transferred. " "In case the flag B_READ was set in `isa_dmastart()` the number returned will " @@ -2665,37 +2663,38 @@ msgstr "" "количество байт не равно 0, то, вероятно, в передаче произошла ошибка." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:604 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:603 msgid "`int isa_dmastop(int channel_number)`" msgstr "`int isa_dmastop(int channel_number)`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:606 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:605 msgid "" "Aborts the current transfer and returns the number of bytes left " "untransferred." -msgstr "Прерывает текущую передачу и возвращает количество непереданных байтов." +msgstr "" +"Прерывает текущую передачу и возвращает количество непереданных байтов." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:608 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:607 #, no-wrap msgid "xxx_isa_probe" msgstr "xxx_isa_probe" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:611 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:610 msgid "" "This function probes if a device is present. If the driver supports auto-" "detection of some part of device configuration (such as interrupt vector or " "memory address) this auto-detection must be done in this routine." msgstr "" "Эта функция проверяет наличие устройства. Если драйвер поддерживает " -"автоматическое определение некоторых параметров конфигурации устройства (" -"таких как вектор прерывания или адрес памяти), это автоматическое " +"автоматическое определение некоторых параметров конфигурации устройства " +"(таких как вектор прерывания или адрес памяти), это автоматическое " "определение должно выполняться в данной процедуре." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:613 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:612 msgid "" "As for any other bus, if the device cannot be detected or is detected but " "failed the self-test or some other problem happened then it returns a " @@ -2711,7 +2710,7 @@ msgstr "" "Большинство драйверов возвращают ноль в случае успеха." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:615 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:614 msgid "" "The negative return values are used when a PnP device supports multiple " "interfaces. For example, an older compatibility interface and a newer " @@ -2733,11 +2732,11 @@ msgstr "" "— следующий, возвращающий -2 — за ним и так далее). В результате устройства, " "поддерживающие только старый интерфейс, будут обрабатываться старым " "драйвером (который должен возвращать -1 из процедуры probe), а устройства, " -"поддерживающие также новый интерфейс, будут обрабатываться новым драйвером (" -"который должен возвращать 0 из процедуры обнаружения)." +"поддерживающие также новый интерфейс, будут обрабатываться новым драйвером " +"(который должен возвращать 0 из процедуры обнаружения)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:617 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:616 msgid "" "The device descriptor struct xxx_softc is allocated by the system before " "calling the probe routine. If the probe routine returns an error the " @@ -2774,7 +2773,7 @@ msgstr "" "процедуры обнаружения и выполнением процедуры присоединения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:619 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:618 msgid "" "A typical probe routine starts with getting the device descriptor and unit:" msgstr "" @@ -2782,7 +2781,7 @@ msgstr "" "и номера устройства:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:626 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:625 #, no-wrap msgid "" " struct xxx_softc *sc = device_get_softc(dev);\n" @@ -2796,7 +2795,7 @@ msgstr "" " int error = 0;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:629 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:628 #, no-wrap msgid "" " sc->dev = dev; /* link it back */\n" @@ -2806,7 +2805,7 @@ msgstr "" " sc->unit = unit;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:632 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:631 msgid "" "Then check for the PnP devices. The check is carried out by a table " "containing the list of PnP IDs supported by this driver and human-readable " @@ -2817,7 +2816,7 @@ msgstr "" "описания моделей устройств, соответствующих этим ID." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:638 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:637 #, no-wrap msgid "" " pnperror=ISA_PNP_PROBE(device_get_parent(dev), dev,\n" @@ -2827,7 +2826,7 @@ msgstr "" " xxx_pnp_ids); if(pnperror == ENXIO) return ENXIO;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:641 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:640 msgid "" "The logic of ISA_PNP_PROBE is the following: If this card (device unit) was " "not detected as PnP then ENOENT will be returned. If it was detected as PnP " @@ -2845,7 +2844,7 @@ msgstr "" "`device_set_desc()`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:643 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:642 msgid "" "If a driver supports only PnP devices then the condition would look like:" msgstr "" @@ -2853,7 +2852,7 @@ msgstr "" "следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:648 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:647 #, no-wrap msgid "" " if(pnperror != 0)\n" @@ -2863,7 +2862,7 @@ msgstr "" " return pnperror;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:651 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:650 msgid "" "No special treatment is required for the drivers which do not support PnP " "because they pass an empty PnP ID table and will always get ENXIO if called " @@ -2874,7 +2873,7 @@ msgstr "" "будут получать ENXIO при вызове на PnP-карте." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:653 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:652 msgid "" "The probe routine normally needs at least some minimal set of resources, " "such as I/O port number to find the card and probe it. Depending on the " @@ -2890,7 +2889,7 @@ msgstr "" "самостоятельно." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:655 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:654 msgid "" "Typically the minimal information required to get access to the device is " "the I/O port number. Then some devices allow to get the rest of information " @@ -2904,7 +2903,7 @@ msgstr "" "значение порта:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:660 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:659 #, no-wrap msgid "" " sc->port0 = bus_get_resource_start(dev,\n" @@ -2914,7 +2913,7 @@ msgstr "" " SYS_RES_IOPORT, 0 /*rid*/); if(sc->port0 == 0) return ENXIO;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:663 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:662 msgid "" "The base port address is saved in the structure softc for future use. If it " "will be used very often then calling the resource function each time would " @@ -2929,7 +2928,7 @@ msgstr "" "быть умнее и попытаться обнаружить все возможные порты, например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:677 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:676 #, no-wrap msgid "" " /* table of all possible base I/O port addresses for this device */\n" @@ -2943,12 +2942,10 @@ msgid "" " { 0, 0 } /* end of table */\n" " };\n" msgstr "" -" /* table of all possible base I/O port addresses for this device */" -"\n" +" /* table of all possible base I/O port addresses for this device */\n" " static struct xxx_allports {\n" " u_short port; /* port address */\n" -" short used; /* flag: if this port is already used by some unit " -"*/\n" +" short used; /* flag: if this port is already used by some unit */\n" " } xxx_allports = {\n" " { 0x300, 0 },\n" " { 0x320, 0 },\n" @@ -2957,7 +2954,7 @@ msgstr "" " };\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:681 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:680 #, no-wrap msgid "" " ...\n" @@ -2969,7 +2966,7 @@ msgstr "" " ...\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:687 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:686 #, no-wrap msgid "" " port = bus_get_resource_start(dev, SYS_RES_IOPORT, 0 /*rid*/);\n" @@ -2985,7 +2982,7 @@ msgstr "" " continue;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:695 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:694 #, no-wrap msgid "" " /* found it */\n" @@ -3005,7 +3002,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:700 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:699 #, no-wrap msgid "" " /* we get here only if we need to guess the port */\n" @@ -3019,7 +3016,7 @@ msgstr "" " continue;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:705 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:704 #, no-wrap msgid "" " /* mark as used - even if we find nothing at this port\n" @@ -3033,7 +3030,7 @@ msgstr "" " xxx_allports[i].used = 1;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:712 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:711 #, no-wrap msgid "" " error = xxx_really_probe(dev, xxx_allports[i].port);\n" @@ -3051,7 +3048,7 @@ msgstr "" " return ENXIO;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:715 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:714 msgid "" "Of course, normally the driver's `identify()` routine should be used for " "such things. But there may be one valid reason why it may be better to be " @@ -3071,7 +3068,7 @@ msgstr "" "вызвать их сбой." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:717 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:716 msgid "" "Now, after we got the starting port we need to set the port count (except " "for PnP devices) because the kernel does not have this information in the " @@ -3082,7 +3079,7 @@ msgstr "" "конфигурации ядра эта информация отсутствует." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:725 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:724 #, no-wrap msgid "" " if(pnperror /* only for non-PnP devices */\n" @@ -3096,17 +3093,17 @@ msgstr "" " return ENXIO;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:728 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:727 msgid "" "Finally allocate and activate a piece of port address space (special values " "of start and end mean \"use those we set by ``bus_set_resource()``\"):" msgstr "" -"Наконец, выделите и активируйте часть адресного пространства порта (" -"специальные значения start и end означают \"используйте те, что мы " +"Наконец, выделите и активируйте часть адресного пространства порта " +"(специальные значения start и end означают \"используйте те, что мы " "установили через ``bus_set_resource()``\"):" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:736 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:735 #, no-wrap msgid "" " sc->port0_rid = 0;\n" @@ -3120,7 +3117,7 @@ msgstr "" " /*start*/ 0, /*end*/ ~0, /*count*/ 0, RF_ACTIVE);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:739 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:738 #, no-wrap msgid "" " if(sc->port0_r == NULL)\n" @@ -3130,7 +3127,7 @@ msgstr "" " return ENXIO;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:742 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:741 msgid "" "Now having access to the port-mapped registers we can poke the device in " "some way and check if it reacts like it is expected to. If it does not then " @@ -3142,7 +3139,7 @@ msgstr "" "другое устройство или его там нет вовсе." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:744 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:743 msgid "" "Normally drivers do not set up the interrupt handlers until the attach " "routine. Instead they do probes in the polling mode using the `DELAY()` " @@ -3166,7 +3163,7 @@ msgstr "" "существует некоторая погрешность, зависящая от конкретного процессора." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:746 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:745 msgid "" "If the probe routine really wants to check that the interrupts really work " "it may configure and probe the interrupts too. But that is not recommended." @@ -3176,7 +3173,7 @@ msgstr "" "Однако это не рекомендуется." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:753 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:752 #, no-wrap msgid "" " /* implemented in some very device-specific way */\n" @@ -3185,11 +3182,10 @@ msgid "" msgstr "" " /* implemented in some very device-specific way */\n" " if(error = xxx_probe_ports(sc))\n" -" goto bad; /* will deallocate the resources before returning */" -"\n" +" goto bad; /* will deallocate the resources before returning */\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:756 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:755 msgid "" "The function `xxx_probe_ports()` may also set the device description " "depending on the exact model of device it discovers. But if there is only " @@ -3204,7 +3200,7 @@ msgstr "" "устанавливает описание из таблицы." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:761 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:760 #, no-wrap msgid "" " if(pnperror)\n" @@ -3214,7 +3210,7 @@ msgstr "" " device_set_desc(dev, \"Our device model 1234\");\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:764 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:763 msgid "" "Then the probe routine should either discover the ranges of all the " "resources by reading the device configuration registers or make sure that " @@ -3231,7 +3227,7 @@ msgstr "" "лучше оставить для процедуры присоединения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:766 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:765 msgid "" "The memory address may be specified in the kernel configuration file or on " "some devices it may be pre-configured in non-volatile configuration " @@ -3248,7 +3244,7 @@ msgstr "" "должен иметь приоритет. Пример реализации может выглядеть так:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:774 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:773 #, no-wrap msgid "" " /* try to find out the config address first */\n" @@ -3257,13 +3253,12 @@ msgid "" " sc->mem0_p = xxx_read_mem0_from_device_config(sc);\n" msgstr "" " /* try to find out the config address first */\n" -" sc->mem0_p = bus_get_resource_start(dev, SYS_RES_MEMORY, 0 " -"/*rid*/);\n" +" sc->mem0_p = bus_get_resource_start(dev, SYS_RES_MEMORY, 0 /*rid*/);\n" " if(sc->mem0_p == 0) { /* nope, not specified by user */\n" " sc->mem0_p = xxx_read_mem0_from_device_config(sc);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:782 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:781 #, no-wrap msgid "" " if(sc->mem0_p == 0)\n" @@ -3283,7 +3278,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:794 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:793 #, no-wrap msgid "" " /* just like the port, set the memory size,\n" @@ -3300,23 +3295,18 @@ msgid "" msgstr "" " /* just like the port, set the memory size,\n" " * for some devices the memory size would not be constant\n" -" * but should be read from the device configuration registers " -"instead\n" -" * to accommodate different models of devices. Another option " -"would\n" -" * be to let the user set the memory size as \"msize\" " -"configuration\n" +" * but should be read from the device configuration registers instead\n" +" * to accommodate different models of devices. Another option would\n" +" * be to let the user set the memory size as \"msize\" configuration\n" " * resource which will be automatically handled by the ISA bus.\n" " */\n" " if(pnperror) { /* only for non-PnP devices */\n" -" sc->mem0_size = bus_get_resource_count(dev, SYS_RES_MEMORY, 0 " -"/*rid*/);\n" +" sc->mem0_size = bus_get_resource_count(dev, SYS_RES_MEMORY, 0 /*rid*/);\n" " if(sc->mem0_size == 0) /* not specified by user */\n" -" sc->mem0_size = xxx_read_mem0_size_from_device_config(sc);" -"\n" +" sc->mem0_size = xxx_read_mem0_size_from_device_config(sc);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:803 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:802 #, no-wrap msgid "" " if(sc->mem0_size == 0) {\n" @@ -3330,8 +3320,7 @@ msgid "" msgstr "" " if(sc->mem0_size == 0) {\n" " /* suppose this is a very old model of device without\n" -" * auto-configuration features and the user gave no " -"preference,\n" +" * auto-configuration features and the user gave no preference,\n" " * so assume the minimalistic case\n" " * (of course, the real value will vary with the driver)\n" " */\n" @@ -3339,7 +3328,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:806 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:805 #, no-wrap msgid "" " if(xxx_set_mem0_size_on_device(sc) < 0)\n" @@ -3349,7 +3338,7 @@ msgstr "" " goto bad; /* device does not support that size */\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:813 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:812 #, no-wrap msgid "" " if(bus_set_resource(dev, SYS_RES_MEMORY, /*rid*/0,\n" @@ -3363,24 +3352,23 @@ msgstr "" " sc->mem0_p, sc->mem0_size)<0)\n" " goto bad;\n" " } else {\n" -" sc->mem0_size = bus_get_resource_count(dev, SYS_RES_MEMORY, 0 " -"/*rid*/);\n" +" sc->mem0_size = bus_get_resource_count(dev, SYS_RES_MEMORY, 0 /*rid*/);\n" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:816 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:815 msgid "Resources for IRQ and DRQ are easy to check by analogy." msgstr "Ресурсы для IRQ и DRQ легко проверить по аналогии." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:818 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:817 msgid "If all went well then release all the resources and return success." msgstr "" "Если всё прошло успешно, то освободите все ресурсы и верните успешный статус." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:823 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1086 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:822 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1085 #, no-wrap msgid "" " xxx_free_resources(sc);\n" @@ -3390,7 +3378,7 @@ msgstr "" " return 0;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:826 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:825 msgid "" "Finally, handle the troublesome situations. All the resources should be " "deallocated before returning. We make use of the fact that before the " @@ -3403,14 +3391,14 @@ msgstr "" "выделен какой-либо ресурс: если его дескриптор не равен нулю." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:830 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1047 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:829 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1046 #, no-wrap msgid " bad:\n" msgstr " bad:\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:836 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:835 #, no-wrap msgid "" " xxx_free_resources(sc);\n" @@ -3426,7 +3414,7 @@ msgstr "" " return ENXIO;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:839 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:838 msgid "" "That would be all for the probe routine. Freeing of resources is done from " "multiple places, so it is moved to a function which may look like:" @@ -3435,7 +3423,7 @@ msgstr "" "нескольких мест, поэтому оно вынесено в функцию, которая может выглядеть так:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:847 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:846 #, no-wrap msgid "" "static void\n" @@ -3451,7 +3439,7 @@ msgstr "" " /* check every resource and free if not zero */\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:855 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:854 #, no-wrap msgid "" " /* interrupt handler */\n" @@ -3471,7 +3459,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:870 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:869 #, no-wrap msgid "" " /* all kinds of memory maps we could have allocated */\n" @@ -3494,8 +3482,7 @@ msgstr "" " bus_dmamap_unload(sc->data_tag, sc->data_map);\n" " sc->data_p = 0;\n" " }\n" -" if(sc->data) { /* sc->data_map may be legitimately equal to 0 " -"*/\n" +" if(sc->data) { /* sc->data_map may be legitimately equal to 0 */\n" " /* the map will also be freed */\n" " bus_dmamem_free(sc->data_tag, sc->data, sc->data_map);\n" " sc->data = 0;\n" @@ -3506,13 +3493,13 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:872 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:871 #, no-wrap msgid " ... free other maps and tags if we have them ...\n" msgstr " ... free other maps and tags if we have them ...\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:877 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:876 #, no-wrap msgid "" " if(sc->parent_tag) {\n" @@ -3526,7 +3513,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:891 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:890 #, no-wrap msgid "" " /* release all the bus resources */\n" @@ -3545,28 +3532,26 @@ msgid "" msgstr "" " /* release all the bus resources */\n" " if(sc->mem0_r) {\n" -" bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->mem0_rid," -"\n" +" bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->mem0_rid,\n" " sc->mem0_r);\n" " sc->mem0_r = 0;\n" " }\n" " ...\n" " if(sc->port0_r) {\n" -" bus_release_resource(sc->dev, SYS_RES_IOPORT, " -"sc->port0_rid,\n" +" bus_release_resource(sc->dev, SYS_RES_IOPORT, sc->port0_rid,\n" " sc->port0_r);\n" " sc->port0_r = 0;\n" " }\n" " }\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:894 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:893 #, no-wrap msgid "xxx_isa_attach" msgstr "xxx_isa_attach" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:897 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:896 msgid "" "The attach routine actually connects the driver to the system if the probe " "routine returned success and the system had chosen to attach that driver. If " @@ -3588,7 +3573,7 @@ msgstr "" "никаких из этих предположений." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:899 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:898 msgid "" "The attach routine returns 0 if it completed successfully or error code " "otherwise." @@ -3597,7 +3582,7 @@ msgstr "" "в противном случае." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:901 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:900 msgid "" "The attach routine starts just like the probe routine, with getting some " "frequently used data into more accessible variables." @@ -3606,7 +3591,7 @@ msgstr "" "помещения часто используемых данных в более доступные переменные." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:907 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:906 #, no-wrap msgid "" " struct xxx_softc *sc = device_get_softc(dev);\n" @@ -3618,7 +3603,7 @@ msgstr "" " int error = 0;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:910 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:909 msgid "" "Then allocate and activate all the necessary resources. As normally the port " "range will be released before returning from probe, it has to be allocated " @@ -3635,7 +3620,7 @@ msgstr "" "нужно выделять снова (это будет считаться ошибкой)." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:916 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:915 #, no-wrap msgid "" " sc->port0_rid = 0;\n" @@ -3643,12 +3628,11 @@ msgid "" " /*start*/ 0, /*end*/ ~0, /*count*/ 0, RF_ACTIVE);\n" msgstr "" " sc->port0_rid = 0;\n" -" sc->port0_r = bus_alloc_resource(dev, SYS_RES_IOPORT, " -"&sc->port0_rid,\n" +" sc->port0_r = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->port0_rid,\n" " /*start*/ 0, /*end*/ ~0, /*count*/ 0, RF_ACTIVE);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:919 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:918 #, no-wrap msgid "" " if(sc->port0_r == NULL)\n" @@ -3658,7 +3642,7 @@ msgstr "" " return ENXIO;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:924 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:923 #, no-wrap msgid "" " /* on-board memory */\n" @@ -3668,12 +3652,11 @@ msgid "" msgstr "" " /* on-board memory */\n" " sc->mem0_rid = 0;\n" -" sc->mem0_r = bus_alloc_resource(dev, SYS_RES_MEMORY, " -"&sc->mem0_rid,\n" +" sc->mem0_r = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mem0_rid,\n" " /*start*/ 0, /*end*/ ~0, /*count*/ 0, RF_ACTIVE);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:927 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:926 #, no-wrap msgid "" " if(sc->mem0_r == NULL)\n" @@ -3683,7 +3666,7 @@ msgstr "" " goto bad;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:930 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:929 #, no-wrap msgid "" " /* get its virtual address */\n" @@ -3693,7 +3676,7 @@ msgstr "" " sc->mem0_v = rman_get_virtual(sc->mem0_r);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:933 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:932 msgid "" "The DMA request channel (DRQ) is allocated likewise. To initialize it use " "functions of the `isa_dma*()` family. For example:" @@ -3702,12 +3685,12 @@ msgstr "" "используйте функции семейства `isa_dma*()`. Например:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:935 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:934 msgid "`isa_dmacascade(sc->drq0);`" msgstr "`isa_dmacascade(sc->drq0);`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:937 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:936 msgid "" "The interrupt request line (IRQ) is a bit special. Besides allocation the " "driver's interrupt handler should be associated with it. Historically in the " @@ -3735,7 +3718,7 @@ msgstr "" "часть кода драйвера может быть общей для них." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:944 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:943 #, no-wrap msgid "" " sc->intr_rid = 0;\n" @@ -3743,12 +3726,11 @@ msgid "" " /*start*/ 0, /*end*/ ~0, /*count*/ 0, RF_ACTIVE);\n" msgstr "" " sc->intr_rid = 0;\n" -" sc->intr_r = bus_alloc_resource(dev, SYS_RES_MEMORY, " -"&sc->intr_rid,\n" +" sc->intr_r = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->intr_rid,\n" " /*start*/ 0, /*end*/ ~0, /*count*/ 0, RF_ACTIVE);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:947 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:946 #, no-wrap msgid "" " if(sc->intr_r == NULL)\n" @@ -3758,7 +3740,7 @@ msgstr "" " goto bad;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:956 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:955 #, no-wrap msgid "" " /*\n" @@ -3771,8 +3753,7 @@ msgid "" " goto bad;\n" msgstr "" " /*\n" -" * XXX_INTR_TYPE is supposed to be defined depending on the type " -"of\n" +" * XXX_INTR_TYPE is supposed to be defined depending on the type of\n" " * the driver, for example as INTR_TYPE_CAM for a CAM driver\n" " */\n" " error = bus_setup_intr(dev, sc->intr_r, XXX_INTR_TYPE,\n" @@ -3781,7 +3762,7 @@ msgstr "" " goto bad;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:959 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:958 msgid "" "If the device needs to make DMA to the main memory then this memory should " "be allocated like described before:" @@ -3790,7 +3771,7 @@ msgstr "" "должна быть выделена, как описано ранее:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:971 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:970 #, no-wrap msgid "" " error=bus_dma_tag_create(NULL, /*alignment*/ 4,\n" @@ -3805,8 +3786,7 @@ msgid "" msgstr "" " error=bus_dma_tag_create(NULL, /*alignment*/ 4,\n" " /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR_24BIT,\n" -" /*highaddr*/ BUS_SPACE_MAXADDR, /*filter*/ NULL, /*filterarg*/ " -"NULL,\n" +" /*highaddr*/ BUS_SPACE_MAXADDR, /*filter*/ NULL, /*filterarg*/ NULL,\n" " /*maxsize*/ BUS_SPACE_MAXSIZE_24BIT,\n" " /*nsegments*/ BUS_SPACE_UNRESTRICTED,\n" " /*maxsegsz*/ BUS_SPACE_MAXSIZE_24BIT, /*flags*/ 0,\n" @@ -3815,7 +3795,7 @@ msgstr "" " goto bad;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:988 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:987 #, no-wrap msgid "" " /* many things get inherited from the parent tag\n" @@ -3836,8 +3816,7 @@ msgid "" " goto bad;\n" msgstr "" " /* many things get inherited from the parent tag\n" -" * sc->data is supposed to point to the structure with the shared " -"data,\n" +" * sc->data is supposed to point to the structure with the shared data,\n" " * for example for a ring buffer it could be:\n" " * struct {\n" " * u_short rd_pos;\n" @@ -3854,7 +3833,7 @@ msgstr "" " goto bad;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:993 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:992 #, no-wrap msgid "" " error = bus_dmamem_alloc(sc->data_tag, &sc->data, /* flags*/ 0,\n" @@ -3868,7 +3847,7 @@ msgstr "" " goto bad;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1009 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1008 #, no-wrap msgid "" " /* xxx_alloc_callback() just saves the physical address at\n" @@ -3900,12 +3879,11 @@ msgstr "" " * }\n" " */\n" " bus_dmamap_load(sc->data_tag, sc->data_map, (void *)sc->data,\n" -" sizeof (* sc->data), xxx_alloc_callback, (void *) &sc->data_p," -"\n" +" sizeof (* sc->data), xxx_alloc_callback, (void *) &sc->data_p,\n" " /*flags*/0);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1012 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1011 msgid "" "After all the necessary resources are allocated the device should be " "initialized. The initialization may include testing that all the expected " @@ -3916,7 +3894,7 @@ msgstr "" "всех ожидаемых функций." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1017 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1016 #, no-wrap msgid "" " if(xxx_initialize(sc) < 0)\n" @@ -3926,7 +3904,7 @@ msgstr "" " goto bad;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1020 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1019 msgid "" "The bus subsystem will automatically print on the console the device " "description set by probe. But if the driver wants to print some extra " @@ -3937,15 +3915,13 @@ msgstr "" "дополнительную информацию об устройстве, он может это сделать, например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1025 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1024 #, no-wrap msgid " device_printf(dev, \"has on-card FIFO buffer of %d bytes\\n\", sc->fifosize);\n" -msgstr "" -" device_printf(dev, \"has on-card FIFO buffer of %d bytes\\n" -"\", sc->fifosize);\n" +msgstr " device_printf(dev, \"has on-card FIFO buffer of %d bytes\\n\", sc->fifosize);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1028 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1027 msgid "" "If the initialization routine experiences any problems then printing " "messages about them before returning error is also recommended." @@ -3954,7 +3930,7 @@ msgstr "" "рекомендуется выводить сообщения об этих проблемах перед возвратом ошибки." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1030 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1029 msgid "" "The final step of the attach routine is attaching the device to its " "functional subsystem in the kernel. The exact way to do it depends on the " @@ -3967,12 +3943,12 @@ msgstr "" "устройство шины CAM SCSI и так далее." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1032 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1031 msgid "If all went well then return success." msgstr "Если всё прошло успешно, вернуть успех." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1038 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1037 #, no-wrap msgid "" " error = xxx_attach_subsystem(sc);\n" @@ -3984,13 +3960,13 @@ msgstr "" " goto bad;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1040 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1039 #, no-wrap msgid " return 0;\n" msgstr " return 0;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1043 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1042 msgid "" "Finally, handle the troublesome situations. All the resources should be " "deallocated before returning an error. We make use of the fact that before " @@ -4003,7 +3979,7 @@ msgstr "" "выделен какой-либо ресурс: если его дескриптор ненулевой." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1053 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1052 #, no-wrap msgid "" " xxx_free_resources(sc);\n" @@ -4019,18 +3995,18 @@ msgstr "" " return ENXIO;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1056 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1055 msgid "That would be all for the attach routine." msgstr "Вот и всё для процедуры присоединения." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1058 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1057 #, no-wrap msgid "xxx_isa_detach" msgstr "xxx_isa_detach" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1061 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1060 msgid "" "If this function is present in the driver and the driver is compiled as a " "loadable module then the driver gets the ability to be unloaded. This is an " @@ -4063,7 +4039,7 @@ msgstr "" "менее, процедура отсоединения может быть предоставлена для полноты." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1063 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1062 msgid "" "The detach routine returns 0 if the driver was successfully detached or the " "error code otherwise." @@ -4072,7 +4048,7 @@ msgstr "" "или код ошибки в противном случае." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1065 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1064 msgid "" "The logic of detach is a mirror of the attach. The first thing to do is to " "detach the driver from its kernel subsystem. If the device is currently open " @@ -4091,7 +4067,7 @@ msgstr "" "правило, принудительное закрытие кажется предпочтительным вариантом." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1070 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1069 #, no-wrap msgid "" " struct xxx_softc *sc = device_get_softc(dev);\n" @@ -4101,7 +4077,7 @@ msgstr "" " int error;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1074 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1073 #, no-wrap msgid "" " error = xxx_detach_subsystem(sc);\n" @@ -4113,7 +4089,7 @@ msgstr "" " return error;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1077 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1076 msgid "" "Next the driver may want to reset the hardware to some consistent state. " "That includes stopping any ongoing transfers, disabling the DMA channels and " @@ -4128,23 +4104,23 @@ msgstr "" "поэтому, если она присутствует в драйвере, мы можем просто вызвать её." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1079 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1078 msgid "`xxx_isa_shutdown(dev);`" msgstr "`xxx_isa_shutdown(dev);`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1081 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1080 msgid "And finally release all the resources and return success." msgstr "И наконец освободить все ресурсы и вернуть успех." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1089 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1088 #, no-wrap msgid "xxx_isa_shutdown" msgstr "xxx_isa_shutdown" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1092 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1091 msgid "" "This routine is called when the system is about to be shut down. It is " "expected to bring the hardware to some consistent state. For most of the ISA " @@ -4171,13 +4147,13 @@ msgstr "" "подробно." #. type: Title == -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1094 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1093 #, no-wrap msgid "xxx_intr" msgstr "xxx_intr" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1097 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1096 msgid "" "The interrupt handler is called when an interrupt is received which may be " "from this particular device. The ISA bus does not support interrupt sharing " @@ -4195,7 +4171,7 @@ msgstr "" "сгенерировано его устройством. Если нет, он должен просто вернуть управление." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1099 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1098 msgid "" "The old convention for the ISA drivers was getting the device unit number as " "an argument. This is obsolete, and the new drivers receive whatever argument " @@ -4210,7 +4186,7 @@ msgstr "" "структуру softc. Таким образом, обработчик прерываний обычно начинается так:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1106 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1105 #, no-wrap msgid "" " static void\n" @@ -4222,7 +4198,7 @@ msgstr "" " {\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1109 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1108 msgid "" "It runs at the interrupt priority level specified by the interrupt type " "parameter of `bus_setup_intr()`. That means that all the other interrupts of " @@ -4233,12 +4209,12 @@ msgstr "" "того же типа, а также все программные прерывания, отключены." #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1111 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1110 msgid "To avoid races it is commonly written as a loop:" msgstr "Во избежание гонок это обычно записывается в виде цикла:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1119 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1118 #, no-wrap msgid "" " while(xxx_interrupt_pending(sc)) {\n" @@ -4252,7 +4228,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1121 +#: documentation/content/en/books/arch-handbook/isa/_index.adoc:1120 msgid "" "The interrupt handler has to acknowledge interrupt to the device only but " "not to the interrupt controller, the system takes care of the latter." diff --git a/documentation/content/ru/books/arch-handbook/jail/_index.adoc b/documentation/content/ru/books/arch-handbook/jail/_index.adoc index 2ea11895fb..f4d3796a67 100644 --- a/documentation/content/ru/books/arch-handbook/jail/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/jail/_index.adoc @@ -113,7 +113,7 @@ j.ip_number = ntohl(in.s_addr); ==== Процесс в клетке -Наконец, пользовательская программа помещает процесс в `клетку`. Теперь `клетка` становится самим заключенным процессом и выполняет команду, используя man:execv[3]. +Наконец, пользовательская программа помещает процесс в `клетку`. Теперь `клетка` становится самим заключённым процессом и выполняет команду, используя man:execv[3]. [.programlisting] .... diff --git a/documentation/content/ru/books/arch-handbook/jail/_index.po b/documentation/content/ru/books/arch-handbook/jail/_index.po index 7a249aa6a1..2a333e1f89 100644 --- a/documentation/content/ru/books/arch-handbook/jail/_index.po +++ b/documentation/content/ru/books/arch-handbook/jail/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2026-04-05 04:45+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbookjail_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Title = @@ -32,7 +32,7 @@ msgid "Chapter 4. The Jail Subsystem" msgstr "Глава 4. Подсистема клеток" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:52 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:51 msgid "" "On most UNIX(R) systems, `root` has omnipotent power. This promotes " "insecurity. If an attacker gained `root` on a system, he would have every " @@ -58,7 +58,7 @@ msgstr "" "какой-либо ущерб основной системе." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:54 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:53 msgid "" "Jail is becoming the new security model. People are running potentially " "vulnerable servers such as Apache, BIND, and sendmail within jails, so that " @@ -76,13 +76,13 @@ msgstr "" "Руководства FreeBSD, jails-synopsis]." #. type: Title == -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:56 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:55 #, no-wrap msgid "Architecture" msgstr "Архитектура" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:59 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:58 msgid "" "Jail consists of two realms: the userland program, man:jail[8], and the code " "implemented within the kernel: the man:jail[2] system call and associated " @@ -95,13 +95,13 @@ msgstr "" "`клетка` реализована в ядре." #. type: Title === -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:60 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:59 #, no-wrap msgid "Userland Code" msgstr "Код в пользовательском пространстве" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:63 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:62 msgid "" "The source for the userland jail is located in [.filename]#/usr/src/usr.sbin/" "jail#, consisting of one file, [.filename]#jail.c#. The program takes these " @@ -114,13 +114,13 @@ msgstr "" "команду для выполнения." #. type: Title ==== -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:64 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:63 #, no-wrap msgid "Data Structures" msgstr "Структуры данных" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:67 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:66 msgid "" "In [.filename]#jail.c#, the first thing I would note is the declaration of " "an important structure `struct jail j;` which was included from [.filename]#/" @@ -131,18 +131,18 @@ msgstr "" "filename]#/usr/include/sys/jail.h#." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:69 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:68 msgid "The definition of the `jail` structure is:" msgstr "Определение структуры `jail` выглядит следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:73 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:72 #, no-wrap msgid "/usr/include/sys/jail.h:\n" msgstr "/usr/include/sys/jail.h:\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:80 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:79 #, no-wrap msgid "" "struct jail {\n" @@ -160,7 +160,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:83 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:82 msgid "" "As you can see, there is an entry for each of the arguments passed to the " "man:jail[8] program, and indeed, they are set during its execution." @@ -169,7 +169,7 @@ msgstr "" "man:jail[8], и действительно, они устанавливаются во время её выполнения." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:97 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:96 #, no-wrap msgid "" "/usr/src/usr.sbin/jail/jail.c\n" @@ -197,13 +197,13 @@ msgstr "" "j.hostname = argv[1];\n" #. type: Title ==== -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:99 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:98 #, no-wrap msgid "Networking" msgstr "Сетевое взаимодействие" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:102 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:101 msgid "" "One of the arguments passed to the man:jail[8] program is an IP address with " "which the jail can be accessed over the network. man:jail[8] translates the " @@ -216,7 +216,7 @@ msgstr "" "`jail`)." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:111 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:110 #, no-wrap msgid "" "/usr/src/usr.sbin/jail/jail.c:\n" @@ -234,7 +234,7 @@ msgstr "" "j.ip_number = ntohl(in.s_addr);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:114 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:113 msgid "" "The man:inet_aton[3] function \"interprets the specified character string as " "an Internet address, placing the address into the structure provided.\" The " @@ -249,24 +249,24 @@ msgstr "" "порядок байтов хоста с помощью man:ntohl[3]." #. type: Title ==== -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:115 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:114 #, no-wrap msgid "Jailing the Process" msgstr "Процесс в клетке" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:118 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:117 msgid "" "Finally, the userland program jails the process. Jail now becomes an " "imprisoned process itself and then executes the command given using man:" "execv[3]." msgstr "" "Наконец, пользовательская программа помещает процесс в `клетку`. Теперь " -"`клетка` становится самим заключенным процессом и выполняет команду, " +"`клетка` становится самим заключённым процессом и выполняет команду, " "используя man:execv[3]." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:126 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:125 #, no-wrap msgid "" "/usr/src/usr.sbin/jail/jail.c\n" @@ -282,7 +282,7 @@ msgstr "" " err(1, \"execv: %s\", argv[3]);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:129 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:128 msgid "" "As you can see, the `jail()` function is called, and its argument is the " "`jail` structure which has been filled with the arguments given to the " @@ -295,13 +295,13 @@ msgstr "" "в ядре." #. type: Title === -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:130 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:129 #, no-wrap msgid "Kernel Space" msgstr "Пространство ядра системы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:133 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:132 msgid "" "We will now be looking at the file [.filename]#/usr/src/sys/kern/kern_jail." "c#. This is the file where the man:jail[2] system call, appropriate sysctls, " @@ -312,19 +312,19 @@ msgstr "" "сетевые функции." #. type: Title ==== -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:134 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:133 #, no-wrap msgid "Sysctls" msgstr "Управляемые переменные ядра sysctl" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:137 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:136 msgid "In [.filename]#kern_jail.c#, the following sysctls are defined:" msgstr "" "В файле [.filename]#kern_jail.c# определены следующие параметры sysctl:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:145 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:144 #, no-wrap msgid "" "/usr/src/sys/kern/kern_jail.c:\n" @@ -340,7 +340,7 @@ msgstr "" " \"Processes in jail can set their hostnames\");\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:150 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:149 #, no-wrap msgid "" "int jail_socket_unixiproute_only = 1;\n" @@ -354,7 +354,7 @@ msgstr "" " \"Processes in jail are limited to creating UNIX/IPv4/route sockets only\");\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:155 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:154 #, no-wrap msgid "" "int jail_sysvipc_allowed = 0;\n" @@ -368,7 +368,7 @@ msgstr "" " \"Processes in jail can use System V IPC primitives\");\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:160 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:159 #, no-wrap msgid "" "static int jail_enforce_statfs = 2;\n" @@ -382,7 +382,7 @@ msgstr "" " \"Processes in jail cannot see all mounted file systems\");\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:165 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:164 #, no-wrap msgid "" "int jail_allow_raw_sockets = 0;\n" @@ -396,7 +396,7 @@ msgstr "" " \"Prison root can create raw sockets\");\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:170 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:169 #, no-wrap msgid "" "int jail_chflags_allowed = 0;\n" @@ -410,7 +410,7 @@ msgstr "" " \"Processes in jail can alter system file flags\");\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:175 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:174 #, no-wrap msgid "" "int jail_mount_allowed = 0;\n" @@ -424,7 +424,7 @@ msgstr "" " \"Processes in jail can mount/unmount jail-friendly file systems\");\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:178 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:177 msgid "" "Each of these sysctls can be accessed by the user through the man:sysctl[8] " "program. Throughout the kernel, these specific sysctls are recognized by " @@ -437,13 +437,13 @@ msgstr "" "set_hostname_allowed`." #. type: Title ==== -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:179 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:178 #, no-wrap msgid "man:jail[2] System Call" msgstr "Системный вызов man:jail[2]" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:182 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:181 msgid "" "Like all system calls, the man:jail[2] system call takes two arguments, " "`struct thread *td` and `struct jail_args *uap`. `td` is a pointer to the " @@ -463,7 +463,7 @@ msgstr "" "качестве собственного аргумента." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:193 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:192 #, no-wrap msgid "" "/usr/src/sys/kern/kern_jail.c:\n" @@ -485,7 +485,7 @@ msgstr "" "jail(struct thread *td, struct jail_args *uap)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:196 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:195 msgid "" "Therefore, `uap->jail` can be used to access the `jail` structure which was " "passed to the system call. Next, the system call copies the `jail` structure " @@ -505,7 +505,7 @@ msgstr "" "`клетка` — `j`." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:201 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:200 #, no-wrap msgid "" "/usr/src/sys/kern/kern_jail.c:\n" @@ -515,7 +515,7 @@ msgstr "" "error = copyin(uap->jail, &j, sizeof(j));\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:204 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:203 msgid "" "There is another important structure defined in [.filename]#jail.h#. It is " "the `prison` structure. The `prison` structure is used exclusively within " @@ -526,7 +526,7 @@ msgstr "" "определение структуры `prison`." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:222 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:221 #, no-wrap msgid "" "/usr/include/sys/jail.h:\n" @@ -562,7 +562,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:225 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:224 msgid "" "The man:jail[2] system call then allocates memory for a `prison` structure " "and copies data between the `jail` and `prison` structure." @@ -571,7 +571,7 @@ msgstr "" "копирует данные между структурой `клетка` и структурой `prison`." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:239 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:238 #, no-wrap msgid "" "/usr/src/sys/kern/kern_jail.c:\n" @@ -599,7 +599,7 @@ msgstr "" "pr->pr_ip = j.ip_number;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:242 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:241 msgid "" "Next, we will discuss another important system call man:jail_attach[2], " "which implements the function to put a process into the jail." @@ -608,7 +608,7 @@ msgstr "" "который реализует функцию помещения процесса в клетку." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:253 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:252 #, no-wrap msgid "" "/usr/src/sys/kern/kern_jail.c:\n" @@ -630,7 +630,7 @@ msgstr "" "jail_attach(struct thread *td, struct jail_attach_args *uap)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:256 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:255 msgid "" "This system call makes the changes that can distinguish a jailed process " "from those unjailed ones. To understand what man:jail_attach[2] does for us, " @@ -641,7 +641,7 @@ msgstr "" "необходима некоторая справочная информация." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:258 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:257 msgid "" "On FreeBSD, each kernel visible thread is identified by its `thread` " "structure, while the processes are described by their `proc` structures. You " @@ -670,7 +670,7 @@ msgstr "" "(`cr_prison`)." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:278 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:277 #, no-wrap msgid "" "/usr/include/sys/proc.h:\n" @@ -710,7 +710,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:281 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:280 msgid "" "In [.filename]#kern_jail.c#, the function `jail()` then calls function " "`jail_attach()` with a given `jid`. And `jail_attach()` calls function " @@ -736,14 +736,14 @@ msgstr "" "в клетке. Когда в ядре вызывается функция `jailed()` с вновь созданной " "структурой `ucred` в качестве аргумента, она возвращает 1, указывая, что " "учётные данные связаны с клеткой. Общим родительским процессом для всех " -"процессов, созданных внутри клетки, является процесс, запускающий man:jail[8]" -", так как он вызывает системный вызов man:jail[2]. При выполнении программы " -"через man:execve[2] она наследует свойство клетки из структуры `ucred` " -"родительского процесса, следовательно, у неё структура `ucred` тоже со " -"свойством клетки." +"процессов, созданных внутри клетки, является процесс, запускающий man:" +"jail[8], так как он вызывает системный вызов man:jail[2]. При выполнении " +"программы через man:execve[2] она наследует свойство клетки из структуры " +"`ucred` родительского процесса, следовательно, у неё структура `ucred` тоже " +"со свойством клетки." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:296 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:295 #, no-wrap msgid "" "/usr/src/sys/kern/kern_jail.c\n" @@ -773,7 +773,7 @@ msgstr "" "}\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:314 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:313 #, no-wrap msgid "" "int\n" @@ -813,21 +813,21 @@ msgstr "" "}\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:317 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:316 msgid "" "When a process is forked from its parent process, the man:fork[2] system " "call uses `crhold()` to maintain the credential for the newly forked " "process. It inherently keep the newly forked child's credential consistent " "with its parent, so the child process is also jailed." msgstr "" -"Когда процесс создаётся из родительского процесса, системный вызов " -"man:fork[2] использует `crhold()` для поддержания учётных данных нового " +"Когда процесс создаётся из родительского процесса, системный вызов man:" +"fork[2] использует `crhold()` для поддержания учётных данных нового " "процесса. Это автоматически сохраняет учётные данные нового дочернего " "процесса согласованными с родительским, поэтому дочерний процесс также " "остаётся в клетке." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:324 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:323 #, no-wrap msgid "" "/usr/src/sys/kern/kern_fork.c:\n" @@ -841,13 +841,13 @@ msgstr "" "td2->td_ucred = crhold(p2->p_ucred);\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:327 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:326 #, no-wrap msgid "Restrictions" msgstr "Ограничения" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:330 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:329 msgid "" "Throughout the kernel there are access restrictions relating to jailed " "processes. Usually, these restrictions only check whether the process is " @@ -858,7 +858,7 @@ msgstr "" "если да, возвращают ошибку. Например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:335 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:334 #, no-wrap msgid "" "if (jailed(td->td_ucred))\n" @@ -868,13 +868,13 @@ msgstr "" " return (EPERM);\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:337 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:336 #, no-wrap msgid "SysV IPC" msgstr "SysV IPC" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:340 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:339 msgid "" "System V IPC is based on messages. Processes can send each other these " "messages which tell them how to act. The functions which deal with messages " @@ -899,12 +899,12 @@ msgstr "" "сообщение состоит только из номера сигнала." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:342 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:341 msgid "[.filename]#/usr/src/sys/kern/sysv_msg.c#:" msgstr "[.filename]#/usr/src/sys/kern/sysv_msg.c#:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:344 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:343 msgid "" "`msgget(key, msgflg)`: `msgget` returns (and possibly creates) a message " "descriptor that designates a message queue for use in other functions." @@ -914,7 +914,7 @@ msgstr "" "функциях." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:345 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:344 msgid "" "`msgctl(msgid, cmd, buf)`: Using this function, a process can query the " "status of a message descriptor." @@ -923,14 +923,14 @@ msgstr "" "статус дескриптора сообщения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:346 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:345 msgid "" "`msgsnd(msgid, msgp, msgsz, msgflg)`: `msgsnd` sends a message to a process." msgstr "" "`msgsnd(msgid, msgp, msgsz, msgflg)`: `msgsnd` отправляет сообщение процессу." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:347 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:346 msgid "" "`msgrcv(msgid, msgp, msgsz, msgtyp, msgflg)`: a process receives messages " "using this function" @@ -939,7 +939,7 @@ msgstr "" "помощью этой функции" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:349 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:348 msgid "" "In each of the system calls corresponding to these functions, there is this " "conditional:" @@ -948,7 +948,7 @@ msgstr "" "следующее условие:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:355 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:354 #, no-wrap msgid "" "/usr/src/sys/kern/sysv_msg.c:\n" @@ -960,7 +960,7 @@ msgstr "" " return (ENOSYS);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:358 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:357 msgid "" "Semaphore system calls allow processes to synchronize execution by doing a " "set of operations atomically on a set of semaphores. Basically semaphores " @@ -978,12 +978,12 @@ msgstr "" "semctl[2] и man:semop[2]." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:360 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:359 msgid "[.filename]#/usr/src/sys/kern/sysv_sem.c#:" msgstr "[.filename]#/usr/src/sys/kern/sysv_sem.c#:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:362 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:361 msgid "" "`semctl(semid, semnum, cmd, ...)`: `semctl` does the specified `cmd` on the " "semaphore queue indicated by `semid`." @@ -992,7 +992,7 @@ msgstr "" "`cmd` для очереди семафоров, указанной в `semid`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:363 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:362 msgid "" "`semget(key, nsems, flag)`: `semget` creates an array of semaphores, " "corresponding to `key`." @@ -1001,12 +1001,12 @@ msgstr "" "соответствующих `key`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:365 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:364 msgid "`key and flag take on the same meaning as they do in msgget.`" msgstr "`key и flag имеют то же значение, как и в msgget.`" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:366 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:365 msgid "" "`semop(semid, array, nops)`: `semop` performs a group of operations " "indicated by `array`, to the set of semaphores identified by `semid`." @@ -1015,7 +1015,7 @@ msgstr "" "`array`, для набора семафоров, идентифицируемых `semid`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:368 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:367 msgid "" "System V IPC allows for processes to share memory. Processes can communicate " "directly with each other by sharing parts of their virtual address space and " @@ -1030,12 +1030,12 @@ msgstr "" "man:shmat[2], man:shmctl[2] и man:shmget[2]." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:370 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:369 msgid "[.filename]#/usr/src/sys/kern/sysv_shm.c#:" msgstr "[.filename]#/usr/src/sys/kern/sysv_shm.c#:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:372 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:371 msgid "" "`shmctl(shmid, cmd, buf)`: `shmctl` does various control operations on the " "shared memory region identified by `shmid`." @@ -1044,7 +1044,7 @@ msgstr "" "над областью разделяемой памяти, идентифицируемой `shmid`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:373 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:372 msgid "" "`shmget(key, size, flag)`: `shmget` accesses or creates a shared memory " "region of `size` bytes." @@ -1053,7 +1053,7 @@ msgstr "" "новую область разделяемой памяти размером `size` байт." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:374 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:373 msgid "" "`shmat(shmid, addr, flag)`: `shmat` attaches a shared memory region " "identified by `shmid` to the address space of a process." @@ -1062,7 +1062,7 @@ msgstr "" "идентифицируемую `shmid`, к адресному пространству процесса." #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:375 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:374 msgid "" "`shmdt(addr)`: `shmdt` detaches the shared memory region previously attached " "at `addr`." @@ -1071,13 +1071,13 @@ msgstr "" "памяти по адресу `addr`." #. type: Title === -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:376 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:375 #, no-wrap msgid "Sockets" msgstr "Сокеты" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:379 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:378 msgid "" "Jail treats the man:socket[2] system call and related lower-level socket " "functions in a special manner. In order to determine whether a certain " @@ -1094,7 +1094,7 @@ msgstr "" "`PF_ROUTE`. В противном случае возвращается ошибка." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:397 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:396 #, no-wrap msgid "" "/usr/src/sys/kern/uipc_socket.c:\n" @@ -1130,13 +1130,13 @@ msgstr "" "}\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:399 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:398 #, no-wrap msgid "Berkeley Packet Filter" msgstr "Berkeley Packet Filter" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:402 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:401 msgid "" "The Berkeley Packet Filter provides a raw interface to data link layers in a " "protocol independent fashion. BPF is now controlled by the man:devfs[8] " @@ -1148,13 +1148,13 @@ msgstr "" "использования в клетке." #. type: Title === -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:403 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:402 #, no-wrap msgid "Protocols" msgstr "Протоколы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:406 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:405 msgid "" "There are certain protocols which are very common, such as TCP, UDP, IP and " "ICMP. IP and ICMP are on the same level: the network layer 2. There are " @@ -1184,7 +1184,7 @@ msgstr "" "вызывающий процесс." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:443 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:442 #, no-wrap msgid "" "/usr/src/sys/netinet/in_pcb.c:\n" @@ -1258,7 +1258,7 @@ msgstr "" "}\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:446 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:445 msgid "" "You might be wondering what function `prison_ip()` does. `prison_ip()` is " "given three arguments, a pointer to the credential(represented by `cred`), " @@ -1268,14 +1268,14 @@ msgid "" "that address." msgstr "" "Вы можете задаться вопросом, какую функцию выполняет `prison_ip()`. " -"`prison_ip()` принимает три аргумента: указатель на учётные данные (" -"представленные как `cred`), любые флаги и IP-адрес. Она возвращает 1, если " +"`prison_ip()` принимает три аргумента: указатель на учётные данные " +"(представленные как `cred`), любые флаги и IP-адрес. Она возвращает 1, если " "IP-адрес НЕ принадлежит клетке, и 0 в противном случае. Как видно из кода, " "если это действительно IP-адрес, не принадлежащий клетке, протоколу не " "разрешается привязываться к этому адресу." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:454 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:453 #, no-wrap msgid "" "/usr/src/sys/kern/kern_jail.c:\n" @@ -1291,7 +1291,7 @@ msgstr "" " u_int32_t tmp;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:479 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:478 #, no-wrap msgid "" " if (!jailed(cred))\n" @@ -1345,13 +1345,13 @@ msgstr "" "}\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:481 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:480 #, no-wrap msgid "Filesystem" msgstr "Файловая система" #. type: Plain text -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:484 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:483 msgid "" "Even `root` users within the jail are not allowed to unset or modify any " "file flags, such as immutable, append-only, and undeleteable flags, if the " @@ -1362,7 +1362,7 @@ msgstr "" "неудаляемый, если уровень безопасности (`securelevel`) больше 0." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/jail/_index.adoc:529 +#: documentation/content/en/books/arch-handbook/jail/_index.adoc:528 #, no-wrap msgid "" "/usr/src/sys/ufs/ufs/ufs_vnops.c:\n" diff --git a/documentation/content/ru/books/arch-handbook/kobj/_index.adoc b/documentation/content/ru/books/arch-handbook/kobj/_index.adoc index 0cbabba46e..e0ae53eb42 100644 --- a/documentation/content/ru/books/arch-handbook/kobj/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/kobj/_index.adoc @@ -126,7 +126,7 @@ KOBJMETHOD(NAME, FUNC) Включение директивы `#include` и всего, что следует за ней, копируется дословно в начало сгенерированного файла с кодом. -Например: +Для примера: [.programlisting] .... @@ -135,7 +135,7 @@ KOBJMETHOD(NAME, FUNC) Ключевое слово `INTERFACE` используется для определения имени интерфейса. Это имя объединяется с каждым именем метода в формате [имя интерфейса]_[имя метода]. Его синтаксис: `INTERFACE [имя интерфейса];`. -Например: +Для примера: [.programlisting] .... @@ -144,7 +144,7 @@ INTERFACE foo; Ключевое слово `CODE` копирует свои аргументы дословно в файл кода. Его синтаксис: `CODE { [что угодно] };` -Например: +Для примера: [.programlisting] .... @@ -158,7 +158,7 @@ CODE { Ключевое слово `HEADER` копирует свои аргументы в заголовочный файл без изменений. Его синтаксис: `HEADER { [что угодно] };` -Например: +Для примера: [.programlisting] .... @@ -170,7 +170,7 @@ HEADER { Ключевое слово `METHOD` описывает метод. Его синтаксис: `METHOD [возвращаемый тип] [имя метода] { [объект [, аргументы]] };` -Например: +Для примера: [.programlisting] .... @@ -183,7 +183,7 @@ METHOD int bar { Ключевое слово `DEFAULT` может следовать за ключевым словом `METHOD`. Оно расширяет ключевое слово `METHOD`, включая функцию по умолчанию для метода. Расширенный синтаксис выглядит так: `METHOD [тип возвращаемого значения] [имя метода] { [объект; [другие аргументы]] } DEFAULT [функция по умолчанию];` -Например: +Для примера: [.programlisting] .... @@ -210,7 +210,7 @@ src/sys/kern/device_if.m Второй шаг в использовании Kobj — это создание класса. Класс состоит из имени, таблицы методов и размера объектов, если используются средства обработки объектов Kobj. Для создания класса используйте макрос `DEFINE_CLASS()`. Чтобы создать таблицу методов, создайте массив элементов kobj_method_t, завершающийся записью NULL. Каждую не-NULL запись можно создать с помощью макроса `KOBJMETHOD()`. -Например: +Для примера: [.programlisting] .... diff --git a/documentation/content/ru/books/arch-handbook/kobj/_index.po b/documentation/content/ru/books/arch-handbook/kobj/_index.po index 16e7975549..b60614f169 100644 --- a/documentation/content/ru/books/arch-handbook/kobj/_index.po +++ b/documentation/content/ru/books/arch-handbook/kobj/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" -"PO-Revision-Date: 2026-04-05 04:45+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-08-08 08:11+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbookkobj_index/ru/>\n" @@ -32,7 +32,7 @@ msgid "Chapter 3. Kernel Objects" msgstr "Глава 3. Объекты ядра" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:54 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:53 msgid "" "Kernel Objects, or _Kobj_ provides an object-oriented C programming system " "for the kernel. As such the data being operated on carries the description " @@ -46,63 +46,63 @@ msgstr "" "выполнения без нарушения бинарной совместимости." #. type: Title == -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:56 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:55 #, no-wrap msgid "Terminology" msgstr "Терминология" #. type: Labeled list -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:58 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:57 #, no-wrap msgid "Object" msgstr "Объект" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:60 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:59 msgid "A set of data - data structure - data allocation." msgstr "Набор данных - структура данных - аллокация данных." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:61 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:60 #, no-wrap msgid "Method" msgstr "Метод" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:63 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:62 msgid "An operation - function." msgstr "Операция — функция." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:64 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:63 #, no-wrap msgid "Class" msgstr "Класс" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:66 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:65 msgid "One or more methods." msgstr "Один или несколько методов." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:67 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:66 #, no-wrap msgid "Interface" msgstr "Интерфейс" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:69 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:68 msgid "A standard set of one or more methods." msgstr "Стандартный набор из одного или нескольких методов." #. type: Title == -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:71 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:70 #, no-wrap msgid "Kobj Operation" msgstr "Как работает Kobj" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:76 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:75 msgid "" "Kobj works by generating descriptions of methods. Each description holds a " "unique id as well as a default function. The description's address is used " @@ -113,7 +113,7 @@ msgstr "" "используется для однозначной идентификации метода в таблице методов класса." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:85 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:84 msgid "" "A class is built by creating a method table associating one or more " "functions with method descriptions. Before use the class is compiled. The " @@ -145,42 +145,42 @@ msgstr "" "метода." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:87 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:86 msgid "These indirections can be visualized as the following:" msgstr "Эти перенаправления можно визуализировать следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:91 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:90 #, no-wrap msgid "object->cache<->class\n" msgstr "object->cache<->class\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:94 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:93 #, no-wrap msgid "Using Kobj" msgstr "Использование Kobj" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:96 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:95 #, no-wrap msgid "Structures" msgstr "Структуры" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:101 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:100 #, no-wrap msgid "struct kobj_method\n" msgstr "struct kobj_method\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:103 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:102 #, no-wrap msgid "Functions" msgstr "Функции" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:113 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:112 #, no-wrap msgid "" "void kobj_class_compile(kobj_class_t cls);\n" @@ -193,19 +193,18 @@ msgstr "" "void kobj_class_compile(kobj_class_t cls);\n" "void kobj_class_compile_static(kobj_class_t cls, kobj_ops_t ops);\n" "void kobj_class_free(kobj_class_t cls);\n" -"kobj_t kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags);" -"\n" +"kobj_t kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags);\n" "void kobj_init(kobj_t obj, kobj_class_t cls);\n" "void kobj_delete(kobj_t obj, struct malloc_type *mtype);\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:115 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:114 #, no-wrap msgid "Macros" msgstr "Макросы" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:123 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:122 #, no-wrap msgid "" "KOBJ_CLASS_FIELDS\n" @@ -219,13 +218,13 @@ msgstr "" "KOBJMETHOD(NAME, FUNC)\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:125 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:124 #, no-wrap msgid "Headers" msgstr "Заголовки" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:131 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:130 #, no-wrap msgid "" "<sys/param.h>\n" @@ -235,13 +234,13 @@ msgstr "" "<sys/kobj.h>\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:133 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:132 #, no-wrap msgid "Creating an Interface Template" msgstr "Создание шаблона интерфейса" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:137 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:136 msgid "" "The first step in using Kobj is to create an Interface. Creating the " "interface involves creating a template that the script [.filename]#src/sys/" @@ -254,17 +253,18 @@ msgstr "" "и кода объявлений методов и функций поиска методов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:139 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:138 msgid "" "Within this template the following keywords are used: `#include`, " "`INTERFACE`, `CODE`, `EPILOG`, `HEADER`, `METHOD`, `PROLOG`, `STATICMETHOD`, " "and `DEFAULT`." msgstr "" -"В этом шаблоне используются следующие ключевые слова: `#include`, `INTERFACE`" -", `CODE`, `EPILOG`, `HEADER`, `METHOD`, `PROLOG`, `STATICMETHOD` и `DEFAULT`." +"В этом шаблоне используются следующие ключевые слова: `#include`, " +"`INTERFACE`, `CODE`, `EPILOG`, `HEADER`, `METHOD`, `PROLOG`, `STATICMETHOD` " +"и `DEFAULT`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:141 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:140 msgid "" "The `#include` statement and what follows it is copied verbatim to the head " "of the generated code file." @@ -273,24 +273,24 @@ msgstr "" "дословно в начало сгенерированного файла с кодом." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:143 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:154 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:164 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:179 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:192 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:207 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:241 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:142 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:153 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:163 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:178 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:191 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:206 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:240 msgid "For example:" -msgstr "Например:" +msgstr "Для примера:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:147 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:146 #, no-wrap msgid "#include <sys/foo.h>\n" msgstr "#include <sys/foo.h>\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:152 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:151 msgid "" "The `INTERFACE` keyword is used to define the interface name. This name is " "concatenated with each method name as [interface name]_[method name]. Its " @@ -301,13 +301,13 @@ msgstr "" "метода]. Его синтаксис: `INTERFACE [имя интерфейса];`." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:158 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:157 #, no-wrap msgid "INTERFACE foo;\n" msgstr "INTERFACE foo;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:162 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:161 msgid "" "The `CODE` keyword copies its arguments verbatim into the code file. Its " "syntax is `CODE { [whatever] };`" @@ -316,7 +316,7 @@ msgstr "" "синтаксис: `CODE { [что угодно] };`" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:173 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:172 #, no-wrap msgid "" "CODE {\n" @@ -334,7 +334,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:177 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:176 msgid "" "The `HEADER` keyword copies its arguments verbatim into the header file. " "Its syntax is `HEADER { [whatever] };`" @@ -343,7 +343,7 @@ msgstr "" "изменений. Его синтаксис: `HEADER { [что угодно] };`" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:186 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:185 #, no-wrap msgid "" "HEADER {\n" @@ -357,16 +357,16 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:190 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:189 msgid "" "The `METHOD` keyword describes a method. Its syntax is `METHOD [return " "type] [method name] { [object [, arguments]] };`" msgstr "" -"Ключевое слово `METHOD` описывает метод. Его синтаксис: `METHOD [" -"возвращаемый тип] [имя метода] { [объект [, аргументы]] };`" +"Ключевое слово `METHOD` описывает метод. Его синтаксис: `METHOD " +"[возвращаемый тип] [имя метода] { [объект [, аргументы]] };`" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:200 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:199 #, no-wrap msgid "" "METHOD int bar {\n" @@ -382,7 +382,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:205 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:204 msgid "" "The `DEFAULT` keyword may follow the `METHOD` keyword. It extends the " "`METHOD` key word to include the default function for method. The extended " @@ -391,11 +391,12 @@ msgid "" msgstr "" "Ключевое слово `DEFAULT` может следовать за ключевым словом `METHOD`. Оно " "расширяет ключевое слово `METHOD`, включая функцию по умолчанию для метода. " -"Расширенный синтаксис выглядит так: `METHOD [тип возвращаемого значения] [" -"имя метода] { [объект; [другие аргументы]] } DEFAULT [функция по умолчанию];`" +"Расширенный синтаксис выглядит так: `METHOD [тип возвращаемого значения] " +"[имя метода] { [объект; [другие аргументы]] } DEFAULT [функция по умолчанию];" +"`" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:215 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:214 #, no-wrap msgid "" "METHOD int bar {\n" @@ -411,7 +412,7 @@ msgstr "" "} DEFAULT foo_hack;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:220 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:219 msgid "" "The `STATICMETHOD` keyword is used like the `METHOD` keyword except the kobj " "data is not at the head of the object structure so casting to kobj_t would " @@ -427,7 +428,7 @@ msgstr "" "класса." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:223 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:222 msgid "" "The `PROLOG` and `EPILOG` keywords sets inserts code immediately before or " "directly after the `METHOD` they are attached to. This feature is used " @@ -440,12 +441,12 @@ msgstr "" "информацию другим способом." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:225 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:224 msgid "Other complete examples:" msgstr "Другие полные примеры:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:230 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:229 #, no-wrap msgid "" "src/sys/kern/bus_if.m\n" @@ -455,13 +456,13 @@ msgstr "" "src/sys/kern/device_if.m\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:232 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:231 #, no-wrap msgid "Creating a Class" msgstr "Создание класса" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:239 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:238 msgid "" "The second step in using Kobj is to create a class. A class consists of a " "name, a table of methods, and the size of objects if Kobj's object handling " @@ -478,13 +479,13 @@ msgstr "" "создать с помощью макроса `KOBJMETHOD()`." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:245 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:244 #, no-wrap msgid "DEFINE_CLASS(fooclass, foomethods, sizeof(struct foodata));\n" msgstr "DEFINE_CLASS(fooclass, foomethods, sizeof(struct foodata));\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:251 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:250 #, no-wrap msgid "" "kobj_method_t foomethods[] = {\n" @@ -500,7 +501,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:256 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:255 msgid "" "The class must be \"compiled\". Depending on the state of the system at the " "time that the class is to be initialized a statically allocated cache, \"ops " @@ -510,18 +511,18 @@ msgid "" msgstr "" "Класс должен быть \"скомпилирован\". В зависимости от состояния системы на " "момент инициализации класса, необходимо использовать статически выделенный " -"кэш, \"таблицу операций\". Это может быть достигнуто путем объявления `" -"struct kobj_ops` и использования `kobj_class_compile_static();` в противном " +"кэш, \"таблицу операций\". Это может быть достигнуто путем объявления " +"`struct kobj_ops` и использования `kobj_class_compile_static();` в противном " "случае следует использовать `kobj_class_compile()`." #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:257 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:256 #, no-wrap msgid "Creating an Object" msgstr "Создание объекта" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:263 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:262 msgid "" "The third step in using Kobj involves how to define the object. Kobj object " "creation routines assume that Kobj data is at the head of an object. If " @@ -535,23 +536,24 @@ msgstr "" "создания объекта Kobj предполагают, что данные Kobj находятся в начале " "объекта. Если это не подходит, вам придется самостоятельно выделить память " "для объекта, а затем использовать `kobj_init()` для части объекта, " -"относящейся к Kobj; в противном случае вы можете использовать `kobj_create()`" -" для автоматического выделения и инициализации части объекта, относящейся к " -"Kobj. `kobj_init()` также может использоваться для изменения класса, " -"который использует объект." +"относящейся к Kobj; в противном случае вы можете использовать " +"`kobj_create()` для автоматического выделения и инициализации части объекта, " +"относящейся к Kobj. `kobj_init()` также может использоваться для изменения " +"класса, который использует объект." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:265 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:264 msgid "To integrate Kobj into the object you should use the macro KOBJ_FIELDS." -msgstr "Для интеграции Kobj в объект следует использовать макрос `KOBJ_FIELDS`." +msgstr "" +"Для интеграции Kobj в объект следует использовать макрос `KOBJ_FIELDS`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:267 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:266 msgid "For example" msgstr "Например" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:275 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:274 #, no-wrap msgid "" "struct foo_data {\n" @@ -567,13 +569,13 @@ msgstr "" "};\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:277 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:276 #, no-wrap msgid "Calling Methods" msgstr "Вызов методов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:282 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:281 msgid "" "The last step in using Kobj is to simply use the generated functions to use " "the desired method within the object's class. This is as simple as using " @@ -588,7 +590,7 @@ msgstr "" "использованием символа '_' между ними, все в верхнем регистре." #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:284 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:283 msgid "" "For example, if the interface name was foo and the method was bar then the " "call would be:" @@ -597,19 +599,19 @@ msgstr "" "выглядеть следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:288 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:287 #, no-wrap msgid "[return value = ] FOO_BAR(object [, other parameters]);\n" msgstr "[return value = ] FOO_BAR(object [, other parameters]);\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:290 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:289 #, no-wrap msgid "Cleaning Up" msgstr "Очистка" #. type: Plain text -#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:292 +#: documentation/content/en/books/arch-handbook/kobj/_index.adoc:291 msgid "" "When an object allocated through `kobj_create()` is no longer needed " "`kobj_delete()` may be called on it, and when a class is no longer being " diff --git a/documentation/content/ru/books/arch-handbook/newbus/_index.adoc b/documentation/content/ru/books/arch-handbook/newbus/_index.adoc index 7d82e305f6..c65754b6cc 100644 --- a/documentation/content/ru/books/arch-handbook/newbus/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/newbus/_index.adoc @@ -97,7 +97,7 @@ _Newbus_ — это реализация новой архитектуры ши Устройство в контексте Newbus представляет собой отдельную аппаратную сущность в системе. Например, каждое PCI-устройство представлено устройством Newbus. Любое устройство в системе может иметь дочерние устройства; устройство, у которого есть дочерние устройства, часто называют _"шиной"_. Примерами распространённых шин в системе являются ISA и PCI, которые управляют списками устройств, подключённых к шинам ISA и PCI соответственно. -Часто соединение между различными типами шин представлено устройством _"мост"_, которое обычно имеет один дочерний элемент для подключенной шины. Примером этого является _PCI-to-PCI мост_, который представлен устройством _[.filename]#pcibN#_ на родительской PCI-шине и имеет дочерний элемент _[.filename]#pciN#_ для подключенной шины. Такая структура упрощает реализацию дерева PCI-шин, позволяя использовать общий код как для верхнеуровневых, так и для соединенных через мост шин. +Часто соединение между различными типами шин представлено устройством _"мост"_, которое обычно имеет один дочерний элемент для подключённой шины. Примером этого является _PCI-to-PCI мост_, который представлен устройством _[.filename]#pcibN#_ на родительской PCI-шине и имеет дочерний элемент _[.filename]#pciN#_ для подключённой шины. Такая структура упрощает реализацию дерева PCI-шин, позволяя использовать общий код как для верхнеуровневых, так и для соединенных через мост шин. Каждое устройство в архитектуре Newbus запрашивает у своего родителя отображение своих ресурсов. Затем родитель запрашивает у своего собственного родителя, пока запрос не достигнет nexus. Таким образом, по сути, nexus - это единственная часть системы Newbus, которая знает обо всех ресурсах. diff --git a/documentation/content/ru/books/arch-handbook/newbus/_index.po b/documentation/content/ru/books/arch-handbook/newbus/_index.po index 5de7be37bd..3f4c54c01e 100644 --- a/documentation/content/ru/books/arch-handbook/newbus/_index.po +++ b/documentation/content/ru/books/arch-handbook/newbus/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" -"PO-Revision-Date: 2026-04-05 04:45+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbooknewbus_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Title = @@ -32,7 +32,7 @@ msgid "Chapter 14. Newbus" msgstr "Глава 14. Newbus" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:57 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:56 msgid "" "_Special thanks to Matthew N. Dodd, Warner Losh, Bill Paul, Doug Rabson, " "Mike Smith, Peter Wemm and Scott Long_." @@ -41,24 +41,24 @@ msgstr "" "Рэбсону, Майку Смиту, Питеру Вемму и Скотту Лонгу_." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:59 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:58 msgid "This chapter explains the Newbus device framework in detail." msgstr "Эта глава подробно объясняет фреймворк устройств Newbus." #. type: Title == -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:61 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:60 #, no-wrap msgid "Device Drivers" msgstr "Драйверы устройств" #. type: Title === -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:63 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:62 #, no-wrap msgid "Purpose of a Device Driver" msgstr "Назначение драйвера устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:66 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:65 msgid "" "A device driver is a software component which provides the interface between " "the kernel's generic view of a peripheral (e.g., disk, network adapter) and " @@ -67,19 +67,19 @@ msgid "" "component." msgstr "" "Драйвер устройства — это программный компонент, который предоставляет " -"интерфейс между обобщённым представлением периферийного устройства (" -"например, диска, сетевого адаптера) в ядре и его фактической реализацией. " +"интерфейс между обобщённым представлением периферийного устройства " +"(например, диска, сетевого адаптера) в ядре и его фактической реализацией. " "_Интерфейс драйвера устройства (DDI)_ — это определённый интерфейс между " "ядром и компонентом драйвера устройства." #. type: Title === -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:67 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:66 #, no-wrap msgid "Types of Device Drivers" msgstr "Типы драйверов устройств" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:70 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:69 msgid "" "There used to be days in UNIX(R), and thus FreeBSD, in which there were four " "types of devices defined:" @@ -88,27 +88,27 @@ msgstr "" "четыре типа устройств:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:72 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:71 msgid "block device drivers" msgstr "драйверы блочных устройств" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:73 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:72 msgid "character device drivers" msgstr "драйверы символьных устройств" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:74 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:73 msgid "network device drivers" msgstr "драйверы сетевых устройств" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:75 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:74 msgid "pseudo-device drivers" msgstr "драйверы псевдоустройств" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:77 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:76 msgid "" "_Block devices_ performed in a way that used fixed size blocks [of data]. " "This type of driver depended on the so-called _buffer cache_, which had " @@ -126,13 +126,13 @@ msgstr "" "тем самым оптимизируя запись." #. type: Title === -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:78 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:77 #, no-wrap msgid "Character Devices" msgstr "Символьные устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:81 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:80 msgid "" "However, in the versions of FreeBSD 4.0 and onward the distinction between " "block and character devices became non-existent." @@ -141,13 +141,13 @@ msgstr "" "устройствами перестало существовать." #. type: Title == -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:83 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:82 #, no-wrap msgid "Overview of Newbus" msgstr "Обзор Newbus" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:86 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:85 msgid "" "_Newbus_ is the implementation of a new bus architecture based on " "abstraction layers which saw its introduction in FreeBSD 3.0 when the Alpha " @@ -165,27 +165,27 @@ msgstr "" "_операционной системе_." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:88 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:87 msgid "Its main features include amongst others:" msgstr "Основные функции включают, среди прочего:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:90 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:89 msgid "dynamic attaching" msgstr "динамическое присоединение" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:91 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:90 msgid "easy modularization of drivers" msgstr "простая модуляризация драйверов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:92 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:91 msgid "pseudo-busses" msgstr "псевдо-шины" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:94 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:93 msgid "" "One of the most prominent changes is the migration from the flat and ad-hoc " "system to a device tree layout." @@ -194,7 +194,7 @@ msgstr "" "нерегламентированной системы к структуре дерева устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:96 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:95 msgid "" "At the top level resides the _\"root\"_ device which is the parent to hang " "all other devices on. For each architecture, there is typically a single " @@ -213,7 +213,7 @@ msgstr "" "аппаратным наборам микросхем, включая _lca_, _apecs_, _cia_ и _tsunami_." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:98 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:97 msgid "" "A device in the Newbus context represents a single hardware entity in the " "system. For instance each PCI device is represented by a Newbus device. Any " @@ -229,26 +229,26 @@ msgstr "" "управляют списками устройств, подключённых к шинам ISA и PCI соответственно." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:100 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:99 msgid "" -"Often, a connection between different kinds of bus is represented by a " -"_\"bridge\"_ device, which normally has one child for the attached bus. An " -"example of this is a _PCI-to-PCI bridge_ which is represented by a device " -"_[.filename]#pcibN#_ on the parent PCI bus and has a child " -"_[.filename]#pciN#_ for the attached bus. This layout simplifies the " -"implementation of the PCI bus tree, allowing common code to be used for both " -"top-level and bridged busses." +"Often, a connection between different kinds of bus is represented by a _" +"\"bridge\"_ device, which normally has one child for the attached bus. An " +"example of this is a _PCI-to-PCI bridge_ which is represented by a device _[." +"filename]#pcibN#_ on the parent PCI bus and has a child _[.filename]#pciN#_ " +"for the attached bus. This layout simplifies the implementation of the PCI " +"bus tree, allowing common code to be used for both top-level and bridged " +"busses." msgstr "" "Часто соединение между различными типами шин представлено устройством _\"мост" -"\"_, которое обычно имеет один дочерний элемент для подключенной шины. " -"Примером этого является _PCI-to-PCI мост_, который представлен устройством _[" -".filename]#pcibN#_ на родительской PCI-шине и имеет дочерний элемент _[." -"filename]#pciN#_ для подключенной шины. Такая структура упрощает реализацию " +"\"_, которое обычно имеет один дочерний элемент для подключённой шины. " +"Примером этого является _PCI-to-PCI мост_, который представлен устройством " +"_[.filename]#pcibN#_ на родительской PCI-шине и имеет дочерний элемент _[." +"filename]#pciN#_ для подключённой шины. Такая структура упрощает реализацию " "дерева PCI-шин, позволяя использовать общий код как для верхнеуровневых, так " "и для соединенных через мост шин." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:102 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:101 msgid "" "Each device in the Newbus architecture asks its parent to map its resources. " "The parent then asks its own parent until the nexus is reached. So, " @@ -261,7 +261,7 @@ msgstr "" "это единственная часть системы Newbus, которая знает обо всех ресурсах." #. type: delimited block = 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:106 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:105 msgid "" "An ISA device might want to map its IO port at `0x230`, so it asks its " "parent, in this case the ISA bus. The ISA bus hands it over to the PCI-to-" @@ -281,7 +281,7 @@ msgstr "" "MIPS с помощью моста PCI." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:109 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:108 msgid "" "Resource allocation can be controlled at any place in the device tree. For " "instance on many Alpha platforms, ISA interrupts are managed separately from " @@ -301,7 +301,7 @@ msgstr "" "или tsunami)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:111 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:110 msgid "" "In order to normalize access to memory and port mapped resources, Newbus " "integrates the `bus_space` APIs from NetBSD. These provide a single API to " @@ -313,11 +313,11 @@ msgstr "" "Newbus интегрирует API `bus_space` из NetBSD. Они предоставляют единый API " "для замены inb/outb и прямых операций чтения/записи в память. Преимущество " "этого подхода в том, что один драйвер может легко использовать либо " -"регистры, отображённые в память, либо регистры, отображённые на порты (" -"некоторое оборудование поддерживает оба варианта)." +"регистры, отображённые в память, либо регистры, отображённые на порты " +"(некоторое оборудование поддерживает оба варианта)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:113 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:112 msgid "" "This support is integrated into the resource allocation mechanism. When a " "resource is allocated, a driver can retrieve the associated " @@ -328,7 +328,7 @@ msgstr "" "`bus_space_handle_t` из этого ресурса." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:115 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:114 msgid "" "Newbus also allows for definitions of interface methods in files dedicated " "to this purpose. These are the [.filename]#.m# files that are found under " @@ -339,7 +339,7 @@ msgstr "" "которые находятся в иерархии [.filename]#src/sys#." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:117 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:116 msgid "" "The core of the Newbus system is an extensible \"object-based programming\" " "model. Each device in the system has a table of methods which it supports. " @@ -357,7 +357,7 @@ msgstr "" "устройством." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:119 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:118 msgid "" "In the Newbus system, the methods for a device are provided by the various " "device drivers in the system. When a device is attached to a driver during " @@ -374,37 +374,37 @@ msgstr "" "драйверы, что может быть полезно для разработки драйверов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:121 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:120 msgid "" "The interfaces are described by an interface definition language similar to " "the language used to define vnode operations for file systems. The interface " -"would be stored in a methods file (which would normally be named " -"[.filename]#foo_if.m#)." +"would be stored in a methods file (which would normally be named [." +"filename]#foo_if.m#)." msgstr "" "Интерфейсы описываются языком определения интерфейсов, похожим на язык, " "используемый для определения операций vnode для файловых систем. Интерфейс " "хранится в файле методов (который обычно называется [.filename]#foo_if.m#)." #. type: Block title -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:122 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:121 #, no-wrap msgid "Newbus Methods" msgstr "Методы Newbus" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:128 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:127 #, no-wrap msgid " # Foo subsystem/driver (a comment...)\n" msgstr " # Foo subsystem/driver (a comment...)\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:130 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:129 #, no-wrap msgid "\t INTERFACE foo\n" msgstr "\t INTERFACE foo\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:134 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:133 #, no-wrap msgid "" "\tMETHOD int doit {\n" @@ -416,7 +416,7 @@ msgstr "" "\t};\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:137 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:136 #, no-wrap msgid "" "\t# DEFAULT is the method that will be used, if a method was not\n" @@ -426,7 +426,7 @@ msgstr "" "\t# provided via: DEVMETHOD()\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:142 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:141 #, no-wrap msgid "" "\tMETHOD void doit_to_child {\n" @@ -440,16 +440,16 @@ msgstr "" "\t} DEFAULT doit_generic_to_child;\n" #. type: delimited block = 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:146 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:145 msgid "" -"When this interface is compiled, it generates a header file " -"\"[.filename]#foo_if.h#\" which contains function declarations:" +"When this interface is compiled, it generates a header file \"[." +"filename]#foo_if.h#\" which contains function declarations:" msgstr "" "Когда этот интерфейс компилируется, он генерирует заголовочный файл \"[." "filename]#foo_if.h#\", который содержит объявления функций:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:151 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:150 #, no-wrap msgid "" " int FOO_DOIT(device_t dev);\n" @@ -459,7 +459,7 @@ msgstr "" " int FOO_DOIT_TO_CHILD(device_t dev, device_t child);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:154 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:153 msgid "" "A source file, \"[.filename]#foo_if.c#\" is also created to accompany the " "automatically generated header file; it contains implementations of those " @@ -472,43 +472,43 @@ msgstr "" "объекта и вызывают эту функцию." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:156 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:155 msgid "" "The system defines two main interfaces. The first fundamental interface is " "called _\"device\"_ and includes methods which are relevant to all devices. " -"Methods in the _\"device\"_ interface include _\"probe\"_, _\"attach\"_ and " -"_\"detach\"_ to control detection of hardware and _\"shutdown\"_, " -"_\"suspend\"_ and _\"resume\"_ for critical event notification." +"Methods in the _\"device\"_ interface include _\"probe\"_, _\"attach\"_ and _" +"\"detach\"_ to control detection of hardware and _\"shutdown\"_, _\"suspend" +"\"_ and _\"resume\"_ for critical event notification." msgstr "" "Система определяет два основных интерфейса. Первый фундаментальный интерфейс " "называется _\"device\"_ (устройство) и включает методы, которые относятся ко " "всем устройствам. Методы в интерфейсе _\"device\"_ включают _\"probe\"_ " "(обнаружение), _\"attach\"_ (присоединение) и _\"detach\"_ (отсоединение) " -"для управления обнаружением оборудования, а также _\"shutdown\"_ (выключение)" -", _\"suspend\"_ (приостановка) и _\"resume\"_ (возобновление) для " -"уведомления о критических событиях." +"для управления обнаружением оборудования, а также _\"shutdown\"_ " +"(выключение), _\"suspend\"_ (приостановка) и _\"resume\"_ (возобновление) " +"для уведомления о критических событиях." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:158 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:157 msgid "" "The second, more complex interface is _\"bus\"_. This interface contains " "methods suitable for devices which have children, including methods to " -"access bus specific per-device information footnote:" -"[man:bus_generic_read_ivar[9] and man:bus_generic_write_ivar[9]], event " +"access bus specific per-device information footnote:[man:" +"bus_generic_read_ivar[9] and man:bus_generic_write_ivar[9]], event " "notification (`_child_detached_`, `_driver_added_`) and resource management " "(`_alloc_resource_`, `_activate_resource_`, `_deactivate_resource_`, " "`_release_resource_`)." msgstr "" "Второй, более сложный интерфейс — _\"bus\"_. Этот интерфейс содержит методы, " "подходящие для устройств, имеющих дочерние элементы, включая методы доступа " -"к специфичной для шины информации об устройстве " -"footnote:[man:bus_generic_read_ivar[9] и man:bus_generic_write_ivar[9]], " -"уведомления о событиях (`_child_detached_`, `_driver_added_`) и управление " -"ресурсами (`_alloc_resource_`, `_activate_resource_`, `_deactivate_resource_`" -", `_release_resource_`)." +"к специфичной для шины информации об устройстве footnote:[man:" +"bus_generic_read_ivar[9] и man:bus_generic_write_ivar[9]], уведомления о " +"событиях (`_child_detached_`, `_driver_added_`) и управление ресурсами " +"(`_alloc_resource_`, `_activate_resource_`, `_deactivate_resource_`, " +"`_release_resource_`)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:160 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:159 msgid "" "Many methods in the \"bus\" interface are performing services for some child " "of the bus device. These methods would normally use the first two arguments " @@ -525,11 +525,11 @@ msgstr "" "запрашивающего сервис. Для упрощения кода драйвера многие из этих методов " "имеют вспомогательные функции, которые находят родительское устройство и " "вызывают метод у родителя. Например, метод `BUS_TEARDOWN_INTR(device_t dev, " -"device_t child, ...)` может быть вызван с помощью функции `bus_teardown_intr(" -"device_t child, ...)`." +"device_t child, ...)` может быть вызван с помощью функции " +"`bus_teardown_intr(device_t child, ...)`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:162 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:161 msgid "" "Some bus types in the system define additional interfaces to provide access " "to bus-specific functionality. For instance, the PCI bus driver defines the " @@ -543,13 +543,13 @@ msgstr "" "устройства PCI." #. type: Title == -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:164 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:163 #, no-wrap msgid "Newbus API" msgstr "Newbus API" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:167 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:166 msgid "" "As the Newbus API is huge, this section makes some effort at documenting it. " "More information to come in the next revision of this document." @@ -559,13 +559,13 @@ msgstr "" "версии этого документа." #. type: Title === -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:168 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:167 #, no-wrap msgid "Important Locations in the Source Hierarchy" msgstr "Важные места в иерархии исходного кода" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:171 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:170 msgid "" "[.filename]#src/sys/[arch]/[arch]# - Kernel code for a specific machine " "architecture resides in this directory. For example, the `i386` " @@ -576,7 +576,7 @@ msgstr "" "архитектура `SPARC64`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:173 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:172 msgid "" "[.filename]#src/sys/dev/[bus]# - device support for a specific `[bus]` " "resides in this directory." @@ -585,7 +585,7 @@ msgstr "" "находится в этом каталоге." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:175 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:174 msgid "" "[.filename]#src/sys/dev/pci# - PCI bus support code resides in this " "directory." @@ -594,7 +594,7 @@ msgstr "" "каталоге." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:177 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:176 msgid "" "[.filename]#src/sys/[isa|pci]# - PCI/ISA device drivers reside in this " "directory. The PCI/ISA bus support code used to exist in this directory in " @@ -605,39 +605,39 @@ msgstr "" "FreeBSD версии `4.0`." #. type: Title === -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:178 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:177 #, no-wrap msgid "Important Structures and Type Definitions" msgstr "Важные структуры и определения типов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:181 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:180 msgid "" "`devclass_t` - This is a type definition of a pointer to a `struct devclass`." msgstr "`devclass_t` - Это определение типа указателя на `struct devclass`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:183 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:182 msgid "" "`device_method_t` - This is the same as `kobj_method_t` (see [.filename]#src/" "sys/kobj.h#)." msgstr "" -"`device_method_t` - Это то же самое, что и `kobj_method_t` (см. [.filename]#" -"src/sys/kobj.h#)." +"`device_method_t` - Это то же самое, что и `kobj_method_t` (см. [." +"filename]#src/sys/kobj.h#)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:185 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:184 msgid "" "`device_t` - This is a type definition of a pointer to a `struct device`. " -"`device_t` represents a device in the system. It is a kernel object. See " -"[.filename]#src/sys/sys/bus_private.h# for implementation details." +"`device_t` represents a device in the system. It is a kernel object. See [." +"filename]#src/sys/sys/bus_private.h# for implementation details." msgstr "" "`device_t` - Это определение типа указателя на структуру `struct device`. " "`device_t` представляет устройство в системе. Это объект ядра. Подробности " "реализации см. в [.filename]#src/sys/sys/bus_private.h#." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:187 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:186 msgid "" "`driver_t` - This is a type definition which references `struct driver`. The " "`driver` struct is a class of the `device` kernel object; it also holds data " @@ -648,13 +648,13 @@ msgstr "" "содержит данные, приватные для драйвера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:189 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:188 #, no-wrap msgid "*_driver_t_ Implementation*\n" msgstr "* Реализация _driver_t_*\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:195 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:194 #, no-wrap msgid "" "\t struct driver {\n" @@ -668,7 +668,7 @@ msgstr "" "\t };\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:198 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:197 msgid "" "A `device_state_t` type, which is an enumeration, `device_state`. It " "contains the possible states of a Newbus device before and after the " @@ -679,13 +679,13 @@ msgstr "" "автонастройки." #. type: Plain text -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:200 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:199 #, no-wrap msgid "*Device States _device_state_t*\n" msgstr "*Состояния устройств _device_state_t*\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:211 +#: documentation/content/en/books/arch-handbook/newbus/_index.adoc:210 #, no-wrap msgid "" "\t /*\n" diff --git a/documentation/content/ru/books/arch-handbook/pccard/_index.adoc b/documentation/content/ru/books/arch-handbook/pccard/_index.adoc index 57f3239010..a82ec09803 100644 --- a/documentation/content/ru/books/arch-handbook/pccard/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/pccard/_index.adoc @@ -70,7 +70,7 @@ PC Cards идентифицируются одним из двух способ [[pccard-pccarddevs]] === Формат файла [.filename]#pccarddevs# -В файле [.filename]#pccarddevs# есть четыре раздела. Первый раздел содержит номера производителей для вендоров, которые их используют. Этот раздел отсортирован в числовом порядке. Следующий раздел включает все продукты, используемые этими вендорами, вместе с их идентификаторами продуктов и строкой описания. Строка описания обычно не используется (вместо этого мы устанавливаем описание устройства на основе читаемого CIS, даже если совпадение найдено по числовому идентификатору). Затем эти два раздела повторяются для устройств, использующих метод строкового сопоставления. Наконец, C-подобные комментарии, заключенные между символами `/*` и `*/`, допускаются в любом месте файла. +В файле [.filename]#pccarddevs# есть четыре раздела. Первый раздел содержит номера производителей для вендоров, которые их используют. Этот раздел отсортирован в числовом порядке. Следующий раздел включает все продукты, используемые этими вендорами, вместе с их идентификаторами продуктов и строкой описания. Строка описания обычно не используется (вместо этого мы устанавливаем описание устройства на основе читаемого CIS, даже если совпадение найдено по числовому идентификатору). Затем эти два раздела повторяются для устройств, использующих метод строкового сопоставления. Наконец, C-подобные комментарии, заключённые между символами `/*` и `*/`, допускаются в любом месте файла. Первая часть файла содержит идентификаторы производителей. Пожалуйста, сохраняйте этот список в числовом порядке. Также, пожалуйста, согласовывайте изменения в этом файле, так как мы делимся им с NetBSD для создания общего центра обработки этой информации. Например, вот первые несколько идентификаторов производителей: diff --git a/documentation/content/ru/books/arch-handbook/pccard/_index.po b/documentation/content/ru/books/arch-handbook/pccard/_index.po index 1f7946dee5..608a10d535 100644 --- a/documentation/content/ru/books/arch-handbook/pccard/_index.po +++ b/documentation/content/ru/books/arch-handbook/pccard/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" -"PO-Revision-Date: 2026-03-05 04:45+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbookpccard_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Title = @@ -32,7 +32,7 @@ msgid "Chapter 16. PC Card" msgstr "Глава 16. PC Card" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:52 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:51 msgid "" "This chapter will talk about the FreeBSD mechanisms for writing a device " "driver for a PC Card or CardBus device. However, at present it just " @@ -43,13 +43,13 @@ msgstr "" "документирует, как добавить новое устройство к существующему драйверу pccard." #. type: Title == -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:54 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:53 #, no-wrap msgid "Adding a Device" msgstr "Добавление устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:57 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:56 msgid "" "Device drivers know what devices they support. There is a table of supported " "devices in the kernel that drivers use to attach to a device." @@ -59,13 +59,13 @@ msgstr "" "подключения к устройству." #. type: Title === -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:59 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:58 #, no-wrap msgid "Overview" msgstr "Обзор" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:62 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:61 msgid "" "PC Cards are identified in one of two ways, both based on the _Card " "Information Structure_ (CIS) stored on the card. The first method is to use " @@ -83,7 +83,7 @@ msgstr "" "устройства с его драйвером." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:64 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:63 msgid "" "Original equipment manufacturers (OEMs) often develop a reference design for " "a PC Card product, then sell this design to other companies to market. Those " @@ -105,7 +105,7 @@ msgstr "" "продукта без изменений." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:66 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:65 msgid "" "Due to this practice, FreeBSD drivers usually rely on numeric IDs for device " "identification. Using numeric IDs and a centralized database complicates " @@ -130,7 +130,7 @@ msgstr "" "и продукта." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:68 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:67 msgid "" "The PC Card bus code keeps a central database of card information, but not " "which driver is associated with them, in [.filename]#/sys/dev/pccard/" @@ -144,7 +144,7 @@ msgstr "" "устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:70 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:69 msgid "" "Finally, some really low end devices do not contain manufacturer " "identification at all. These devices must be detected by matching the human " @@ -165,13 +165,13 @@ msgstr "" "новых устройств предпочтительнее использовать числовой метод." #. type: Title === -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:72 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:71 #, no-wrap msgid "Format of [.filename]#pccarddevs#" msgstr "Формат файла [.filename]#pccarddevs#" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:75 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:74 msgid "" "There are four sections in the [.filename]#pccarddevs# files. The first " "section lists the manufacturer numbers for vendors that use them. This " @@ -192,11 +192,11 @@ msgstr "" "устанавливаем описание устройства на основе читаемого CIS, даже если " "совпадение найдено по числовому идентификатору). Затем эти два раздела " "повторяются для устройств, использующих метод строкового сопоставления. " -"Наконец, C-подобные комментарии, заключенные между символами `/*` и `*/`, " +"Наконец, C-подобные комментарии, заключённые между символами `/*` и `*/`, " "допускаются в любом месте файла." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:77 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:76 msgid "" "The first section of the file contains the vendor IDs. Please keep this list " "sorted in numeric order. Also, please coordinate changes to this file " @@ -210,7 +210,7 @@ msgstr "" "идентификаторов производителей:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:84 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:83 #, no-wrap msgid "" "vendor FUJITSU\t\t\t0x0004 Fujitsu Corporation\n" @@ -224,7 +224,7 @@ msgstr "" "vendor SANDISK\t\t\t0x0045\tSandisk Corporation\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:87 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:86 msgid "" "Chances are very good that the `NETGEAR_2` entry is really an OEM that " "NETGEAR purchased cards from and the author of support for those cards was " @@ -249,14 +249,14 @@ msgstr "" "драйверов, поэтому оно должно быть коротким и допустимым идентификатором в " "C. Числовой идентификатор в шестнадцатеричном формате указывает " "производителя. Не добавляйте идентификаторы вида `0xffffffff` или `0xffff`, " -"так как они зарезервированы (первый означает \"идентификатор не установлен\"" -", а второй иногда встречается в крайне некачественных картах для указания " +"так как они зарезервированы (первый означает \"идентификатор не установлен" +"\", а второй иногда встречается в крайне некачественных картах для указания " "\"отсутствует\"). Наконец, следует строковое описание компании, производящей " "карту. Эта строка в FreeBSD ни для чего не используется, кроме как в " "комментариях." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:89 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:88 msgid "" "The second section of the file contains the products. As shown in this " "example, the format is similar to the vendor lines:" @@ -265,7 +265,7 @@ msgstr "" "аналогичен строкам поставщиков:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:94 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:93 #, no-wrap msgid "" "/* Allied Telesis K.K. */\n" @@ -275,7 +275,7 @@ msgstr "" "product ALLIEDTELESIS LA_PCM\t0x0002 Allied Telesis LA-PCM\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:97 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:96 #, no-wrap msgid "" "/* Archos */\n" @@ -285,7 +285,7 @@ msgstr "" "product\tARCHOS ARC_ATAPI\t0x0043 MiniCD\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:100 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:99 msgid "" "The `product` keyword is followed by the vendor name, repeated from above. " "This is followed by the product name, which is used by the driver and should " @@ -313,7 +313,7 @@ msgstr "" "комментарий в C, а между записями — пустая строка." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:102 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:101 msgid "" "The third section is like the previous vendor section, but with all of the " "manufacturer numeric IDs set to `-1`, meaning \"match anything found\" in " @@ -328,7 +328,7 @@ msgstr "" "разделу файла." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:104 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:103 msgid "" "The final section contains the entries for those cards that must be " "identified by string entries. This section's format is a little different " @@ -339,19 +339,17 @@ msgstr "" "отличается от общего раздела:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:109 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:108 #, no-wrap msgid "" "product ADDTRON AWP100\t\t{ \"Addtron\", \"AWP-100&spWireless&spPCMCIA\", \"Version&sp01.02\", NULL }\n" "product ALLIEDTELESIS WR211PCM\t{ \"Allied&spTelesis&spK.K.\", \"WR211PCM\", NULL, NULL } Allied Telesis WR211PCM\n" msgstr "" -"product ADDTRON AWP100\t\t{ \"Addtron\", \"AWP-100&spWireless&spPCMCIA\", " -"\"Version&sp01.02\", NULL }\n" -"product ALLIEDTELESIS WR211PCM\t{ \"Allied&spTelesis&spK.K.\", \"WR211PCM\", " -"NULL, NULL } Allied Telesis WR211PCM\n" +"product ADDTRON AWP100\t\t{ \"Addtron\", \"AWP-100&spWireless&spPCMCIA\", \"Version&sp01.02\", NULL }\n" +"product ALLIEDTELESIS WR211PCM\t{ \"Allied&spTelesis&spK.K.\", \"WR211PCM\", NULL, NULL } Allied Telesis WR211PCM\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:112 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:111 msgid "" "The familiar `product` keyword is followed by the vendor name and the card " "name, just as in the second section of the file. Here the format deviates " @@ -390,13 +388,13 @@ msgstr "" "использование регулярных выражений для сопоставления недоступно." #. type: Title === -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:114 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:113 #, no-wrap msgid "Sample Probe Routine" msgstr "Пример процедуры обнаружения" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:117 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:116 msgid "" "To understand how to add a device to the list of supported devices, one must " "understand the probe and/or match routines that many drivers have. It is " @@ -405,13 +403,13 @@ msgid "" "idealized version will be presented here." msgstr "" "Чтобы понять, как добавить устройство в список поддерживаемых, необходимо " -"разобраться в процедурах `probe` (обнаружение) и/или `match` (сопоставление)" -", которые есть во многих драйверах. В FreeBSD 5.x это немного сложнее из-за " -"наличия слоя совместимости с OLDCARD. Поскольку различия лишь косметические, " -"здесь будет представлена идеализированная версия." +"разобраться в процедурах `probe` (обнаружение) и/или `match` " +"(сопоставление), которые есть во многих драйверах. В FreeBSD 5.x это немного " +"сложнее из-за наличия слоя совместимости с OLDCARD. Поскольку различия лишь " +"косметические, здесь будет представлена идеализированная версия." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:127 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:126 #, no-wrap msgid "" "static const struct pccard_product wi_pccard_products[] = {\n" @@ -431,7 +429,7 @@ msgstr "" "};\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:133 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:132 #, no-wrap msgid "" "static int\n" @@ -447,7 +445,7 @@ msgstr "" "\tconst struct pccard_product *pp;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:142 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:141 #, no-wrap msgid "" "\tif ((pp = pccard_product_lookup(dev, wi_pccard_products,\n" @@ -469,7 +467,7 @@ msgstr "" "}\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:145 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:144 msgid "" "Here we have a simple pccard probe routine that matches a few devices. As " "stated above, the name may vary (if it is not `foo_pccard_probe()` it will " @@ -492,7 +490,7 @@ msgstr "" "элемента." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:147 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:146 msgid "" "Looking at the table `wi_pccard_products`, one notices that all the entries " "are of the form `PCMCIA_CARD(_foo_, _bar_, _baz_)`. The _foo_ part is the " @@ -518,13 +516,13 @@ msgstr "" "pccarddevs»." #. type: Title === -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:149 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:148 #, no-wrap msgid "Putting it All Together" msgstr "Собираем все вместе" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:152 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:151 msgid "" "To add a new device, one must first obtain the identification information " "from the device. The easiest way to do this is to insert the device into a " @@ -536,7 +534,7 @@ msgstr "" "вывода:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:159 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:158 #, no-wrap msgid "" " cbb1 pnpinfo vendor=0x104c device=0xac51 subvendor=0x1265 subdevice=0x0300 class=0x060700 at slot=10 function=1\n" @@ -544,15 +542,13 @@ msgid "" " pccard1\n" " unknown pnpinfo manufacturer=0x026f product=0x030c cisvendor=\"BUFFALO\" cisproduct=\"WLI2-CF-S11\" function_type=6 at function=0\n" msgstr "" -" cbb1 pnpinfo vendor=0x104c device=0xac51 subvendor=0x1265 " -"subdevice=0x0300 class=0x060700 at slot=10 function=1\n" +" cbb1 pnpinfo vendor=0x104c device=0xac51 subvendor=0x1265 subdevice=0x0300 class=0x060700 at slot=10 function=1\n" " cardbus1\n" " pccard1\n" -" unknown pnpinfo manufacturer=0x026f product=0x030c cisvendor=" -"\"BUFFALO\" cisproduct=\"WLI2-CF-S11\" function_type=6 at function=0\n" +" unknown pnpinfo manufacturer=0x026f product=0x030c cisvendor=\"BUFFALO\" cisproduct=\"WLI2-CF-S11\" function_type=6 at function=0\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:162 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:161 msgid "" "`manufacturer` and `product` are the numeric IDs for this product, while " "`cisvendor` and `cisproduct` are the product description strings from the " @@ -563,7 +559,7 @@ msgstr "" "строки описания продукта из CIS." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:164 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:163 msgid "" "Since we first want to prefer the numeric option, first try to construct an " "entry based on that. The above card has been slightly fictionalized for the " @@ -576,18 +572,18 @@ msgstr "" "видим, уже есть запись:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:168 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:167 #, no-wrap msgid "vendor BUFFALO\t\t\t0x026f\tBUFFALO (Melco Corporation)\n" msgstr "vendor BUFFALO\t\t\t0x026f\tBUFFALO (Melco Corporation)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:171 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:170 msgid "But there is no entry for this particular card. Instead we find:" msgstr "Но нет записи для этой конкретной карты. Вместо этого мы видим:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:179 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:178 #, no-wrap msgid "" "/* BUFFALO */\n" @@ -603,7 +599,7 @@ msgstr "" "product BUFFALO WLI_CF_S11G\t0x030b\tBUFFALO AirStation 11Mbps CF WLAN\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:182 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:181 msgid "" "To add the device, we can just add this entry to [.filename]#pccarddevs#:" msgstr "" @@ -611,14 +607,13 @@ msgstr "" "filename]#pccarddevs#:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:186 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:185 #, no-wrap msgid "product BUFFALO WLI2_CF_S11G\t0x030c\tBUFFALO AirStation ultra 802.11b CF\n" -msgstr "" -"product BUFFALO WLI2_CF_S11G\t0x030c\tBUFFALO AirStation ultra 802.11b CF\n" +msgstr "product BUFFALO WLI2_CF_S11G\t0x030c\tBUFFALO AirStation ultra 802.11b CF\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:189 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:188 msgid "" "Once these steps are complete, the card can be added to the driver. That is " "a simple operation of adding one line:" @@ -627,7 +622,7 @@ msgstr "" "операция добавления одной строки:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:200 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:199 #, no-wrap msgid "" "static const struct pccard_product wi_pccard_products[] = {\n" @@ -649,7 +644,7 @@ msgstr "" "};\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:203 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:202 msgid "" "Note that I have included a '`+`' in the line before the line that I added, " "but that is simply to highlight the line. Do not add it to the actual " @@ -668,7 +663,7 @@ msgstr "" "перепроверить каждый шаг." #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:205 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:204 msgid "" "If you are a FreeBSD src committer, and everything appears to be working, " "then you can commit the changes to the tree. However, there are some minor " @@ -686,13 +681,13 @@ msgstr "" "драйвер." #. type: Title === -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:207 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:206 #, no-wrap msgid "Submitting a New Device" msgstr "Отправка кода для нового устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:209 +#: documentation/content/en/books/arch-handbook/pccard/_index.adoc:208 msgid "" "Please do not send entries for new devices to the author directly. Instead, " "submit them as a PR and send the author the PR number for his records. This " diff --git a/documentation/content/ru/books/arch-handbook/scsi/_index.adoc b/documentation/content/ru/books/arch-handbook/scsi/_index.adoc index cf9c444927..804a60e370 100644 --- a/documentation/content/ru/books/arch-handbook/scsi/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/scsi/_index.adoc @@ -494,7 +494,7 @@ CAM поддерживает SCSI-контроллеры, работающие === _XPT_RESET_DEV_ — отправить устройству сообщение SCSI "BUS DEVICE RESET" -В CCB не передаются данные, кроме заголовка, и наиболее интересным аргументом в нём является target_id. В зависимости от аппаратного обеспечения контроллера может быть создан аппаратный блок управления (как для запроса XPT_SCSI_IO, см. описание запроса XPT_SCSI_IO) и отправлен контроллеру, или SCSI-контроллер может быть немедленно запрограммирован на отправку этого сообщения RESET устройству, или этот запрос может просто не поддерживаться (и возвращать статус `CAM_REQ_INVALID`). Также при завершении запроса все отключенные транзакции для этого целевого устройства должны быть прерваны (вероятно, в процедуре прерывания). +В CCB не передаются данные, кроме заголовка, и наиболее интересным аргументом в нём является target_id. В зависимости от аппаратного обеспечения контроллера может быть создан аппаратный блок управления (как для запроса XPT_SCSI_IO, см. описание запроса XPT_SCSI_IO) и отправлен контроллеру, или SCSI-контроллер может быть немедленно запрограммирован на отправку этого сообщения RESET устройству, или этот запрос может просто не поддерживаться (и возвращать статус `CAM_REQ_INVALID`). Также при завершении запроса все отключённые транзакции для этого целевого устройства должны быть прерваны (вероятно, в процедуре прерывания). Кроме того, все текущие переговоры для цели теряются при сбросе, поэтому они также могут быть очищены. Или их очистка может быть отложена, так как в любом случае цель запросит повторные переговоры при следующей транзакции. @@ -504,7 +504,7 @@ CAM поддерживает SCSI-контроллеры, работающие Минималистичная реализация могла бы пропустить SCSI-переговоры для всех устройств на шине и вернуть статус CAM_REQ_CMP. -Правильная реализация дополнительно должна фактически сбросить шину SCSI (возможно, также сбросить контроллер SCSI) и пометить все обрабатываемые CCB, как находящиеся в аппаратной очереди, так и отключенные, как завершенные со статусом CAM_SCSI_BUS_RESET. Например: +Правильная реализация дополнительно должна фактически сбросить шину SCSI (возможно, также сбросить контроллер SCSI) и пометить все обрабатываемые CCB, как находящиеся в аппаратной очереди, так и отключённые, как завершённые со статусом CAM_SCSI_BUS_RESET. Например: [.programlisting] .... int targ, lun; @@ -610,7 +610,7 @@ CAM поддерживает SCSI-контроллеры, работающие hcb=found_hcb; .... -Теперь мы рассмотрим текущее состояние обработки HCB. Он может находиться в очереди, ожидая отправки на шину SCSI, передаваться в данный момент, быть отключенным и ожидать результата команды, или фактически завершённым с точки зрения аппаратуры, но ещё не отмеченным программным обеспечением, как выполненный. Чтобы избежать состояний гонки с аппаратурой, мы помечаем HCB как прерванный, так что если этот HCB вот-вот будет отправлен на шину SCSI, контроллер SCSI увидит этот флаг и пропустит его. +Теперь мы рассмотрим текущее состояние обработки HCB. Он может находиться в очереди, ожидая отправки на шину SCSI, передаваться в данный момент, быть отключённым и ожидать результата команды, или фактически завершённым с точки зрения аппаратуры, но ещё не отмеченным программным обеспечением, как выполненный. Чтобы избежать состояний гонки с аппаратурой, мы помечаем HCB как прерванный, так что если этот HCB вот-вот будет отправлен на шину SCSI, контроллер SCSI увидит этот флаг и пропустит его. [.programlisting] .... @@ -655,7 +655,7 @@ CAM поддерживает SCSI-контроллеры, работающие break; .... -Если CCB находится в списке отключенных, то настроить его как запрос прерывания и повторно поставить в начало аппаратной очереди. Сбросить таймаут и сообщить о завершении запроса прерывания. +Если CCB находится в списке отключённых, то настроить его как запрос прерывания и повторно поставить в начало аппаратной очереди. Сбросить таймаут и сообщить о завершении запроса прерывания. [.programlisting] .... @@ -997,7 +997,7 @@ ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) Условия, обрабатываемые процедурой прерывания, и детали сильно зависят от оборудования. Мы рассматриваем набор "типичных" условий. -Сначала проверяем, было ли на шине событие SCSI сброса (вероятно, вызванное другим SCSI-контроллером на той же SCSI-шине). Если это так, мы отменяем все поставленные в очередь и отключенные запросы, сообщаем о событиях и повторно инициализируем наш SCSI-контроллер. Важно, чтобы во время этой инициализации контроллер не инициировал ещё один сброс, иначе два контроллера на одной SCSI-шине могут бесконечно обмениваться сбросами. Случай фатальной ошибки/зависания контроллера может быть обработан в том же месте, но, вероятно, также потребуется отправка сигнала RESET на SCSI-шину для сброса состояния соединений с SCSI-устройствами. +Сначала проверяем, было ли на шине событие SCSI сброса (вероятно, вызванное другим SCSI-контроллером на той же SCSI-шине). Если это так, мы отменяем все поставленные в очередь и отключённые запросы, сообщаем о событиях и повторно инициализируем наш SCSI-контроллер. Важно, чтобы во время этой инициализации контроллер не инициировал ещё один сброс, иначе два контроллера на одной SCSI-шине могут бесконечно обмениваться сбросами. Случай фатальной ошибки/зависания контроллера может быть обработан в том же месте, но, вероятно, также потребуется отправка сигнала RESET на SCSI-шину для сброса состояния соединений с SCSI-устройствами. [.programlisting] .... @@ -1363,4 +1363,4 @@ xxx_timeout(void *arg) } .... -Когда мы прерываем запрос, все остальные отключенные запросы к тому же целевому устройству/LUN также прерываются. Возникает вопрос: следует ли возвращать их со статусом CAM_REQ_ABORTED или CAM_CMD_TIMEOUT? Текущие драйверы используют CAM_CMD_TIMEOUT. Это кажется логичным, потому что если один запрос превысил время ожидания, то, вероятно, с устройством происходит что-то действительно плохое, и если их не трогать, они бы сами превысили время ожидания. +Когда мы прерываем запрос, все остальные отключённые запросы к тому же целевому устройству/LUN также прерываются. Возникает вопрос: следует ли возвращать их со статусом CAM_REQ_ABORTED или CAM_CMD_TIMEOUT? Текущие драйверы используют CAM_CMD_TIMEOUT. Это кажется логичным, потому что если один запрос превысил время ожидания, то, вероятно, с устройством происходит что-то действительно плохое, и если их не трогать, они бы сами превысили время ожидания. diff --git a/documentation/content/ru/books/arch-handbook/scsi/_index.po b/documentation/content/ru/books/arch-handbook/scsi/_index.po index ad93c332ea..0b91f984f1 100644 --- a/documentation/content/ru/books/arch-handbook/scsi/_index.po +++ b/documentation/content/ru/books/arch-handbook/scsi/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" -"PO-Revision-Date: 2026-04-05 04:45+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbookscsi_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Title = @@ -32,13 +32,13 @@ msgid "Chapter 12. Common Access Method SCSI Controllers" msgstr "Глава 12. Контроллеры SCSI с общим методом доступа (CAM)" #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:52 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:51 #, no-wrap msgid "Synopsis" msgstr "Обзор" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:56 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:55 msgid "" "This document assumes that the reader has a general understanding of device " "drivers in FreeBSD and of the SCSI protocol. Much of the information in " @@ -49,24 +49,24 @@ msgstr "" "этом документе была извлечена из драйверов:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:58 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:57 msgid "" "ncr ([.filename]#/sys/pci/ncr.c#) by Wolfgang Stanglmeier and Stefan Esser" msgstr "" "ncr ([.filename]#/sys/pci/ncr.c#) от Wolfgang Stanglmeier и Stefan Esser" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:59 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:58 msgid "sym ([.filename]#/sys/dev/sym/sym_hipd.c#) by Gerard Roudier" msgstr "sym ([.filename]#/sys/dev/sym/sym_hipd.c#) от Gerard Roudier" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:60 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:59 msgid "aic7xxx ([.filename]#/sys/dev/aic7xxx/aic7xxx.c#) by Justin T. Gibbs" msgstr "aic7xxx ([.filename]#/sys/dev/aic7xxx/aic7xxx.c#) от Justin T. Gibbs" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:63 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:62 msgid "" "and from the CAM code itself (by Justin T. Gibbs, see [.filename]#/sys/cam/" "*#). When some solution looked the most logical and was essentially " @@ -78,7 +78,7 @@ msgstr "" "дословно взято из кода Justin T. Gibbs, я отмечал его как \"рекомендуемое\"." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:71 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:70 msgid "" "The document is illustrated with examples in pseudo-code. Although " "sometimes the examples have many details and look like real code, it is " @@ -103,13 +103,13 @@ msgstr "" "реальных драйверах." #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:73 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:72 #, no-wrap msgid "General Architecture" msgstr "Общая архитектура" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:79 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:78 msgid "" "CAM stands for Common Access Method. It is a generic way to address the I/O " "buses in a SCSI-like way. This allows a separation of the generic device " @@ -123,12 +123,12 @@ msgstr "" "способ адресации шин ввода-вывода в стиле SCSI. Это позволяет отделить общие " "драйверы устройств от драйверов, управляющих шиной ввода-вывода: например, " "драйвер диска получает возможность управлять дисками как на SCSI, IDE, так и " -"на любой другой шине, так что часть драйвера диска не нужно переписывать (" -"или копировать и изменять) для каждой новой шины ввода-вывода. Таким " +"на любой другой шине, так что часть драйвера диска не нужно переписывать " +"(или копировать и изменять) для каждой новой шины ввода-вывода. Таким " "образом, двумя наиболее важными активными сущностями являются:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:81 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:80 msgid "" "_Peripheral Modules_ - a driver for peripheral devices (disk, tape, CD-ROM, " "etc.)" @@ -137,7 +137,7 @@ msgstr "" "ленты, CD-ROM и т.д.)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:82 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:81 msgid "" "_SCSI Interface Modules_ (SIM) - a Host Bus Adapter drivers for connecting " "to an I/O bus such as SCSI or IDE." @@ -146,7 +146,7 @@ msgstr "" "шине ввода-вывода, такой как SCSI или IDE." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:85 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:84 msgid "" "A peripheral driver receives requests from the OS, converts them to a " "sequence of SCSI commands and passes these SCSI commands to a SCSI Interface " @@ -163,7 +163,7 @@ msgstr "" "оборудования)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:87 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:86 msgid "" "As we are interested in writing a SCSI adapter driver here, from this point " "on we will consider everything from the SIM standpoint." @@ -173,13 +173,13 @@ msgstr "" "(SIM)." #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:88 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:87 #, no-wrap msgid "Globals and Boilerplate" msgstr "Глобальные переменные и Шаблонный код" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:91 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:90 msgid "" "A typical SIM driver needs to include the following CAM-related header files:" msgstr "" @@ -187,7 +187,7 @@ msgstr "" "с CAM:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:100 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:99 #, no-wrap msgid "" "#include <cam/cam.h>\n" @@ -205,13 +205,13 @@ msgstr "" "#include <cam/scsi/scsi_all.h>\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:102 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:101 #, no-wrap msgid "Device configuration: xxx_attach" msgstr "Конфигурация устройства: xxx_attach" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:107 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:106 msgid "" "The first thing each SIM driver must do is register itself with the CAM " "subsystem. This is done during the driver's `xxx_attach()` function (here " @@ -221,12 +221,12 @@ msgid "" msgstr "" "Первое, что должен сделать каждый драйвер SIM, — это зарегистрироваться в " "подсистеме CAM. Это выполняется в функции `xxx_attach()` драйвера (здесь и " -"далее xxx_ используется для обозначения уникального префикса имени драйвера)" -". Сама функция `xxx_attach()` вызывается кодом автонастройки системной шины, " -"который мы здесь не описываем." +"далее xxx_ используется для обозначения уникального префикса имени " +"драйвера). Сама функция `xxx_attach()` вызывается кодом автонастройки " +"системной шины, который мы здесь не описываем." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:109 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:108 msgid "" "This is achieved in multiple steps: first it is necessary to allocate the " "queue of requests associated with this SIM:" @@ -235,13 +235,13 @@ msgstr "" "запросов, связанных с этой SIM:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:113 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:112 #, no-wrap msgid " struct cam_devq *devq;\n" msgstr " struct cam_devq *devq;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:117 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:116 #, no-wrap msgid "" " if ((devq = cam_simq_alloc(SIZE)) == NULL) {\n" @@ -253,7 +253,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:122 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:121 msgid "" "Here `SIZE` is the size of the queue to be allocated, maximal number of " "requests it could contain. It is the number of requests that the SIM driver " @@ -265,25 +265,24 @@ msgstr "" "можно вычислить как:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:126 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:125 #, no-wrap msgid "SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET\n" -msgstr "" -"SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET\n" +msgstr "SIZE = NUMBER_OF_SUPPORTED_TARGETS * MAX_SIMULTANEOUS_COMMANDS_PER_TARGET\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:129 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:128 msgid "Next we create a descriptor of our SIM:" msgstr "Далее мы создаем описание нашего SIM:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:133 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:132 #, no-wrap msgid " struct cam_sim *sim;\n" msgstr " struct cam_sim *sim;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:140 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:139 #, no-wrap msgid "" " if ((sim = cam_sim_alloc(action_func, poll_func, driver_name,\n" @@ -301,7 +300,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:143 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:142 msgid "" "Note that if we are not able to create a SIM descriptor we free the `devq` " "also because we can do nothing else with it and we want to conserve memory." @@ -311,7 +310,7 @@ msgstr "" "сэкономить память." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:145 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:144 msgid "" "If a SCSI card has multiple SCSI buses on it then each bus requires its own " "`cam_sim` structure." @@ -320,7 +319,7 @@ msgstr "" "собственная структура `cam_sim`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:148 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:147 msgid "" "An interesting question is what to do if a SCSI card has more than one SCSI " "bus, do we need one `devq` structure per card or per SCSI bus? The answer " @@ -332,41 +331,41 @@ msgstr "" "в комментариях к коду CAM, таков: как угодно, на усмотрение автора драйвера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:150 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:149 msgid "The arguments are:" msgstr "Аргументы:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:152 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:151 msgid "`action_func` - pointer to the driver's `xxx_action` function." msgstr "`action_func` - указатель на функцию `xxx_action` драйвера." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:156 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:155 #, no-wrap msgid "static void xxx_action(struct cam_sim *, union ccb *);\n" msgstr "static void xxx_action(struct cam_sim *, union ccb *);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:158 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:157 msgid "`poll_func` - pointer to the driver's `xxx_poll()`" msgstr "`poll_func` - указатель на функцию `xxx_poll()` драйвера" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:162 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1020 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:161 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1019 #, no-wrap msgid "static void xxx_poll(struct cam_sim *);\n" msgstr "static void xxx_poll(struct cam_sim *);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:164 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:163 msgid "" "driver_name - the name of the actual driver, such as \"ncr\" or \"wds\"." msgstr "`driver_name` — имя фактического драйвера, например `ncr` или `wds`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:166 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:165 msgid "" "`softc` - pointer to the driver's internal descriptor for this SCSI card. " "This pointer will be used by the driver in future to get private data." @@ -376,7 +375,7 @@ msgstr "" "приватных данных." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:167 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:166 msgid "" "unit - the controller unit number, for example for controller \"mps0\" this " "number will be 0" @@ -385,7 +384,7 @@ msgstr "" "число будет 0" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:171 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:170 msgid "" "mtx - Lock associated with this SIM. For SIMs that don't know about " "locking, pass in Giant. For SIMs that do, pass in the lock used to guard " @@ -398,7 +397,7 @@ msgstr "" "будет удерживаться при вызовах xxx_action и xxx_poll." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:174 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:173 msgid "" "max_dev_transactions - maximal number of simultaneous transactions per SCSI " "target in the non-tagged mode. This value will be almost universally equal " @@ -415,7 +414,7 @@ msgstr "" "кажется оправданным из-за сложности." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:179 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:178 msgid "" "max_tagged_dev_transactions - the same thing, but in the tagged mode. Tags " "are the SCSI way to initiate multiple transactions on a device: each " @@ -434,12 +433,12 @@ msgstr "" "зависит от возможностей SCSI-адаптера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:181 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:180 msgid "Finally we register the SCSI buses associated with our SCSI adapter:" msgstr "Наконец, мы регистрируем шины SCSI, связанные с нашим SCSI-адаптером:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:188 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:187 #, no-wrap msgid "" " if (xpt_bus_register(sim, softc, bus_number) != CAM_SUCCESS) {\n" @@ -453,7 +452,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:192 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:191 msgid "" "If there is one `devq` structure per SCSI bus (i.e., we consider a card with " "multiple buses as multiple cards with one bus each) then the bus number will " @@ -467,18 +466,18 @@ msgstr "" "отдельная структура `cam_sim`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:195 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:194 msgid "" "After that our controller is completely hooked to the CAM system. The value " "of `devq` can be discarded now: sim will be passed as an argument in all " "further calls from CAM and devq can be derived from it." msgstr "" -"После этого наш контроллер полностью подключён к системе CAM. Значение `devq`" -" теперь можно отбросить: sim будет передаваться в качестве аргумента во всех " -"последующих вызовах из CAM, а devq можно получить из него." +"После этого наш контроллер полностью подключён к системе CAM. Значение " +"`devq` теперь можно отбросить: sim будет передаваться в качестве аргумента " +"во всех последующих вызовах из CAM, а devq можно получить из него." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:199 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:198 msgid "" "CAM provides the framework for such asynchronous events. Some events " "originate from the lower levels (the SIM drivers), some events originate " @@ -493,7 +492,7 @@ msgstr "" "событий, чтобы получать уведомления при их возникновении." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:207 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:206 msgid "" "A typical example of such an event is a device reset. Each transaction and " "event identifies the devices to which it applies by the means of \"path\". " @@ -524,13 +523,13 @@ msgstr "" "нехваткой памяти в будущем:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:211 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:210 #, no-wrap msgid " struct cam_path *path;\n" msgstr " struct cam_path *path;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:219 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:218 #, no-wrap msgid "" " if (xpt_create_path(&path, /*periph*/NULL,\n" @@ -550,7 +549,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:222 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:221 #, no-wrap msgid "" " softc->wpath = path;\n" @@ -560,37 +559,37 @@ msgstr "" " softc->sim = sim;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:225 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:224 msgid "As you can see the path includes:" msgstr "Как вы можете видеть, путь включает:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:227 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:226 msgid "ID of the peripheral driver (NULL here because we have none)" msgstr "" "Идентификатор драйвера периферийного устройства (NULL здесь, так как у нас " "его нет)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:228 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:227 msgid "ID of the SIM driver (`cam_sim_path(sim)`)" msgstr "Идентификатор драйвера SIM (`cam_sim_path(sim)`)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:229 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:228 msgid "" "SCSI target number of the device (CAM_TARGET_WILDCARD means \"all devices\")" msgstr "" -"Номер целевого устройства SCSI (CAM_TARGET_WILDCARD означает \"все " -"устройства\")" +"Номер целевого устройства SCSI (CAM_TARGET_WILDCARD означает \"все устройства" +"\")" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:230 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:229 msgid "SCSI LUN number of the subdevice (CAM_LUN_WILDCARD means \"all LUNs\")" msgstr "Номер SCSI LUN подустройства (CAM_LUN_WILDCARD означает \"все LUN\")" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:232 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:231 msgid "" "If the driver can not allocate this path it will not be able to work " "normally, so in that case we dismantle that SCSI bus." @@ -599,7 +598,7 @@ msgstr "" "поэтому в таком случае мы демонтируем эту шину SCSI." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:235 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:234 msgid "" "And we save the path pointer in the `softc` structure for future use. After " "that we save the value of sim (or we can also discard it on the exit from " @@ -610,7 +609,7 @@ msgstr "" "его при выходе из `xxx_probe()`, если захотим)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:238 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:237 msgid "" "That is all for a minimalistic initialization. To do things right there is " "one more issue left." @@ -619,7 +618,7 @@ msgstr "" "остался ещё один вопрос." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:243 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:242 msgid "" "For a SIM driver there is one particularly interesting event: when a target " "device is considered lost. In this case resetting the SCSI negotiations " @@ -634,13 +633,13 @@ msgstr "" "блоке управления CAM для этого типа запроса:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:247 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:246 #, no-wrap msgid " struct ccb_setasync csa;\n" msgstr " struct ccb_setasync csa;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:254 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:253 #, no-wrap msgid "" " xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);\n" @@ -658,25 +657,25 @@ msgstr "" " xpt_action((union ccb *)&csa);\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:256 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:255 #, no-wrap msgid "Processing CAM messages: xxx_action" msgstr "Обработка сообщений CAM: xxx_action" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:261 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:260 #, no-wrap msgid "static void xxx_action(struct cam_sim *sim, union ccb *ccb);\n" msgstr "static void xxx_action(struct cam_sim *sim, union ccb *ccb);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:268 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:267 msgid "" "Do some action on request of the CAM subsystem. Sim describes the SIM for " -"the request, CCB is the request itself. CCB stands for \"CAM Control " -"Block\". It is a union of many specific instances, each describing " -"arguments for some type of transactions. All of these instances share the " -"CCB header where the common part of arguments is stored." +"the request, CCB is the request itself. CCB stands for \"CAM Control Block" +"\". It is a union of many specific instances, each describing arguments for " +"some type of transactions. All of these instances share the CCB header " +"where the common part of arguments is stored." msgstr "" "Выполнить некоторое действие по запросу подсистемы CAM. Sim описывает SIM " "для запроса, CCB — это сам запрос. CCB расшифровывается как \"CAM Control " @@ -686,7 +685,7 @@ msgstr "" "хранится общая часть аргументов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:271 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:270 msgid "" "CAM supports the SCSI controllers working in both initiator (\"normal\") " "mode and target (simulating a SCSI device) mode. Here we only consider the " @@ -697,7 +696,7 @@ msgstr "" "рассматриваем только часть, относящуюся к режиму инициатора." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:273 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:272 msgid "" "There are a few function and macros (in other words, methods) defined to " "access the public data in the struct sim:" @@ -706,17 +705,17 @@ msgstr "" "определённых для доступа к публичным данным в структуре sim:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:275 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:274 msgid "`cam_sim_path(sim)` - the path ID (see above)" msgstr "`cam_sim_path(sim)` - идентификатор пути (см. выше)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:276 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:275 msgid "`cam_sim_name(sim)` - the name of the sim" msgstr "`cam_sim_name(sim)` — имя sim" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:277 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:276 msgid "" "`cam_sim_softc(sim)` - the pointer to the softc (driver private data) " "structure" @@ -725,17 +724,17 @@ msgstr "" "драйвера)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:278 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:277 msgid "`cam_sim_unit(sim)` - the unit number" msgstr "`cam_sim_unit(sim)` - номер устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:279 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:278 msgid "`cam_sim_bus(sim)` - the bus ID" msgstr "`cam_sim_bus(sim)` - идентификатор шины" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:281 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:280 msgid "" "To identify the device, `xxx_action()` can get the unit number and pointer " "to its structure softc using these functions." @@ -744,7 +743,7 @@ msgstr "" "и указатель на его структуру softc, используя следующие функции." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:284 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:283 msgid "" "The type of request is stored in `ccb->ccb_h.func_code`. So generally " "`xxx_action()` consists of a big switch:" @@ -753,7 +752,7 @@ msgstr "" "`xxx_action()` состоит из большого оператора switch:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:291 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:290 #, no-wrap msgid "" " struct xxx_softc *softc = (struct xxx_softc *) cam_sim_softc(sim);\n" @@ -767,7 +766,7 @@ msgstr "" " int bus = cam_sim_bus(sim);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:300 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:299 #, no-wrap msgid "" " switch (ccb_h->func_code) {\n" @@ -789,7 +788,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:303 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:302 msgid "" "As can be seen from the default case (if an unknown command was received) " "the return code of the command is set into `ccb->ccb_h.status` and the " @@ -800,7 +799,7 @@ msgstr "" "возвращается обратно в CAM вызовом `xpt_done(ccb)`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:306 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:305 msgid "" "`xpt_done()` does not have to be called from `xxx_action()`: For example an " "I/O request may be enqueued inside the SIM driver and/or its SCSI " @@ -815,7 +814,7 @@ msgstr "" "процедуры обработки прерывания." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:314 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:313 msgid "" "Actually, the CCB status is not only assigned as a return code but a CCB has " "some status all the time. Before CCB is passed to the `xxx_action()` " @@ -834,13 +833,13 @@ msgstr "" "запрос находится в процессе выполнения. В [.filename]#/sys/cam/cam.h# " "определено удивительно большое количество значений статуса, которые должны " "детально отражать состояние запроса. Что ещё интереснее, статус фактически " -"представляет собой \"побитовое ИЛИ\" перечисленного значения статуса (" -"младшие 6 бит) и возможных дополнительных флагов (старшие биты). " +"представляет собой \"побитовое ИЛИ\" перечисленного значения статуса " +"(младшие 6 бит) и возможных дополнительных флагов (старшие биты). " "Перечисленные значения будут подробно рассмотрены далее. Их краткое описание " "можно найти в разделе \"Сводка ошибок\". Возможные флаги статуса:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:317 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:316 msgid "" "_CAM_DEV_QFRZN_ - if the SIM driver gets a serious error (for example, the " "device does not respond to the selection or breaks the SCSI protocol) when " @@ -859,7 +858,7 @@ msgstr "" "очередь после обработки ошибки." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:319 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:318 msgid "" "_CAM_AUTOSNS_VALID_ - if the device returned an error condition and the flag " "CAM_DIS_AUTOSENSE is not set in CCB the SIM driver must execute the REQUEST " @@ -874,7 +873,7 @@ msgstr "" "sense должны быть сохранены в CCB, а этот флаг установлен." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:322 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:321 msgid "" "_CAM_RELEASE_SIMQ_ - like CAM_DEV_QFRZN but used in case there is some " "problem (or resource shortage) with the SCSI controller itself. Then all " @@ -891,7 +890,7 @@ msgstr "" "с установленным этим флагом." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:324 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:323 msgid "" "_CAM_SIM_QUEUED_ - when SIM puts a CCB into its request queue this flag " "should be set (and removed when this CCB gets dequeued before being returned " @@ -904,12 +903,12 @@ msgstr "" "CAM, поэтому его назначение чисто диагностическое." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:325 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:324 msgid "_CAM_QOS_VALID_ - The QOS data is now valid." msgstr "_CAM_QOS_VALID_ - Данные QOS теперь действительны." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:328 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:327 msgid "" "The function `xxx_action()` is not allowed to sleep, so all the " "synchronization for resource access must be done using SIM or device queue " @@ -924,32 +923,32 @@ msgstr "" "разморозки очередей напрямую, без передачи CCB в CAM." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:330 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:329 msgid "The CCB header contains the following fields:" msgstr "Заголовок CCB содержит следующие поля:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:332 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:331 msgid "_path_ - path ID for the request" msgstr "_path_ - идентификатор пути для запроса" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:333 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:332 msgid "_target_id_ - target device ID for the request" msgstr "_target_id_ - идентификатор целевого устройства для запроса" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:334 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:333 msgid "_target_lun_ - LUN ID of the target device" msgstr "_target_lun_ - идентификатор LUN целевого устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:335 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:334 msgid "_timeout_ - timeout interval for this command, in milliseconds" msgstr "_timeout_ - интервал таймаута для этой команды, в миллисекундах" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:336 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:335 msgid "" "_timeout_ch_ - a convenience place for the SIM driver to store the timeout " "handle (the CAM subsystem itself does not make any assumptions about it)" @@ -958,16 +957,16 @@ msgstr "" "таймаута (сама подсистема CAM не делает никаких предположений о нём)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:337 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:336 msgid "" "_flags_ - various bits of information about the request spriv_ptr0, " "spriv_ptr1 - fields reserved for private use by the SIM driver (such as " "linking to the SIM queues or SIM private control blocks); actually, they " "exist as unions: spriv_ptr0 and spriv_ptr1 have the type (void *), " -"spriv_field0 and spriv_field1 have the type unsigned long, " -"sim_priv.entries[0].bytes and sim_priv.entries[1].bytes are byte arrays of " -"the size consistent with the other incarnations of the union and " -"sim_priv.bytes is one array, twice bigger." +"spriv_field0 and spriv_field1 have the type unsigned long, sim_priv." +"entries[0].bytes and sim_priv.entries[1].bytes are byte arrays of the size " +"consistent with the other incarnations of the union and sim_priv.bytes is " +"one array, twice bigger." msgstr "" "_flags_ - различные биты информации о запросе spriv_ptr0, spriv_ptr1 — поля, " "зарезервированные для приватного использования драйвером SIM (например, для " @@ -979,7 +978,7 @@ msgstr "" "массив, вдвое большего размера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:339 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:338 msgid "" "The recommended way of using the SIM private fields of CCB is to define some " "meaningful names for them and use these meaningful names in the driver, like:" @@ -989,7 +988,7 @@ msgstr "" "драйвере, например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:344 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:343 #, no-wrap msgid "" "#define ccb_some_meaningful_name sim_priv.entries[0].bytes\n" @@ -999,18 +998,18 @@ msgstr "" "#define ccb_hcb spriv_ptr1 /* for hardware control block */\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:347 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:346 msgid "The most common initiator mode requests are:" msgstr "Наиболее распространённые запросы в режиме инициатора:" #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:348 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:347 #, no-wrap msgid "_XPT_SCSI_IO_ - execute an I/O transaction" msgstr "_XPT_SCSI_IO_ — выполнить транзакцию ввода-вывода" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:352 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:351 msgid "" "The instance \"struct ccb_scsiio csio\" of the union ccb is used to transfer " "the arguments. They are:" @@ -1019,17 +1018,17 @@ msgstr "" "передачи аргументов. Они включают:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:354 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:353 msgid "_cdb_io_ - pointer to the SCSI command buffer or the buffer itself" msgstr "_cdb_io_ - указатель на буфер команды SCSI или сам буфер" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:355 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:354 msgid "_cdb_len_ - SCSI command length" msgstr "_cdb_len_ - длина команды SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:356 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:355 msgid "" "_data_ptr_ - pointer to the data buffer (gets a bit complicated if scatter/" "gather is used)" @@ -1038,22 +1037,22 @@ msgstr "" "scatter/gather)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:357 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:356 msgid "_dxfer_len_ - length of the data to transfer" msgstr "_dxfer_len_ - длина передаваемых данных" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:358 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:357 msgid "_sglist_cnt_ - counter of the scatter/gather segments" msgstr "_sglist_cnt_ - счетчик сегментов scatter/gather" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:359 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:358 msgid "_scsi_status_ - place to return the SCSI status" msgstr "_scsi_status_ - место для возврата статуса SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:360 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:359 msgid "" "_sense_data_ - buffer for the SCSI sense information if the command returns " "an error (the SIM driver is supposed to run the REQUEST SENSE command " @@ -1064,7 +1063,7 @@ msgstr "" "этом случае, если флаг CCB CAM_DIS_AUTOSENSE не установлен)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:361 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:360 msgid "" "_sense_len_ - the length of that buffer (if it happens to be higher than " "size of sense_data the SIM driver must silently assume the smaller value)" @@ -1073,7 +1072,7 @@ msgstr "" "sense_data, драйвер SIM должен без уведомления принять меньшее значение)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:364 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:363 msgid "" "_resid_, _sense_resid_ - if the transfer of data or SCSI sense returned an " "error these are the returned counters of the residual (not transferred) " @@ -1089,34 +1088,34 @@ msgstr "" "Для успешно завершённой передачи они должны быть установлены в ноль." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:365 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:364 msgid "_tag_action_ - the kind of tag to use:" msgstr "_tag_action_ - тип используемого тега:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:366 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:365 msgid "CAM_TAG_ACTION_NONE - do not use tags for this transaction" msgstr "`CAM_TAG_ACTION_NONE` - не использовать теги для данной транзакции" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:367 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:366 msgid "" "MSG_SIMPLE_Q_TAG, MSG_HEAD_OF_Q_TAG, MSG_ORDERED_Q_TAG - value equal to the " "appropriate tag message (see /sys/cam/scsi/scsi_message.h); this gives only " "the tag type, the SIM driver must assign the tag value itself" msgstr "" "MSG_SIMPLE_Q_TAG, MSG_HEAD_OF_Q_TAG, MSG_ORDERED_Q_TAG — значение, " -"соответствующее указанному теговому сообщению (см. /sys/cam/scsi/scsi_message" -".h); указывает только тип тега, значение тега должно быть назначено самим " -"драйвером SIM" +"соответствующее указанному теговому сообщению (см. /sys/cam/scsi/" +"scsi_message.h); указывает только тип тега, значение тега должно быть " +"назначено самим драйвером SIM" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:369 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:368 msgid "The general logic of handling this request is the following:" msgstr "Общая логика обработки этого запроса следующая:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:371 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:370 msgid "" "The first thing to do is to check for possible races, to make sure that the " "command did not get aborted when it was sitting in the queue:" @@ -1125,13 +1124,13 @@ msgstr "" "убедиться, что команда не была прервана, пока находилась в очереди:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:375 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:374 #, no-wrap msgid " struct ccb_scsiio *csio = &ccb->csio;\n" msgstr " struct ccb_scsiio *csio = &ccb->csio;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:380 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:379 #, no-wrap msgid "" " if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {\n" @@ -1145,13 +1144,13 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:383 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:382 msgid "Also we check that the device is supported at all by our controller:" msgstr "" "Также мы проверяем, что устройство вообще поддерживается нашим контроллером:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:397 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:396 #, no-wrap msgid "" " if (ccb_h->target_id > OUR_MAX_SUPPORTED_TARGET_ID\n" @@ -1179,7 +1178,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:403 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:402 msgid "" "Then allocate whatever data structures (such as card-dependent hardware " "control block) we need to process this request. If we can not then freeze " @@ -1200,13 +1199,13 @@ msgstr "" "(HCB) и помечаем его как поставленный в очередь." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:407 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:406 #, no-wrap msgid " struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);\n" msgstr " struct xxx_hcb *hcb = allocate_hcb(softc, unit, bus);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:415 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:414 #, no-wrap msgid "" " if (hcb == NULL) {\n" @@ -1226,7 +1225,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:418 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:417 #, no-wrap msgid "" " hcb->ccb = ccb; ccb_h->ccb_hcb = (void *)hcb;\n" @@ -1236,7 +1235,7 @@ msgstr "" " ccb_h->status |= CAM_SIM_QUEUED;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:423 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:422 msgid "" "Extract the target data from CCB into the hardware control block. Check if " "we are asked to assign a tag and if yes then generate an unique tag and " @@ -1251,7 +1250,7 @@ msgstr "" "синхронной скорости и смещения." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:432 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:431 #, no-wrap msgid "" " hcb->target = ccb_h->target_id; hcb->lun = ccb_h->target_lun;\n" @@ -1269,7 +1268,7 @@ msgstr "" " generate_negotiation_messages(hcb);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:438 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:437 msgid "" "Then set up the SCSI command. The command storage may be specified in the " "CCB in many interesting ways, specified by the CCB flags. The command " @@ -1286,7 +1285,7 @@ msgstr "" "правило, используя API busdma." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:441 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:440 msgid "" "In case if a physical address is requested it is OK to return the CCB with " "the status `CAM_REQ_INVALID`, the current drivers do that. If necessary a " @@ -1299,7 +1298,7 @@ msgstr "" "виртуальный, но с большими трудностями, поэтому мы этого не делаем." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:458 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:457 #, no-wrap msgid "" " if (ccb_h->flags & CAM_CDB_POINTER) {\n" @@ -1333,7 +1332,7 @@ msgstr "" " hcb->cmdlen = csio->cdb_len;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:464 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:463 msgid "" "Now it is time to set up the data. Again, the data storage may be specified " "in the CCB in many interesting ways, specified by the CCB flags. First we " @@ -1346,13 +1345,13 @@ msgstr "" "нет данных для передачи:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:468 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:467 #, no-wrap msgid " int dir = (ccb_h->flags & CAM_DIR_MASK);\n" msgstr " int dir = (ccb_h->flags & CAM_DIR_MASK);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:471 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:470 #, no-wrap msgid "" " if (dir == CAM_DIR_NONE)\n" @@ -1362,7 +1361,7 @@ msgstr "" " goto end_data;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:482 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:481 msgid "" "Then we check if the data is in one chunk or in a scatter-gather list, and " "the addresses are physical or virtual. The SCSI controller may be able to " @@ -1394,19 +1393,19 @@ msgstr "" "CAM." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:486 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:485 #, no-wrap msgid " int rv;\n" msgstr " int rv;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:488 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:487 #, no-wrap msgid " initialize_hcb_for_data(hcb);\n" msgstr " initialize_hcb_for_data(hcb);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:501 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:500 #, no-wrap msgid "" " if ((!(ccb_h->flags & CAM_SCATTER_VALID)) {\n" @@ -1425,12 +1424,10 @@ msgstr "" " if ((!(ccb_h->flags & CAM_SCATTER_VALID)) {\n" " /* single buffer */\n" " if (!(ccb_h->flags & CAM_DATA_PHYS)) {\n" -" rv = add_virtual_chunk(hcb, csio->data_ptr, csio->dxfer_len, " -"dir);\n" +" rv = add_virtual_chunk(hcb, csio->data_ptr, csio->dxfer_len, dir);\n" " }\n" " } else {\n" -" rv = add_physical_chunk(hcb, csio->data_ptr, csio->dxfer_len, " -"dir);\n" +" rv = add_physical_chunk(hcb, csio->data_ptr, csio->dxfer_len, dir);\n" " }\n" " } else {\n" " int i;\n" @@ -1438,7 +1435,7 @@ msgstr "" " segs = (struct bus_dma_segment *)csio->data_ptr;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:533 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:532 #, no-wrap msgid "" " if ((ccb_h->flags & CAM_SG_LIST_PHYS) != 0) {\n" @@ -1475,8 +1472,7 @@ msgid "" msgstr "" " if ((ccb_h->flags & CAM_SG_LIST_PHYS) != 0) {\n" " /* The SG list pointer is physical */\n" -" rv = setup_hcb_for_physical_sg_list(hcb, segs, csio->sglist_cnt);" -"\n" +" rv = setup_hcb_for_physical_sg_list(hcb, segs, csio->sglist_cnt);\n" " } else if (!(ccb_h->flags & CAM_DATA_PHYS)) {\n" " /* SG buffer pointers are virtual */\n" " for (i = 0; i < csio->sglist_cnt; i++) {\n" @@ -1507,7 +1503,7 @@ msgstr "" " end_data:\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:536 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:535 msgid "" "If disconnection is disabled for this CCB we pass this information to the " "hcb:" @@ -1515,7 +1511,7 @@ msgstr "" "Если отключение запрещено для этого CCB, мы передаем эту информацию в hcb:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:541 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:540 #, no-wrap msgid "" " if (ccb_h->flags & CAM_DIS_DISCONNECT)\n" @@ -1525,7 +1521,7 @@ msgstr "" " hcb_disable_disconnect(hcb);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:544 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:543 msgid "" "If the controller is able to run REQUEST SENSE command all by itself then " "the value of the flag CAM_DIS_AUTOSENSE should also be passed to it, to " @@ -1537,7 +1533,7 @@ msgstr "" "этого не требует." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:546 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:545 msgid "" "The only thing left is to set up the timeout, pass our hcb to the hardware " "and return, the rest will be done by the interrupt handler (or timeout " @@ -1548,7 +1544,7 @@ msgstr "" "таймаута)." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:553 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:552 #, no-wrap msgid "" " ccb_h->timeout_ch = timeout(xxx_timeout, (caddr_t) hcb,\n" @@ -1562,12 +1558,12 @@ msgstr "" " return;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:556 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:555 msgid "And here is a possible implementation of the function returning CCB:" msgstr "И вот возможная реализация функции, возвращающей CCB:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:563 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:562 #, no-wrap msgid "" " static void\n" @@ -1576,13 +1572,12 @@ msgid "" " struct xxx_softc *softc = hcb->softc;\n" msgstr "" " static void\n" -" free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t " -"status)\n" +" free_hcb_and_ccb_done(struct xxx_hcb *hcb, union ccb *ccb, u_int32_t status)\n" " {\n" " struct xxx_softc *softc = hcb->softc;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:578 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:577 #, no-wrap msgid "" " ccb->ccb_h.ccb_hcb = 0;\n" @@ -1616,14 +1611,13 @@ msgstr "" " }\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:580 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:579 #, no-wrap msgid "_XPT_RESET_DEV_ - send the SCSI \"BUS DEVICE RESET\" message to a device" -msgstr "" -"_XPT_RESET_DEV_ — отправить устройству сообщение SCSI \"BUS DEVICE RESET\"" +msgstr "_XPT_RESET_DEV_ — отправить устройству сообщение SCSI \"BUS DEVICE RESET\"" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:585 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:584 msgid "" "There is no data transferred in CCB except the header and the most " "interesting argument of it is target_id. Depending on the controller " @@ -1642,11 +1636,11 @@ msgstr "" "контроллеру, или SCSI-контроллер может быть немедленно запрограммирован на " "отправку этого сообщения RESET устройству, или этот запрос может просто не " "поддерживаться (и возвращать статус `CAM_REQ_INVALID`). Также при завершении " -"запроса все отключенные транзакции для этого целевого устройства должны быть " +"запроса все отключённые транзакции для этого целевого устройства должны быть " "прерваны (вероятно, в процедуре прерывания)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:588 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:587 msgid "" "Also all the current negotiations for the target are lost on reset, so they " "might be cleaned too. Or they clearing may be deferred, because anyway the " @@ -1657,13 +1651,13 @@ msgstr "" "любом случае цель запросит повторные переговоры при следующей транзакции." #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:589 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:588 #, no-wrap msgid "_XPT_RESET_BUS_ - send the RESET signal to the SCSI bus" msgstr "_XPT_RESET_BUS_ — отправить сигнал RESET на шину SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:592 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:591 msgid "" "No arguments are passed in the CCB, the only interesting argument is the " "SCSI bus indicated by the struct sim pointer." @@ -1672,7 +1666,7 @@ msgstr "" "SCSI, указанная структурой sim." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:594 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:593 msgid "" "A minimalistic implementation would forget the SCSI negotiations for all the " "devices on the bus and return the status CAM_REQ_CMP." @@ -1681,20 +1675,20 @@ msgstr "" "устройств на шине и вернуть статус CAM_REQ_CMP." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:597 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:596 msgid "" "The proper implementation would in addition actually reset the SCSI bus " "(possible also reset the SCSI controller) and mark all the CCBs being " "processed, both those in the hardware queue and those being disconnected, as " "done with the status CAM_SCSI_BUS_RESET. Like:" msgstr "" -"Правильная реализация дополнительно должна фактически сбросить шину SCSI (" -"возможно, также сбросить контроллер SCSI) и пометить все обрабатываемые CCB, " -"как находящиеся в аппаратной очереди, так и отключенные, как завершенные со " -"статусом CAM_SCSI_BUS_RESET. Например:" +"Правильная реализация дополнительно должна фактически сбросить шину SCSI " +"(возможно, также сбросить контроллер SCSI) и пометить все обрабатываемые " +"CCB, как находящиеся в аппаратной очереди, так и отключённые, как " +"завершённые со статусом CAM_SCSI_BUS_RESET. Например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:603 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:602 #, no-wrap msgid "" " int targ, lun;\n" @@ -1708,7 +1702,7 @@ msgstr "" " struct cam_path *path;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:609 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:608 #, no-wrap msgid "" " /* The SCSI bus reset may take a long time, in this case its completion\n" @@ -1724,7 +1718,7 @@ msgstr "" " reset_scsi_bus(softc);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:615 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:614 #, no-wrap msgid "" " /* drop all enqueued CCBs */\n" @@ -1740,7 +1734,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:621 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:620 #, no-wrap msgid "" " /* the clean values of negotiations to report */\n" @@ -1756,7 +1750,7 @@ msgstr "" " | CCB_TRANS_SYNC_RATE_VALID | CCB_TRANS_SYNC_OFFSET_VALID);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:625 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:624 #, no-wrap msgid "" " /* drop all disconnected CCBs and clean negotiations */\n" @@ -1768,7 +1762,7 @@ msgstr "" " clean_negotiations(softc, targ);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:633 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:632 #, no-wrap msgid "" " /* report the event if possible */\n" @@ -1788,7 +1782,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:640 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:639 #, no-wrap msgid "" " for (lun=0; lun <= OUR_MAX_SUPPORTED_LUN; lun++)\n" @@ -1799,15 +1793,14 @@ msgid "" " }\n" msgstr "" " for (lun=0; lun <= OUR_MAX_SUPPORTED_LUN; lun++)\n" -" for (h = softc->first_discon_hcb[targ][lun]; h != NULL; h = hh) {" -"\n" +" for (h = softc->first_discon_hcb[targ][lun]; h != NULL; h = hh) {\n" " hh=h->next;\n" " free_hcb_and_ccb_done(h, h->ccb, CAM_SCSI_BUS_RESET);\n" " }\n" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:643 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:642 #, no-wrap msgid "" " ccb->ccb_h.status = CAM_REQ_CMP;\n" @@ -1817,7 +1810,7 @@ msgstr "" " xpt_done(ccb);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:647 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:646 #, no-wrap msgid "" " /* report the event */\n" @@ -1829,7 +1822,7 @@ msgstr "" " return;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:650 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:649 msgid "" "Implementing the SCSI bus reset as a function may be a good idea because it " "would be re-used by the timeout function as a last resort if the things go " @@ -1840,13 +1833,13 @@ msgstr "" "средства, если что-то пойдёт не так." #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:651 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:650 #, no-wrap msgid "_XPT_ABORT_ - abort the specified CCB" msgstr "_XPT_ABORT_ — прервать указанный CCB" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:655 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:654 msgid "" "The arguments are transferred in the instance \"struct ccb_abort cab\" of " "the union ccb. The only argument field in it is:" @@ -1855,12 +1848,12 @@ msgstr "" "Единственное поле аргумента в нём:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:657 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:656 msgid "_abort_ccb_ - pointer to the CCB to be aborted" msgstr "_abort_ccb_ — указатель на CCB, который необходимо прервать" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:660 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:659 msgid "" "If the abort is not supported just return the status CAM_UA_ABORT. This is " "also the easy way to minimally implement this call, return CAM_UA_ABORT in " @@ -1871,7 +1864,7 @@ msgstr "" "возвращать CAM_UA_ABORT." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:663 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:662 msgid "" "The hard way is to implement this request honestly. First check that abort " "applies to a SCSI transaction:" @@ -1880,7 +1873,7 @@ msgstr "" "прерывание применяется к SCSI-транзакции:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:668 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:667 #, no-wrap msgid "" " struct ccb *abort_ccb;\n" @@ -1890,7 +1883,7 @@ msgstr "" " abort_ccb = ccb->cab.abort_ccb;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:674 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:673 #, no-wrap msgid "" " if (abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {\n" @@ -1906,7 +1899,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:678 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:677 msgid "" "Then it is necessary to find this CCB in our queue. This can be done by " "walking the list of all our hardware control blocks in search for one " @@ -1917,19 +1910,19 @@ msgstr "" "этим CCB:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:682 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:681 #, no-wrap msgid " struct xxx_hcb *hcb, *h;\n" msgstr " struct xxx_hcb *hcb, *h;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:684 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:683 #, no-wrap msgid " hcb = NULL;\n" msgstr " hcb = NULL;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:695 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:694 #, no-wrap msgid "" " /* We assume that softc->first_hcb is the head of the list of all\n" @@ -1955,7 +1948,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:702 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:701 #, no-wrap msgid "" " if (hcb == NULL) {\n" @@ -1973,13 +1966,13 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:704 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:703 #, no-wrap msgid " hcb=found_hcb;\n" msgstr " hcb=found_hcb;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:709 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:708 msgid "" "Now we look at the current processing status of the HCB. It may be either " "sitting in the queue waiting to be sent to the SCSI bus, being transferred " @@ -1991,20 +1984,20 @@ msgid "" msgstr "" "Теперь мы рассмотрим текущее состояние обработки HCB. Он может находиться в " "очереди, ожидая отправки на шину SCSI, передаваться в данный момент, быть " -"отключенным и ожидать результата команды, или фактически завершённым с точки " +"отключённым и ожидать результата команды, или фактически завершённым с точки " "зрения аппаратуры, но ещё не отмеченным программным обеспечением, как " "выполненный. Чтобы избежать состояний гонки с аппаратурой, мы помечаем HCB " "как прерванный, так что если этот HCB вот-вот будет отправлен на шину SCSI, " "контроллер SCSI увидит этот флаг и пропустит его." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:713 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:712 #, no-wrap msgid " int hstatus;\n" msgstr " int hstatus;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:718 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:717 #, no-wrap msgid "" " /* shown as a function, in case special action is needed to make\n" @@ -2018,13 +2011,13 @@ msgstr "" " set_hcb_flags(hcb, HCB_BEING_ABORTED);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:720 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:719 #, no-wrap msgid " abort_again:\n" msgstr " abort_again:\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:730 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:729 #, no-wrap msgid "" " hstatus = get_hcb_status(hcb);\n" @@ -2048,7 +2041,7 @@ msgstr "" " break;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:737 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:736 msgid "" "If the CCB is being transferred right now we would like to signal to the " "SCSI controller in some hardware-dependent way that we want to abort the " @@ -2069,11 +2062,11 @@ msgstr "" "команда не будет прервана в разумное время, например, за 10 секунд, " "процедура таймаута продолжит работу и сбросит всю шину SCSI. Поскольку " "команда будет прервана в разумные сроки, мы можем просто вернуть запрос на " -"прерывание как успешно выполненный и пометить прерванный CCB как прерванный (" -"но пока не помечать его как завершённый)." +"прерывание как успешно выполненный и пометить прерванный CCB как прерванный " +"(но пока не помечать его как завершённый)." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:753 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:752 #, no-wrap msgid "" " case HCB_BEING_TRANSFERRED:\n" @@ -2105,24 +2098,24 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:755 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:754 #, no-wrap msgid " break;\n" msgstr " break;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:759 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:758 msgid "" "If the CCB is in the list of disconnected then set it up as an abort request " "and re-queue it at the front of hardware queue. Reset the timeout and " "report the abort request to be completed." msgstr "" -"Если CCB находится в списке отключенных, то настроить его как запрос " +"Если CCB находится в списке отключённых, то настроить его как запрос " "прерывания и повторно поставить в начало аппаратной очереди. Сбросить " "таймаут и сообщить о завершении запроса прерывания." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:773 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:772 #, no-wrap msgid "" " case HCB_DISCONNECTED:\n" @@ -2150,7 +2143,7 @@ msgstr "" " return;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:778 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:777 msgid "" "That is all for the ABORT request, although there is one more issue. As the " "ABORT message cleans all the ongoing transactions on a LUN we have to mark " @@ -2164,7 +2157,7 @@ msgstr "" "транзакция будет прервана." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:782 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:781 msgid "" "Implementing the CCB abort as a function may be quite a good idea, this " "function can be re-used if an I/O transaction times out. The only " @@ -2179,7 +2172,7 @@ msgstr "" "CAM_CMD_TIMEOUT. Тогда код в case XPT_ABORT будет небольшим, например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:788 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:787 #, no-wrap msgid "" " case XPT_ABORT:\n" @@ -2191,7 +2184,7 @@ msgstr "" " abort_ccb = ccb->cab.abort_ccb;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:801 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:800 #, no-wrap msgid "" " if (abort_ccb->ccb_h.func_code != XPT_SCSI_IO) {\n" @@ -2221,54 +2214,53 @@ msgstr "" " return;\n" #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:803 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:802 #, no-wrap msgid "_XPT_SET_TRAN_SETTINGS_ - explicitly set values of SCSI transfer settings" -msgstr "" -"_XPT_SET_TRAN_SETTINGS_ — явно установить значения настроек передачи SCSI" +msgstr "_XPT_SET_TRAN_SETTINGS_ — явно установить значения настроек передачи SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:806 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:805 msgid "" -"The arguments are transferred in the instance \"struct ccb_trans_setting " -"cts\" of the union ccb:" +"The arguments are transferred in the instance \"struct ccb_trans_setting cts" +"\" of the union ccb:" msgstr "" "Аргументы передаются в экземпляре \"struct ccb_trans_setting cts\" " "объединения ccb:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:808 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:807 msgid "_valid_ - a bitmask showing which settings should be updated:" msgstr "" "_valid_ - битовая маска, показывающая, какие настройки должны быть обновлены:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:809 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:808 msgid "_CCB_TRANS_SYNC_RATE_VALID_ - synchronous transfer rate" msgstr "_CCB_TRANS_SYNC_RATE_VALID_ - скорость синхронной передачи" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:810 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:809 msgid "_CCB_TRANS_SYNC_OFFSET_VALID_ - synchronous offset" msgstr "_CCB_TRANS_SYNC_OFFSET_VALID_ - синхронное смещение" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:811 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:810 msgid "_CCB_TRANS_BUS_WIDTH_VALID_ - bus width" msgstr "_CCB_TRANS_BUS_WIDTH_VALID_ - ширина шины" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:812 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:811 msgid "_CCB_TRANS_DISC_VALID_ - set enable/disable disconnection" msgstr "_CCB_TRANS_DISC_VALID_ - установить разрешение/запрет отключения" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:813 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:812 msgid "_CCB_TRANS_TQ_VALID_ - set enable/disable tagged queuing" msgstr "_CCB_TRANS_TQ_VALID_ - установить разрешение/запрет очередей с тегами" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:815 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:814 msgid "" "_flags_ - consists of two parts, binary arguments and identification of sub-" "operations. The binary arguments are:" @@ -2277,27 +2269,27 @@ msgstr "" "подопераций. Бинарные аргументы:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:816 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:815 msgid "_CCB_TRANS_DISC_ENB_ - enable disconnection" msgstr "_CCB_TRANS_DISC_ENB_ - разрешить отключение" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:817 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:816 msgid "_CCB_TRANS_TAG_ENB_ - enable tagged queuing" msgstr "_CCB_TRANS_TAG_ENB_ - разрешить тегированную очередь" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:818 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:817 msgid "the sub-operations are:" msgstr "подоперации:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:819 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:818 msgid "_CCB_TRANS_CURRENT_SETTINGS_ - change the current negotiations" msgstr "_CCB_TRANS_CURRENT_SETTINGS_ - изменить текущие параметры согласования" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:820 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:819 msgid "" "_CCB_TRANS_USER_SETTINGS_ - remember the desired user values sync_period, " "sync_offset - self-explanatory, if sync_offset==0 then the asynchronous mode " @@ -2308,7 +2300,7 @@ msgstr "" "запрашивается асинхронный режим bus_width - ширина шины в битах (не в байтах)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:825 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:824 msgid "" "Two sets of negotiated parameters are supported, the user settings and the " "current settings. The user settings are not really used much in the SIM " @@ -2328,7 +2320,7 @@ msgstr "" "пользовательских параметров, так что они по сути являются верхней границей." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:830 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:829 msgid "" "The current settings are, as the name says, current. Changing them means " "that the parameters must be re-negotiated on the next transfer. Again, " @@ -2350,7 +2342,7 @@ msgstr "" "устройство." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:832 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:831 msgid "" "One caveat is that the bus width and synchronous parameters are per target " "while the disconnection and tag enabling parameters are per lun." @@ -2360,7 +2352,7 @@ msgstr "" "к логическому устройству LUN." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:834 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:833 msgid "" "The recommended implementation is to keep 3 sets of negotiated (bus width " "and synchronous transfer) parameters:" @@ -2369,29 +2361,29 @@ msgstr "" "параметров (ширина шины и синхронная передача):" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:836 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:835 msgid "_user_ - the user set, as above" msgstr "_user_ - пользовательский набор, как указано выше" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:837 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:836 msgid "_current_ - those actually in effect" msgstr "_current_ - тот, который фактически действуют" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:838 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:837 msgid "_goal_ - those requested by setting of the \"current\" parameters" msgstr "" "_goal_ - тот набор, который запрошен для установки параметров в качестве " "\"текущих\"" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:840 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:839 msgid "The code looks like:" msgstr "Код выглядит следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:846 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:845 #, no-wrap msgid "" " struct ccb_trans_settings *cts;\n" @@ -2403,7 +2395,7 @@ msgstr "" " int flags;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:858 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:857 #, no-wrap msgid "" " cts = &ccb->cts;\n" @@ -2431,7 +2423,7 @@ msgstr "" " softc->user_bus_width[targ] = cts->bus_width;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:877 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:876 #, no-wrap msgid "" " if (flags & CCB_TRANS_DISC_VALID) {\n" @@ -2470,11 +2462,10 @@ msgstr "" " softc->goal_sync_offset[targ] =\n" " min(cts->sync_offset, OUR_MAX_SUPPORTED_OFFSET);\n" " if (flags & CCB_TRANS_BUS_WIDTH_VALID)\n" -" softc->goal_bus_width[targ] = min(cts->bus_width, OUR_BUS_WIDTH);" -"\n" +" softc->goal_bus_width[targ] = min(cts->bus_width, OUR_BUS_WIDTH);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:890 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:889 #, no-wrap msgid "" " if (flags & CCB_TRANS_DISC_VALID) {\n" @@ -2504,7 +2495,7 @@ msgstr "" " return;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:894 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:893 msgid "" "Then when the next I/O request will be processed it will check if it has to " "re-negotiate, for example by calling the function target_negotiated(hcb). " @@ -2515,7 +2506,7 @@ msgstr "" "target_negotiated(hcb). Это может быть реализовано следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:902 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:901 #, no-wrap msgid "" " int\n" @@ -2531,7 +2522,7 @@ msgstr "" " int targ = hcb->targ;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:910 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:909 #, no-wrap msgid "" " if (softc->current_sync_period[targ] != softc->goal_sync_period[targ]\n" @@ -2542,10 +2533,8 @@ msgid "" " return 1; /* TRUE */\n" " }\n" msgstr "" -" if (softc->current_sync_period[targ] != softc->goal_sync_period[targ]" -"\n" -" || softc->current_sync_offset[targ] != softc->goal_sync_offset[targ]" -"\n" +" if (softc->current_sync_period[targ] != softc->goal_sync_period[targ]\n" +" || softc->current_sync_offset[targ] != softc->goal_sync_offset[targ]\n" " || softc->current_bus_width[targ] != softc->goal_bus_width[targ])\n" " return 0; /* FALSE */\n" " else\n" @@ -2553,7 +2542,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:914 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:913 msgid "" "After the values are re-negotiated the resulting values must be assigned to " "both current and goal parameters, so for future I/O transactions the current " @@ -2565,20 +2554,20 @@ msgid "" msgstr "" "После пересогласования значений полученные значения должны быть присвоены " "как текущим, так и целевым параметрам, чтобы для будущих операций ввода-" -"вывода текущие и целевые параметры совпадали, и функция `target_negotiated()`" -" возвращала TRUE. При инициализации карты (в `xxx_attach()`) текущие " -"параметры согласования должны быть инициализированы узким асинхронным " -"режимом, а целевые и текущие значения должны быть инициализированы " -"максимальными значениями, поддерживаемыми контроллером." +"вывода текущие и целевые параметры совпадали, и функция " +"`target_negotiated()` возвращала TRUE. При инициализации карты (в " +"`xxx_attach()`) текущие параметры согласования должны быть инициализированы " +"узким асинхронным режимом, а целевые и текущие значения должны быть " +"инициализированы максимальными значениями, поддерживаемыми контроллером." #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:915 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:914 #, no-wrap msgid "_XPT_GET_TRAN_SETTINGS_ - get values of SCSI transfer settings" msgstr "_XPT_GET_TRAN_SETTINGS_ — получить значения настроек передачи SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:920 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:919 msgid "" "This operations is the reverse of XPT_SET_TRAN_SETTINGS. Fill up the CCB " "instance \"struct ccb_trans_setting cts\" with data as requested by the " @@ -2593,47 +2582,48 @@ msgstr "" "биты в поле valid." #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:921 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:920 #, no-wrap msgid "_XPT_CALC_GEOMETRY_ - calculate logical (BIOS) geometry of the disk" msgstr "_XPT_CALC_GEOMETRY_ — вычислить логическую (BIOS) геометрию диска" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:924 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:923 msgid "" -"The arguments are transferred in the instance \"struct ccb_calc_geometry " -"ccg\" of the union ccb:" +"The arguments are transferred in the instance \"struct ccb_calc_geometry ccg" +"\" of the union ccb:" msgstr "" "Аргументы передаются в экземпляре \"struct ccb_calc_geometry ccg\" " "объединения ccb:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:926 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:925 msgid "_block_size_ - input, block (A.K.A sector) size in bytes" -msgstr "_block_size_ - вход, размер блока (также известный как сектор) в байтах" +msgstr "" +"_block_size_ - вход, размер блока (также известный как сектор) в байтах" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:927 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:926 msgid "_volume_size_ - input, volume size in bytes" msgstr "_volume_size_ - вход, размер тома в байтах" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:928 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:927 msgid "_cylinders_ - output, logical cylinders" msgstr "_cylinders_ - выход, логические цилиндры" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:929 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:928 msgid "_heads_ - output, logical heads" msgstr "_heads_ - выход, логические головки" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:930 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:929 msgid "_secs_per_track_ - output, logical sectors per track" msgstr "_secs_per_track_ - выход, логических секторов на дорожку" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:933 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:932 msgid "" "If the returned geometry differs much enough from what the SCSI controller " "BIOS thinks and a disk on this SCSI controller is used as bootable the " @@ -2646,7 +2636,7 @@ msgstr "" "расчёта, взятый из драйвера `aic7xxx`, выглядит следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:940 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:939 #, no-wrap msgid "" " struct ccb_calc_geometry *ccg;\n" @@ -2660,7 +2650,7 @@ msgstr "" " int extended;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:945 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:944 #, no-wrap msgid "" " ccg = &ccb->ccg;\n" @@ -2674,7 +2664,7 @@ msgstr "" " extended = check_cards_EEPROM_for_extended_geometry(softc);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:958 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:957 #, no-wrap msgid "" " if (size_mb > 1024 && extended) {\n" @@ -2704,12 +2694,12 @@ msgstr "" " return;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:963 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:962 msgid "" "This gives the general idea, the exact calculation depends on the quirks of " -"the particular BIOS. If BIOS provides no way set the \"extended " -"translation\" flag in EEPROM this flag should normally be assumed equal to " -"1. Other popular geometries are:" +"the particular BIOS. If BIOS provides no way set the \"extended translation" +"\" flag in EEPROM this flag should normally be assumed equal to 1. Other " +"popular geometries are:" msgstr "" "Это даёт общее представление, точный расчет зависит от особенностей " "конкретной BIOS. Если BIOS не предоставляет возможности установить флаг " @@ -2717,7 +2707,7 @@ msgstr "" "1. Другие популярные геометрии:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:968 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:967 #, no-wrap msgid "" " 128 heads, 63 sectors - Symbios controllers\n" @@ -2727,7 +2717,7 @@ msgstr "" " 16 heads, 63 sectors - old controllers\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:971 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:970 msgid "" "Some system BIOSes and SCSI BIOSes fight with each other with variable " "success, for example a combination of Symbios 875/895 SCSI and Phoenix BIOS " @@ -2740,15 +2730,13 @@ msgstr "" "сброса или мягкой перезагрузки." #. type: Title === -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:972 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:971 #, no-wrap msgid "_XPT_PATH_INQ_ - path inquiry, in other words get the SIM driver and SCSI controller (also known as HBA - Host Bus Adapter) properties" -msgstr "" -"_XPT_PATH_INQ_ — запрос пути, другими словами, получение свойств драйвера " -"SIM и контроллера SCSI (также известного как HBA - Host Bus Adapter)" +msgstr "_XPT_PATH_INQ_ — запрос пути, другими словами, получение свойств драйвера SIM и контроллера SCSI (также известного как HBA - Host Bus Adapter)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:975 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:974 msgid "" "The properties are returned in the instance \"struct ccb_pathinq cpi\" of " "the union ccb:" @@ -2757,49 +2745,49 @@ msgstr "" "ccb:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:977 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:976 msgid "version_num - the SIM driver version number, now all drivers use 1" msgstr "" "`version_num` - номер версии драйвера SIM, в настоящее время все драйверы " "используют 1" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:978 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:977 msgid "hba_inquiry - bitmask of features supported by the controller:" msgstr "hba_inquiry - битовая маска функций, поддерживаемых контроллером:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:979 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:978 msgid "PI_MDP_ABLE - supports MDP message (something from SCSI3?)" msgstr "PI_MDP_ABLE - поддерживает сообщение MDP (что-то из SCSI3?)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:980 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:979 msgid "PI_WIDE_32 - supports 32 bit wide SCSI" msgstr "PI_WIDE_32 — поддерживает 32-битную широкую SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:981 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:980 msgid "PI_WIDE_16 - supports 16 bit wide SCSI" msgstr "PI_WIDE_16 — поддерживает 16-битную широкую SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:982 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:981 msgid "PI_SDTR_ABLE - can negotiate synchronous transfer rate" msgstr "PI_SDTR_ABLE - может согласовать синхронную скорость передачи" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:983 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:982 msgid "PI_LINKED_CDB - supports linked commands" msgstr "PI_LINKED_CDB - поддерживает связанные команды" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:984 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:983 msgid "PI_TAG_ABLE - supports tagged commands" msgstr "PI_TAG_ABLE - поддерживает помеченные команды" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:985 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:984 msgid "" "PI_SOFT_RST - supports soft reset alternative (hard reset and soft reset are " "mutually exclusive within a SCSI bus)" @@ -2808,37 +2796,38 @@ msgstr "" "мягкий сброс являются взаимоисключающими в пределах шины SCSI)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:986 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:985 msgid "target_sprt - flags for target mode support, 0 if unsupported" -msgstr "target_sprt - флаги поддержки целевого режима, 0 если не поддерживается" +msgstr "" +"target_sprt - флаги поддержки целевого режима, 0 если не поддерживается" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:987 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:986 msgid "hba_misc - miscellaneous controller features:" msgstr "hba_misc - различные функции контроллера:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:988 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:987 msgid "PIM_SCANHILO - bus scans from high ID to low ID" msgstr "PIM_SCANHILO - сканирование шины от высокого ID к низкому ID" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:989 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:988 msgid "PIM_NOREMOVE - removable devices not included in scan" msgstr "PIM_NOREMOVE - съемные устройства не включены в сканирование" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:990 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:989 msgid "PIM_NOINITIATOR - initiator role not supported" msgstr "PIM_NOINITIATOR - роль инициатора не поддерживается" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:991 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:990 msgid "PIM_NOBUSRESET - user has disabled initial BUS RESET" msgstr "PIM_NOBUSRESET - пользователь отключил начальный BUS RESET" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:992 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:991 msgid "" "hba_eng_cnt - mysterious HBA engine count, something related to compression, " "now is always set to 0" @@ -2847,23 +2836,23 @@ msgstr "" "сжатием, в настоящее время всегда устанавливается в 0" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:993 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:992 msgid "vuhba_flags - vendor-unique flags, unused now" msgstr "" "vuhba_flags - уникальные флаги производителя, в настоящее время не " "используются" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:994 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:993 msgid "" "max_target - maximal supported target ID (7 for 8-bit bus, 15 for 16-bit " "bus, 127 for Fibre Channel)" msgstr "" -"max_target - максимальный поддерживаемый идентификатор целевого устройства (" -"7 для 8-битной шины, 15 для 16-битной шины, 127 для Fibre Channel)" +"max_target - максимальный поддерживаемый идентификатор целевого устройства " +"(7 для 8-битной шины, 15 для 16-битной шины, 127 для Fibre Channel)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:995 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:994 msgid "" "max_lun - maximal supported LUN ID (7 for older SCSI controllers, 63 for " "newer ones)" @@ -2872,35 +2861,35 @@ msgstr "" "контроллеров, 63 для новых)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:996 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:995 msgid "async_flags - bitmask of installed Async handler, unused now" msgstr "" "async_flags - битовая маска установленных обработчиков Async, в настоящее " "время не используется" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:997 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:996 msgid "hpath_id - highest Path ID in the subsystem, unused now" msgstr "" "hpath_id - наивысший Path ID в подсистеме, в настоящее время не используется" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:998 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:997 msgid "unit_number - the controller unit number, cam_sim_unit(sim)" msgstr "unit_number - номер контроллера, cam_sim_unit(sim)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:999 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:998 msgid "bus_id - the bus number, cam_sim_bus(sim)" msgstr "bus_id - номер шины, cam_sim_bus(sim)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1000 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:999 msgid "initiator_id - the SCSI ID of the controller itself" msgstr "initiator_id - SCSI ID самого контроллера" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1001 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1000 msgid "" "base_transfer_speed - nominal transfer speed in KB/s for asynchronous narrow " "transfers, equals to 3300 for SCSI" @@ -2909,7 +2898,7 @@ msgstr "" "узкополосных передач, равна 3300 для SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1002 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1001 msgid "" "sim_vid - SIM driver's vendor id, a zero-terminated string of maximal length " "SIM_IDLEN including the terminating zero" @@ -2918,7 +2907,7 @@ msgstr "" "окончанием максимальной длины SIM_IDLEN, включая завершающий ноль" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1003 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1002 msgid "" "hba_vid - SCSI controller's vendor id, a zero-terminated string of maximal " "length HBA_IDLEN including the terminating zero" @@ -2927,7 +2916,7 @@ msgstr "" "окончанием максимальной длины HBA_IDLEN, включая завершающий ноль" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1004 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1003 msgid "" "dev_name - device driver name, a zero-terminated string of maximal length " "DEV_IDLEN including the terminating zero, equal to cam_sim_name(sim)" @@ -2936,7 +2925,7 @@ msgstr "" "длины DEV_IDLEN, включая завершающий ноль, эквивалентно cam_sim_name(sim)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1006 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1005 msgid "" "The recommended way of setting the string fields is using strncpy, like:" msgstr "" @@ -2944,13 +2933,13 @@ msgstr "" "например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1010 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1009 #, no-wrap msgid " strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);\n" msgstr " strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1013 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1012 msgid "" "After setting the values set the status to CAM_REQ_CMP and mark the CCB as " "done." @@ -2959,13 +2948,13 @@ msgstr "" "завершённый." #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1015 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1014 #, no-wrap msgid "Polling xxx_poll" msgstr "Опрос xxx_poll" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1029 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1028 msgid "" "The poll function is used to simulate the interrupts when the interrupt " "subsystem is not functioning (for example, when the system has crashed and " @@ -2994,7 +2983,7 @@ msgstr "" "Таким образом, процедура poll обычно выглядит следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1037 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1036 #, no-wrap msgid "" "static void\n" @@ -3010,12 +2999,12 @@ msgstr "" "}\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1040 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1039 msgid "or" msgstr "или" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1048 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1047 #, no-wrap msgid "" "static void\n" @@ -3031,13 +3020,13 @@ msgstr "" "}\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1051 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1050 #, no-wrap msgid "Asynchronous Events" msgstr "Асинхронные события" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1054 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1053 msgid "" "If an asynchronous event callback has been set up then the callback function " "should be defined." @@ -3046,45 +3035,44 @@ msgstr "" "функция должна быть определена." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1059 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1058 #, no-wrap msgid "" "static void\n" "ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)\n" msgstr "" "static void\n" -"ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void " -"*arg)\n" +"ahc_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1062 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1061 msgid "callback_arg - the value supplied when registering the callback" msgstr "callback_arg - значение, переданное при регистрации callback" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1063 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1062 msgid "code - identifies the type of event" msgstr "code - определяет тип события" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1064 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1063 msgid "path - identifies the devices to which the event applies" msgstr "path - определяет устройства, к которым применяется событие" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1065 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1064 msgid "arg - event-specific argument" msgstr "arg - аргумент, специфичный для события" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1067 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1066 msgid "Implementation for a single type of event, AC_LOST_DEVICE, looks like:" msgstr "" "Реализация для одного типа события, AC_LOST_DEVICE, выглядит следующим " "образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1074 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1073 #, no-wrap msgid "" " struct xxx_softc *softc;\n" @@ -3098,7 +3086,7 @@ msgstr "" " struct ccb_trans_settings neg;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1093 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1092 #, no-wrap msgid "" " sim = (struct cam_sim *)callback_arg;\n" @@ -3140,13 +3128,13 @@ msgstr "" " }\n" #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1096 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1095 #, no-wrap msgid "Interrupts" msgstr "Прерывания" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1099 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1098 msgid "" "The exact type of the interrupt routine depends on the type of the " "peripheral bus (PCI, ISA and so on) to which the SCSI controller is " @@ -3156,7 +3144,7 @@ msgstr "" "и так далее), к которой подключен SCSI-контроллер." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1106 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1105 msgid "" "The interrupt routines of the SIM drivers run at the interrupt level " "splcam. So `splcam()` should be used in the driver to synchronize activity " @@ -3181,7 +3169,7 @@ msgstr "" "функцию, например:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1117 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1116 #, no-wrap msgid "" " static void\n" @@ -3203,7 +3191,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1123 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1122 #, no-wrap msgid "" " static void\n" @@ -3219,7 +3207,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1127 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1126 msgid "" "This approach is simple and robust but the problem with it is that " "interrupts may get blocked for a relatively long time and this would " @@ -3234,7 +3222,7 @@ msgstr "" "критических секций также может быть нежелательным." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1130 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1129 msgid "" "The conditions handled by the interrupt routine and the details depend very " "much on the hardware. We consider the set of \"typical\" conditions." @@ -3243,7 +3231,7 @@ msgstr "" "оборудования. Мы рассматриваем набор \"типичных\" условий." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1135 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1134 msgid "" "First, we check if a SCSI reset was encountered on the bus (probably caused " "by another SCSI controller on the same SCSI bus). If so we drop all the " @@ -3257,7 +3245,7 @@ msgid "" msgstr "" "Сначала проверяем, было ли на шине событие SCSI сброса (вероятно, вызванное " "другим SCSI-контроллером на той же SCSI-шине). Если это так, мы отменяем все " -"поставленные в очередь и отключенные запросы, сообщаем о событиях и повторно " +"поставленные в очередь и отключённые запросы, сообщаем о событиях и повторно " "инициализируем наш SCSI-контроллер. Важно, чтобы во время этой инициализации " "контроллер не инициировал ещё один сброс, иначе два контроллера на одной " "SCSI-шине могут бесконечно обмениваться сбросами. Случай фатальной ошибки/" @@ -3266,7 +3254,7 @@ msgstr "" "соединений с SCSI-устройствами." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1141 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1140 #, no-wrap msgid "" " int fatal=0;\n" @@ -3278,7 +3266,7 @@ msgstr "" " struct cam_path *path;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1146 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1145 #, no-wrap msgid "" " if (detected_scsi_reset(softc)\n" @@ -3292,7 +3280,7 @@ msgstr "" " struct xxx_hcb *h, *hh;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1152 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1151 #, no-wrap msgid "" " /* drop all enqueued CCBs */\n" @@ -3308,7 +3296,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1158 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1157 #, no-wrap msgid "" " /* the clean values of negotiations to report */\n" @@ -3324,7 +3312,7 @@ msgstr "" " | CCB_TRANS_SYNC_RATE_VALID | CCB_TRANS_SYNC_OFFSET_VALID);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1162 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1161 #, no-wrap msgid "" " /* drop all disconnected CCBs and clean negotiations */\n" @@ -3336,7 +3324,7 @@ msgstr "" " clean_negotiations(softc, targ);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1170 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1169 #, no-wrap msgid "" " /* report the event if possible */\n" @@ -3356,7 +3344,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1180 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1179 #, no-wrap msgid "" " for (lun=0; lun <= OUR_MAX_SUPPORTED_LUN; lun++)\n" @@ -3370,20 +3358,17 @@ msgid "" " }\n" msgstr "" " for (lun=0; lun <= OUR_MAX_SUPPORTED_LUN; lun++)\n" -" for (h = softc->first_discon_hcb[targ][lun]; h != NULL; h = " -"hh) {\n" +" for (h = softc->first_discon_hcb[targ][lun]; h != NULL; h = hh) {\n" " hh=h->next;\n" " if (fatal)\n" -" free_hcb_and_ccb_done(h, h->ccb, " -"CAM_UNREC_HBA_ERROR);\n" +" free_hcb_and_ccb_done(h, h->ccb, CAM_UNREC_HBA_ERROR);\n" " else\n" -" free_hcb_and_ccb_done(h, h->ccb, CAM_SCSI_BUS_RESET);" -"\n" +" free_hcb_and_ccb_done(h, h->ccb, CAM_SCSI_BUS_RESET);\n" " }\n" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1183 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1182 #, no-wrap msgid "" " /* report the event */\n" @@ -3393,7 +3378,7 @@ msgstr "" " xpt_async(AC_BUS_RESET, softc->wpath, NULL);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1197 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1196 #, no-wrap msgid "" " /* re-initialization may take a lot of time, in such case\n" @@ -3425,7 +3410,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1202 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1201 msgid "" "If interrupt is not caused by a controller-wide condition then probably " "something has happened to the current hardware control block. Depending on " @@ -3439,7 +3424,7 @@ msgstr "" "произошло с этим HCB:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1210 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1209 #, no-wrap msgid "" " struct xxx_hcb *hcb, *h, *hh;\n" @@ -3455,7 +3440,7 @@ msgstr "" " int lun_to_freeze;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1219 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1218 #, no-wrap msgid "" " hcb = get_current_hcb(softc);\n" @@ -3477,7 +3462,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1222 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1221 #, no-wrap msgid "" " targ = hcb->target;\n" @@ -3487,7 +3472,7 @@ msgstr "" " hcb_status = get_status_of_current_hcb(softc);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1225 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1224 msgid "" "First we check if the HCB has completed and if so we check the returned SCSI " "status." @@ -3496,7 +3481,7 @@ msgstr "" "возвращённый статус SCSI." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1230 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1229 #, no-wrap msgid "" " if (hcb_status == COMPLETED) {\n" @@ -3506,7 +3491,7 @@ msgstr "" " scsi_status = get_completion_status(hcb);\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1233 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1232 msgid "" "Then look if this status is related to the REQUEST SENSE command and if so " "handle it in a simple way." @@ -3515,7 +3500,7 @@ msgstr "" "обработайте его простым способом." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1247 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1246 #, no-wrap msgid "" " if (hcb->flags & DOING_AUTOSENSE) {\n" @@ -3533,8 +3518,7 @@ msgstr "" " if (hcb->flags & DOING_AUTOSENSE) {\n" " if (scsi_status == GOOD) { /* autosense was successful */\n" " hcb->ccb->ccb_h.status |= CAM_AUTOSNS_VALID;\n" -" free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);" -"\n" +" free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_SCSI_STATUS_ERROR);\n" " } else {\n" " autosense_failed:\n" " free_hcb_and_ccb_done(hcb, hcb->ccb, CAM_AUTOSENSE_FAIL);\n" @@ -3544,7 +3528,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1251 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1250 msgid "" "Else the command itself has completed, pay more attention to details. If " "auto-sense is not disabled for this CCB and the command has failed with " @@ -3555,7 +3539,7 @@ msgstr "" "данными состояния, выполните команду REQUEST SENSE для получения этих данных." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1256 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1255 #, no-wrap msgid "" " hcb->ccb->csio.scsi_status = scsi_status;\n" @@ -3565,7 +3549,7 @@ msgstr "" " calculate_residue(hcb);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1273 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1272 #, no-wrap msgid "" " if ((hcb->ccb->ccb_h.flags & CAM_DIS_AUTOSENSE)==0\n" @@ -3603,7 +3587,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1276 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1275 msgid "" "One typical thing would be negotiation events: negotiation messages received " "from a SCSI target (in answer to our negotiation attempt or by target's " @@ -3616,7 +3600,7 @@ msgstr "" "сообщения согласования или не отвечает на них)." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1292 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1291 #, no-wrap msgid "" " switch (hcb_status) {\n" @@ -3648,7 +3632,7 @@ msgstr "" " int wd;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1298 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1297 #, no-wrap msgid "" " wd = get_target_bus_width_request(softc);\n" @@ -3664,7 +3648,7 @@ msgstr "" " softc->goal_bus_width[targ] = neg.bus_width = wd;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1311 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1310 #, no-wrap msgid "" " /* report the event */\n" @@ -3694,7 +3678,7 @@ msgstr "" " int wd;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1315 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1314 #, no-wrap msgid "" " wd = get_target_bus_width_request(softc);\n" @@ -3706,7 +3690,7 @@ msgstr "" " wd = min (wd, softc->user_bus_width[targ]);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1320 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1319 #, no-wrap msgid "" " if (wd != softc->current_bus_width[targ]) {\n" @@ -3720,7 +3704,7 @@ msgstr "" " softc->goal_bus_width[targ] = neg.bus_width = wd;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1330 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1329 #, no-wrap msgid "" " /* report the event */\n" @@ -3744,7 +3728,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1334 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1333 msgid "" "Then we handle any errors that could have happened during auto-sense in the " "same simple-minded way as before. Otherwise we look closer at the details " @@ -3755,7 +3739,7 @@ msgstr "" "мы снова внимательно изучаем детали." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1339 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1338 #, no-wrap msgid "" " if (hcb->flags & DOING_AUTOSENSE)\n" @@ -3765,13 +3749,13 @@ msgstr "" " goto autosense_failed;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1341 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1340 #, no-wrap msgid " switch (hcb_status) {\n" msgstr " switch (hcb_status) {\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1345 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1344 msgid "" "The next event we consider is unexpected disconnect. Which is considered " "normal after an ABORT or BUS DEVICE RESET message and abnormal in other " @@ -3782,7 +3766,7 @@ msgstr "" "аномальным в остальных случаях." #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1361 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1360 #, no-wrap msgid "" " case UNEXPECTED_DISCONNECT:\n" @@ -3814,7 +3798,7 @@ msgstr "" " int lun;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1365 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1364 #, no-wrap msgid "" " /* reset affects all commands on that target, so\n" @@ -3826,7 +3810,7 @@ msgstr "" " */\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1372 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1371 #, no-wrap msgid "" " for (lun=0; lun <= OUR_MAX_SUPPORTED_LUN; lun++)\n" @@ -3844,7 +3828,7 @@ msgstr "" " }\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1375 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1374 #, no-wrap msgid "" " /* send event */\n" @@ -3854,7 +3838,7 @@ msgstr "" " xpt_async(AC_SENT_BDR, hcb->ccb->ccb_h.path_id, NULL);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1386 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1385 #, no-wrap msgid "" " /* this was the CAM_RESET_DEV request itself, it is completed */\n" @@ -3868,8 +3852,7 @@ msgid "" " }\n" " break;\n" msgstr "" -" /* this was the CAM_RESET_DEV request itself, it is completed */" -"\n" +" /* this was the CAM_RESET_DEV request itself, it is completed */\n" " ccb_status = CAM_REQ_CMP;\n" " } else {\n" " calculate_residue(hcb);\n" @@ -3881,7 +3864,7 @@ msgstr "" " break;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1389 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1388 msgid "" "If the target refuses to accept tags we notify CAM about that and return " "back all commands for this LUN:" @@ -3890,7 +3873,7 @@ msgstr "" "возвращаем все команды для этого LUN:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1397 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1396 #, no-wrap msgid "" " case TAGS_REJECTED:\n" @@ -3906,7 +3889,7 @@ msgstr "" " xpt_async(AC_TRANSFER_NEG, hcb->ccb.ccb_h.path_id, &neg);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1403 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1402 #, no-wrap msgid "" " ccb_status = CAM_MSG_REJECT_REC;\n" @@ -3922,7 +3905,7 @@ msgstr "" " break;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1406 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1405 msgid "" "Then we check a number of other conditions, with processing basically " "limited to setting the CCB status:" @@ -3931,7 +3914,7 @@ msgstr "" "ограничивается установкой статуса CCB:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1430 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1429 #, no-wrap msgid "" " case SELECTION_TIMEOUT:\n" @@ -3979,7 +3962,7 @@ msgstr "" " }\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1433 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1432 msgid "" "Then we check if the error was serious enough to freeze the input queue " "until it gets proceeded and do so if it is:" @@ -3988,7 +3971,7 @@ msgstr "" "очередь ввода до её обработки, и если да, то делаем это:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1439 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1438 #, no-wrap msgid "" " if (hcb->ccb->ccb_h.status & CAM_DEV_QFRZN) {\n" @@ -4000,13 +3983,13 @@ msgstr "" " xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1441 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1440 #, no-wrap msgid " /* re-queue all commands for this target/LUN back to CAM */\n" msgstr " /* re-queue all commands for this target/LUN back to CAM */\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1444 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1443 #, no-wrap msgid "" " for (h = softc->first_queued_hcb; h != NULL; h = hh) {\n" @@ -4016,7 +3999,7 @@ msgstr "" " hh = h->next;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1453 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1452 #, no-wrap msgid "" " if (targ == h->targ\n" @@ -4029,8 +4012,7 @@ msgid "" " return;\n" msgstr "" " if (targ == h->targ\n" -" && (lun_to_freeze == CAM_LUN_WILDCARD || lun_to_freeze == " -"h->lun))\n" +" && (lun_to_freeze == CAM_LUN_WILDCARD || lun_to_freeze == h->lun))\n" " free_hcb_and_ccb_done(h, h->ccb, CAM_REQUEUE_REQ);\n" " }\n" " }\n" @@ -4039,7 +4021,7 @@ msgstr "" " return;\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1456 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1455 msgid "" "This concludes the generic interrupt handling although specific controllers " "may require some additions." @@ -4048,13 +4030,13 @@ msgstr "" "контроллеров могут потребоваться дополнительные действия." #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1458 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1457 #, no-wrap msgid "Errors Summary" msgstr "Сводка ошибок" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1464 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1463 msgid "" "When executing an I/O request many things may go wrong. The reason of error " "can be reported in the CCB status with great detail. Examples of use are " @@ -4067,7 +4049,7 @@ msgstr "" "изложения приведём сводку рекомендуемых действий при типичных ошибках:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1467 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1466 msgid "" "_CAM_RESRC_UNAVAIL_ - some resource is temporarily unavailable and the SIM " "driver cannot generate an event when it will become available. An example " @@ -4080,41 +4062,41 @@ msgstr "" "которого контроллер не генерирует прерывание при его доступности." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1468 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1467 msgid "_CAM_UNCOR_PARITY_ - unrecovered parity error occurred" msgstr "_CAM_UNCOR_PARITY_ - произошла неисправимая ошибка чётности" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1469 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1468 msgid "" "_CAM_DATA_RUN_ERR_ - data overrun or unexpected data phase (going in other " "direction than specified in CAM_DIR_MASK) or odd transfer length for wide " "transfer" msgstr "" -"_CAM_DATA_RUN_ERR_ - переполнение данных или неожиданная фаза данных (" -"направление передачи не соответствует указанному в CAM_DIR_MASK) или " +"_CAM_DATA_RUN_ERR_ - переполнение данных или неожиданная фаза данных " +"(направление передачи не соответствует указанному в CAM_DIR_MASK) или " "нечётная длина передачи для широкой передачи" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1470 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1469 msgid "" "_CAM_SEL_TIMEOUT_ - selection timeout occurred (target does not respond)" msgstr "_CAM_SEL_TIMEOUT_ - произошел таймаут выбора (цель не отвечает)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1471 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1470 msgid "_CAM_CMD_TIMEOUT_ - command timeout occurred (the timeout function ran)" msgstr "" "_CAM_CMD_TIMEOUT_ - произошло превышение времени ожидания команды (сработала " "функция таймаута)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1472 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1471 msgid "_CAM_SCSI_STATUS_ERROR_ - the device returned error" msgstr "_CAM_SCSI_STATUS_ERROR_ - устройство вернуло ошибку" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1473 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1472 msgid "" "_CAM_AUTOSENSE_FAIL_ - the device returned error and the REQUEST SENSE " "COMMAND failed" @@ -4123,17 +4105,17 @@ msgstr "" "завершилась неудачно" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1474 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1473 msgid "_CAM_MSG_REJECT_REC_ - MESSAGE REJECT message was received" msgstr "_CAM_MSG_REJECT_REC_ - получено сообщение MESSAGE REJECT" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1475 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1474 msgid "_CAM_SCSI_BUS_RESET_ - received SCSI bus reset" msgstr "_CAM_SCSI_BUS_RESET_ - получен сброс шины SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1476 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1475 msgid "" "_CAM_REQ_CMP_ERR_ - \"impossible\" SCSI phase occurred or something else as " "weird or just a generic error if further detail is not available" @@ -4143,29 +4125,29 @@ msgstr "" "недоступна" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1477 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1476 msgid "_CAM_UNEXP_BUSFREE_ - unexpected disconnect occurred" msgstr "_CAM_UNEXP_BUSFREE_ - произошло неожиданное отключение" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1478 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1477 msgid "_CAM_BDR_SENT_ - BUS DEVICE RESET message was sent to the target" msgstr "" "_CAM_BDR_SENT_ - Сообщение BUS DEVICE RESET было отправлено целевому " "устройству" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1479 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1478 msgid "_CAM_UNREC_HBA_ERROR_ - unrecoverable Host Bus Adapter Error" msgstr "_CAM_UNREC_HBA_ERROR_ - невосстановимая ошибка адаптера шины хоста" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1480 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1479 msgid "_CAM_REQ_TOO_BIG_ - the request was too large for this controller" msgstr "_CAM_REQ_TOO_BIG_ - запрос слишком велик для данного контроллера" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1484 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1483 msgid "" "_CAM_REQUEUE_REQ_ - this request should be re-queued to preserve transaction " "ordering. This typically occurs when the SIM recognizes an error that " @@ -4185,7 +4167,7 @@ msgstr "" "шину, повторно ставятся в очередь." #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1485 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1484 msgid "" "_CAM_LUN_INVALID_ - the LUN ID in the request is not supported by the SCSI " "controller" @@ -4194,7 +4176,7 @@ msgstr "" "контроллером SCSI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1486 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1485 msgid "" "_CAM_TID_INVALID_ - the target ID in the request is not supported by the " "SCSI controller" @@ -4203,13 +4185,13 @@ msgstr "" "поддерживается контроллером SCSI" #. type: Title == -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1488 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1487 #, no-wrap msgid "Timeout Handling" msgstr "Обработка таймаутов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1496 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1495 msgid "" "When the timeout for an HCB expires that request should be aborted, just " "like with an XPT_ABORT request. The only difference is that the returned " @@ -4234,7 +4216,7 @@ msgstr "" "будет выглядеть следующим образом:" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1505 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1504 #, no-wrap msgid "" "static void\n" @@ -4252,7 +4234,7 @@ msgstr "" " struct ccb_hdr *ccb_h;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1508 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1507 #, no-wrap msgid "" " softc = hcb->softc;\n" @@ -4262,7 +4244,7 @@ msgstr "" " ccb_h = &hcb->ccb->ccb_h;\n" #. type: delimited block . 4 -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1515 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1514 #, no-wrap msgid "" " if (hcb->flags & HCB_BEING_ABORTED || ccb_h->func_code == XPT_RESET_DEV) {\n" @@ -4272,8 +4254,7 @@ msgid "" " }\n" "}\n" msgstr "" -" if (hcb->flags & HCB_BEING_ABORTED || ccb_h->func_code == XPT_RESET_DEV) " -"{\n" +" if (hcb->flags & HCB_BEING_ABORTED || ccb_h->func_code == XPT_RESET_DEV) {\n" " xxx_reset_bus(softc);\n" " } else {\n" " xxx_abort_ccb(hcb->ccb, CAM_CMD_TIMEOUT);\n" @@ -4281,7 +4262,7 @@ msgstr "" "}\n" #. type: Plain text -#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1520 +#: documentation/content/en/books/arch-handbook/scsi/_index.adoc:1519 msgid "" "When we abort a request all the other disconnected requests to the same " "target/LUN get aborted too. So there appears a question, should we return " @@ -4290,7 +4271,7 @@ msgid "" "then probably something really bad is happening to the device, so if they " "would not be disturbed they would time out by themselves." msgstr "" -"Когда мы прерываем запрос, все остальные отключенные запросы к тому же " +"Когда мы прерываем запрос, все остальные отключённые запросы к тому же " "целевому устройству/LUN также прерываются. Возникает вопрос: следует ли " "возвращать их со статусом CAM_REQ_ABORTED или CAM_CMD_TIMEOUT? Текущие " "драйверы используют CAM_CMD_TIMEOUT. Это кажется логичным, потому что если " diff --git a/documentation/content/ru/books/arch-handbook/smp/_index.adoc b/documentation/content/ru/books/arch-handbook/smp/_index.adoc index 2b57d853f6..bf16c717fc 100644 --- a/documentation/content/ru/books/arch-handbook/smp/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/smp/_index.adoc @@ -172,7 +172,7 @@ endif::[] Фреймворк TrustedBSD MAC поддерживает данные в различных объектах ядра в виде `struct label`. Как правило, метки в объектах ядра защищаются тем же механизмом блокировки, что и остальная часть объекта ядра. Например, метка `v_label` в `struct vnode` защищается блокировкой vnode. -В дополнение к меткам, поддерживаемым в стандартных объектах ядра, MAC Framework также поддерживает список зарегистрированных и активных политик. Список политик защищен глобальной мьютекс-блокировкой (`mac_policy_list_lock`) и счетчиком использования (также защищенным мьютексом). Поскольку множество проверок контроля доступа может выполняться параллельно, вход в framework для доступа только на чтение к списку политик требует удержания мьютекса во время увеличения (и последующего уменьшения) счетчика использования. Мьютекс не обязательно удерживать на протяжении всей операции входа в MAC — некоторые операции, такие как операции с метками на объектах файловой системы, выполняются длительное время. Для изменения списка политик, например во время регистрации и отмены регистрации политик, мьютекс должен быть удержан, а счетчик ссылок должен быть равен нулю, чтобы предотвратить изменение списка во время его использования. +В дополнение к меткам, поддерживаемым в стандартных объектах ядра, MAC Framework также поддерживает список зарегистрированных и активных политик. Список политик защищен глобальной мьютекс-блокировкой (`mac_policy_list_lock`) и счетчиком использования (также защищённым мьютексом). Поскольку множество проверок контроля доступа может выполняться параллельно, вход в framework для доступа только на чтение к списку политик требует удержания мьютекса во время увеличения (и последующего уменьшения) счетчика использования. Мьютекс не обязательно удерживать на протяжении всей операции входа в MAC — некоторые операции, такие как операции с метками на объектах файловой системы, выполняются длительное время. Для изменения списка политик, например во время регистрации и отмены регистрации политик, мьютекс должен быть удержан, а счетчик ссылок должен быть равен нулю, чтобы предотвратить изменение списка во время его использования. Условная переменная `mac_policy_list_not_busy` доступна для потоков, которым необходимо дождаться освобождения списка, но ожидание на этой условной переменной допустимо только если вызывающий поток не удерживает других блокировок, иначе может возникнуть нарушение порядка блокировок. Фактически, счетчик занятости действует как форма разделяемой/исключающей блокировки доступа к фреймворку: отличие в том, что, в отличие от sx-блокировки, потребители, ожидающие освобождения списка, могут подвергаться голоданию, вместо того чтобы допускать проблемы порядка блокировок в отношении счетчика занятости и других блокировок, которые могут удерживаться при входе в (или внутри) MAC Framework. diff --git a/documentation/content/ru/books/arch-handbook/smp/_index.po b/documentation/content/ru/books/arch-handbook/smp/_index.po index 8eed7ab72a..ff21582e93 100644 --- a/documentation/content/ru/books/arch-handbook/smp/_index.po +++ b/documentation/content/ru/books/arch-handbook/smp/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" -"PO-Revision-Date: 2026-03-08 09:11+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbooksmp_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: Title = @@ -32,13 +32,13 @@ msgid "Chapter 8. SMPng Design Document" msgstr "Глава 8. Документ по архитектуре SMPng" #. type: Title == -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:52 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:51 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:55 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:54 msgid "" "This document presents the current design and implementation of the SMPng " "Architecture. First, the basic primitives and tools are introduced. Next, a " @@ -60,7 +60,7 @@ msgstr "" "последствиях использования конкретных примитивов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:57 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:56 msgid "" "This document is a work-in-progress, and will be updated to reflect on-going " "design and implementation activities associated with the SMPng Project. Many " @@ -75,7 +75,7 @@ msgstr "" "по документу могут быть направлены редакторам документа." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:63 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:62 msgid "" "The goal of SMPng is to allow concurrency in the kernel. The kernel is " "basically one rather large and complex program. To make the kernel multi-" @@ -93,19 +93,19 @@ msgstr "" "SMP, см. раздел crossref:smp[smp-glossary, Глоссарий] в этой статье." #. type: Title == -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:65 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:64 #, no-wrap msgid "Basic Tools and Locking Fundamentals" msgstr "Основные инструменты и основы блокировки" #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:67 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:66 #, no-wrap msgid "Atomic Instructions and Memory Barriers" msgstr "Атомарные инструкции и барьеры памяти" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:70 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:69 msgid "" "There are several existing treatments of memory barriers and atomic " "instructions, so this section will not include a lot of detail. To put it " @@ -140,7 +140,7 @@ msgstr "" "которые могут потребоваться согласно барьерам памяти." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:72 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:71 msgid "" "For example, assuming a simple model where data is considered visible when " "it is in main memory (or a global cache), when an atomic instruction is " @@ -155,7 +155,7 @@ msgstr "" "кэша вместе с любыми ожидающими операциями за барьером памяти." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:74 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:73 msgid "" "This requires one to take special care when using an item protected by " "atomic instructions. For example, in the sleep mutex implementation, we have " @@ -181,7 +181,7 @@ msgstr "" "значение, на котором мы приняли решение, актуально и действительно." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:76 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:75 msgid "" "Finally, atomic instructions only allow one item to be updated or read. If " "one needs to atomically update several items, then a lock must be used " @@ -197,13 +197,13 @@ msgstr "" "инструкциями." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:77 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:76 #, no-wrap msgid "Read Locks Versus Write Locks" msgstr "Блокировки на чтение и блокировки на запись" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:80 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:79 msgid "" "Read locks do not need to be as strong as write locks. Both types of locks " "need to ensure that the data they are accessing is not stale. However, only " @@ -219,7 +219,7 @@ msgstr "" "способами." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:82 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:81 msgid "" "First, sx locks can be used in this manner by using an exclusive lock when " "writing and a shared lock when reading. This method is quite straightforward." @@ -229,7 +229,7 @@ msgstr "" "достаточно прост." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:84 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:83 msgid "" "A second method is a bit more obscure. You can protect a datum with multiple " "locks. Then for reading that data you simply need to have a read lock of one " @@ -259,13 +259,13 @@ msgstr "" "выполнении действий, основанных на этой проверке." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:85 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:84 #, no-wrap msgid "Locking Conditions and Results" msgstr "Условия и результаты блокировки" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:88 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:87 msgid "" "If you need a lock to check the state of a variable so that you can take an " "action based on the state you read, you can not just hold the lock while " @@ -284,19 +284,19 @@ msgstr "" "проверки." #. type: Title == -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:90 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:89 #, no-wrap msgid "General Architecture and Design" msgstr "Общая архитектура и дизайн" #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:92 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:91 #, no-wrap msgid "Interrupt Handling" msgstr "Обработка прерываний" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:95 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:94 msgid "" "Following the pattern of several other multi-threaded UNIX(R) kernels, " "FreeBSD deals with interrupt handlers by giving them their own thread " @@ -319,7 +319,7 @@ msgstr "" "допускающие сон, чтобы не лишать ресурсов другие обработчики прерываний." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:97 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:96 msgid "" "The interrupt threads currently in FreeBSD are referred to as heavyweight " "interrupt threads. They are called this because switching to an interrupt " @@ -337,7 +337,7 @@ msgstr "" "пространство, прежде чем у них появится возможность выполниться." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:99 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:98 msgid "" "To deal with the latency problems, the kernel in FreeBSD has been made " "preemptive. Currently, we only preempt a kernel thread when we release a " @@ -350,7 +350,7 @@ msgstr "" "полностью вытесняющим, как описано ниже." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:101 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:100 msgid "" "Not all interrupt handlers execute in a thread context. Instead, some " "handlers execute directly in primary interrupt context. These interrupt " @@ -373,7 +373,7 @@ msgstr "" "могут использовать только спин-мьютексы." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:103 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:102 msgid "" "Finally, there is one optional optimization that can be added in MD code " "called lightweight context switches. Since an interrupt thread executes in a " @@ -401,7 +401,7 @@ msgstr "" "собственный контекст. Таким образом, он может освободить прерванный поток." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:105 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:104 msgid "" "The cons of this optimization are that they are very machine specific and " "complex and thus only worth the effort if their is a large performance " @@ -421,7 +421,7 @@ msgstr "" "прерываний, который работает следующим образом:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:107 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:106 msgid "" "Each interrupt handler has two parts: a predicate which runs in primary " "interrupt context and a handler which runs in its own thread context." @@ -431,7 +431,7 @@ msgstr "" "выполняется в контексте собственного потока." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:108 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:107 msgid "" "If an interrupt handler has a predicate, then when an interrupt is " "triggered, the predicate is run. If the predicate returns true then the " @@ -446,7 +446,7 @@ msgstr "" "планирует запуск обработчика в контексте собственного потока." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:110 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:109 msgid "" "Fitting light weight context switches into this scheme might prove rather " "complicated. Since we may want to change to this scheme at some point in the " @@ -462,19 +462,19 @@ msgstr "" "могут (или не могут) в неё вписаться." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:111 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:110 #, no-wrap msgid "Kernel Preemption and Critical Sections" msgstr "Ядро с вытеснением и критические секции" #. type: Title ==== -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:113 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:112 #, no-wrap msgid "Kernel Preemption in a Nutshell" msgstr "Ядро и вытеснение вкратце" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:116 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:115 msgid "" "Kernel preemption is fairly simple. The basic idea is that a CPU should " "always be doing the highest priority work available. Well, that is the ideal " @@ -487,7 +487,7 @@ msgstr "" "достижение идеала не стоят совершенства." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:118 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:117 msgid "" "Implementing full kernel preemption is very straightforward: when you " "schedule a thread to be executed by putting it on a run queue, you check to " @@ -500,7 +500,7 @@ msgstr "" "потока. Если да, вы инициируете переключение контекста на этот поток." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:120 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:119 msgid "" "While locks can protect most data in the case of a preemption, not all of " "the kernel is preemption safe. For example, if a thread holding a spin mutex " @@ -522,13 +522,13 @@ msgstr "" "отключается с использованием критической секции." #. type: Title ==== -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:121 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:120 #, no-wrap msgid "Critical Sections" msgstr "Критические Секции" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:124 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:123 msgid "" "The responsibility of the critical section API is to prevent context " "switches inside of a critical section. With a fully preemptive kernel, every " @@ -545,10 +545,10 @@ msgstr "" "Ответственность API критической секции заключается в предотвращении " "переключения контекста внутри критической секции. В полностью вытесняющем " "ядре каждый вызов `setrunqueue` для потока, отличного от текущего, является " -"точкой вытеснения. Одна из реализаций заключается в том, что `critical_enter`" -" устанавливает флаг для каждого потока, который сбрасывается его парной " -"функцией. Если `setrunqueue` вызывается, когда этот флаг установлен, " -"вытеснение не происходит, независимо от приоритета нового потока " +"точкой вытеснения. Одна из реализаций заключается в том, что " +"`critical_enter` устанавливает флаг для каждого потока, который сбрасывается " +"его парной функцией. Если `setrunqueue` вызывается, когда этот флаг " +"установлен, вытеснение не происходит, независимо от приоритета нового потока " "относительно текущего. Однако, поскольку критические секции используются в " "спин-блокировках для предотвращения переключения контекста и может быть " "захвачено несколько спин-блокировок, API критической секции должен " @@ -556,7 +556,7 @@ msgstr "" "счетчик вложенности вместо одиночного флага для каждого потока." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:126 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:125 msgid "" "In order to minimize latency, preemptions inside of a critical section are " "deferred rather than dropped. If a thread that would normally be preempted " @@ -575,7 +575,7 @@ msgstr "" "позволить выполниться потоку с более высоким приоритетом." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:128 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:127 msgid "" "Interrupts pose a problem with regards to spin mutexes. If a low-level " "interrupt handler needs a lock, it needs to not interrupt any code needing " @@ -608,13 +608,13 @@ msgstr "" "потребуется переименовать, чтобы показать, что это отдельный API." #. type: Title ==== -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:129 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:128 #, no-wrap msgid "Design Tradeoffs" msgstr "Компромиссы проектирования" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:132 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:131 msgid "" "As mentioned earlier, a couple of trade-offs have been made to sacrifice " "cases where perfect preemption may not always provide the best performance." @@ -624,7 +624,7 @@ msgstr "" "обеспечивает наилучшую производительность." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:134 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:133 msgid "" "The first trade-off is that the preemption code does not take other CPUs " "into account. Suppose we have a two CPU's A and B with the priority of A's " @@ -652,7 +652,7 @@ msgstr "" "поток с приоритетом 2." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:136 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:135 msgid "" "The second trade-off limits immediate kernel preemption to real-time " "priority kernel threads. In the simple case of preemption defined above, a " @@ -689,7 +689,7 @@ msgstr "" "поток с более высоким приоритетом имеет приоритет реального времени." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:138 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:137 msgid "" "Turning on full kernel preemption for all kernel threads has value as a " "debugging aid since it exposes more race conditions. It is especially useful " @@ -705,13 +705,13 @@ msgstr "" "может использоваться для целей отладки." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:139 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:138 #, no-wrap msgid "Thread Migration" msgstr "Миграция потоков" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:142 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:141 msgid "" "Simply put, a thread migrates when it moves from one CPU to another. In a " "non-preemptive kernel this can only happen at well-defined points such as " @@ -737,7 +737,7 @@ msgstr "" "данных, специфичных для CPU." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:144 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:143 msgid "" "Critical sections currently prevent migration since they do not allow " "context switches. However, this may be too strong of a requirement to " @@ -754,7 +754,7 @@ msgstr "" "будет вытеснен, он не должен мигрировать на другой CPU." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:146 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:145 msgid "" "This API is known as thread pinning and is provided by the scheduler. The " "API consists of two functions: `sched_pin` and `sched_unpin`. These " @@ -789,13 +789,13 @@ msgstr "" "определённому CPU следует использовать функции `sched_bind` и `sched_unbind`." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:147 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:146 #, no-wrap msgid "Callouts" msgstr "Обратные вызовы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:150 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:149 msgid "" "The `timeout` kernel facility permits kernel services to register functions " "for execution as part of the `softclock` software interrupt. Events are " @@ -808,7 +808,7 @@ msgstr "" "потребителем функции будут происходить приблизительно в нужное время." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:152 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:151 msgid "" "The global list of pending timeout events is protected by a global spin " "mutex, `callout_lock`; all access to the timeout list must be performed with " @@ -838,19 +838,19 @@ msgstr "" "оно превышает пороговое значение, генерируется предупреждение." #. type: Title == -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:154 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:153 #, no-wrap msgid "Specific Locking Strategies" msgstr "Конкретные стратегии блокировки" #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:156 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:155 #, no-wrap msgid "Credentials" msgstr "Учётные данные" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:159 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:158 msgid "" "`struct ucred` is the kernel's internal credential structure, and is " "generally used as the basis for process-driven access control within the " @@ -866,20 +866,20 @@ msgid "" msgstr "" "`struct ucred` — это внутренняя структура учётных данных ядра, которая " "обычно используется в качестве основы для управления доступом на уровне " -"процессов внутри ядра. Системы, производные от BSD, используют модель «" -"копирования при записи» для учётных данных: могут существовать множественные " -"ссылки на структуру учётных данных, и когда требуется внести изменение, " -"структура дублируется, изменяется, а затем ссылка заменяется. Благодаря " -"широко распространённому кэшированию учётных данных для реализации контроля " -"доступа при открытии, это приводит к значительной экономии памяти. С " -"переходом на детализированную SMP (симметричную многопроцессорность), эта " +"процессов внутри ядра. Системы, производные от BSD, используют модель " +"«копирования при записи» для учётных данных: могут существовать " +"множественные ссылки на структуру учётных данных, и когда требуется внести " +"изменение, структура дублируется, изменяется, а затем ссылка заменяется. " +"Благодаря широко распространённому кэшированию учётных данных для реализации " +"контроля доступа при открытии, это приводит к значительной экономии памяти. " +"С переходом на детализированную SMP (симметричную многопроцессорность), эта " "модель также существенно экономит на операциях блокировки, требуя, чтобы " "модификации выполнялись только для неразделяемых учётных данных, избегая " "необходимости явной синхронизации при использовании известных разделяемых " "учётных данных." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:161 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:160 msgid "" "Credential structures with a single reference are considered mutable; shared " "credential structures must not be modified or a race condition is risked. A " @@ -890,13 +890,14 @@ msgid "" msgstr "" "Структуры учётных данных с единственной ссылкой считаются изменяемыми; " "разделяемые структуры учётных данных не должны изменяться, иначе возникает " -"риск состояния гонки. Мьютекс `cr_mtxp` защищает счетчик ссылок структуры `" -"struct ucred` для поддержания согласованности. Любое использование структуры " -"требует действительной ссылки на протяжении всего времени использования, " -"иначе структура может быть освобождена из-под нелегитимного потребителя." +"риск состояния гонки. Мьютекс `cr_mtxp` защищает счетчик ссылок структуры " +"`struct ucred` для поддержания согласованности. Любое использование " +"структуры требует действительной ссылки на протяжении всего времени " +"использования, иначе структура может быть освобождена из-под нелегитимного " +"потребителя." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:163 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:162 msgid "" "The `struct ucred` mutex is a leaf mutex and is implemented via a mutex pool " "for performance reasons." @@ -905,7 +906,7 @@ msgstr "" "мьютексов по соображениям производительности." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:165 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:164 msgid "" "Usually, credentials are used in a read-only manner for access control " "decisions, and in this case `td_ucred` is generally preferred because it " @@ -924,7 +925,7 @@ msgstr "" "использования." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:167 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:166 msgid "" "If system call invocations will perform access control after an update to " "the process credential, the value of `td_ucred` must also be refreshed to " @@ -943,24 +944,24 @@ msgstr "" "данные для контроля доступа в ядре." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:168 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:167 #, no-wrap msgid "File Descriptors and File Descriptor Tables" msgstr "Дескрипторы файлов и таблицы дескрипторов файлов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:171 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:170 msgid "Details to follow." msgstr "Подробности будут позже." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:172 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:171 #, no-wrap msgid "Jail Structures" msgstr "Структуры клеток" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:175 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:174 msgid "" "`struct prison` stores administrative details pertinent to the maintenance " "of jails created using the man:jail[2] API. This includes the per-jail " @@ -981,17 +982,17 @@ msgstr "" "счётчика ссылок и всех изменяемых переменных внутри `struct jail`. Некоторые " "переменные устанавливаются только при создании клетки, и действительной " "ссылки на `struct prison` достаточно для чтения этих значений. Точная " -"блокировка каждой записи документирована в комментариях файла [.filename]#" -"sys/jail.h#." +"блокировка каждой записи документирована в комментариях файла [." +"filename]#sys/jail.h#." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:176 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:175 #, no-wrap msgid "MAC Framework" msgstr "MAC Framework" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:179 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:178 msgid "" "The TrustedBSD MAC Framework maintains data in a variety of kernel objects, " "in the form of `struct label`. In general, labels in kernel objects are " @@ -1005,7 +1006,7 @@ msgstr "" "`v_label` в `struct vnode` защищается блокировкой vnode." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:181 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:180 msgid "" "In addition to labels maintained in standard kernel objects, the MAC " "Framework also maintains a list of registered and active policies. The " @@ -1023,7 +1024,7 @@ msgstr "" "В дополнение к меткам, поддерживаемым в стандартных объектах ядра, MAC " "Framework также поддерживает список зарегистрированных и активных политик. " "Список политик защищен глобальной мьютекс-блокировкой " -"(`mac_policy_list_lock`) и счетчиком использования (также защищенным " +"(`mac_policy_list_lock`) и счетчиком использования (также защищённым " "мьютексом). Поскольку множество проверок контроля доступа может выполняться " "параллельно, вход в framework для доступа только на чтение к списку политик " "требует удержания мьютекса во время увеличения (и последующего уменьшения) " @@ -1035,7 +1036,7 @@ msgstr "" "предотвратить изменение списка во время его использования." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:183 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:182 msgid "" "A condition variable, `mac_policy_list_not_busy`, is available to threads " "that need to wait for the list to become unbusy, but this condition variable " @@ -1059,13 +1060,13 @@ msgstr "" "внутри) MAC Framework." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:184 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:183 #, no-wrap msgid "Modules" msgstr "Модули" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:187 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:186 msgid "" "For the module subsystem there exists a single lock that is used to protect " "the shared data. This lock is a shared/exclusive (SX) lock and has a good " @@ -1088,17 +1089,17 @@ msgstr "" "изучить соответствующий исходный код в [.filename]#kern/kern_module.c#." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:188 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:187 #, no-wrap msgid "Newbus Device Tree" msgstr "Дерево устройств Newbus" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:191 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:190 msgid "" "The newbus system will have one sx lock. Readers will hold a shared (read) " -"lock (man:sx_slock[9]) and writers will hold an exclusive (write) lock " -"(man:sx_xlock[9]). Internal functions will not do locking at all. Externally " +"lock (man:sx_slock[9]) and writers will hold an exclusive (write) lock (man:" +"sx_xlock[9]). Internal functions will not do locking at all. Externally " "visible ones will lock as needed. Those items that do not matter if the race " "is won or lost will not be locked, since they tend to be read all over the " "place (e.g., man:device_get_softc[9]). There will be relatively few changes " @@ -1117,35 +1118,35 @@ msgstr "" "производительности." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:192 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:191 #, no-wrap msgid "Pipes" msgstr "Каналы (pipe)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:195 -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:217 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:194 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:216 msgid "..." msgstr "..." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:196 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:195 #, no-wrap msgid "Processes and Threads" msgstr "Процессы и потоки" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:199 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:198 msgid "process hierarchy" msgstr "иерархия процессов" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:201 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:200 msgid "proc locks, references" msgstr "блокировки и ссылки proc" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:203 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:202 msgid "" "thread-specific copies of proc entries to freeze during system calls, " "including td_ucred" @@ -1154,23 +1155,23 @@ msgstr "" "вызовов, включая td_ucred" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:205 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:204 msgid "inter-process operations" msgstr "межпроцессные операции" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:207 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:206 msgid "process groups and sessions" msgstr "группы процессов и сеансы" #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:208 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:207 #, no-wrap msgid "Scheduler" msgstr "Планировщик" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:211 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:210 msgid "" "Lots of references to `sched_lock` and notes pointing at specific primitives " "and related magic elsewhere in the document." @@ -1179,13 +1180,13 @@ msgstr "" "примитивы и связанные с ними особенности в других частях документа." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:212 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:211 #, no-wrap msgid "Select and Poll" msgstr "Select и Poll" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:215 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:214 msgid "" "The `select` and `poll` functions permit threads to block waiting on events " "on file descriptors--most frequently, whether or not the file descriptors " @@ -1196,13 +1197,13 @@ msgstr "" "чтения или записи." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:218 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:217 #, no-wrap msgid "SIGIO" msgstr "SIGIO" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:221 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:220 msgid "" "The SIGIO service permits processes to request the delivery of a SIGIO " "signal to its process group when the read/write status of specified file " @@ -1221,14 +1222,14 @@ msgstr "" "зарегистрироваться для получения SIGIO от любого заданного объекта ядра, и " "такой процесс или группа называется владельцем. Каждый объект, " "поддерживающий регистрацию SIGIO, содержит поле-указатель, которое имеет " -"значение `NULL`, если объект не зарегистрирован, или указывает на структуру `" -"struct sigio`, описывающую регистрацию. Это поле защищено глобальным " +"значение `NULL`, если объект не зарегистрирован, или указывает на структуру " +"`struct sigio`, описывающую регистрацию. Это поле защищено глобальным " "мьютексом `sigio_lock`. Вызывающие функции обслуживания SIGIO должны " "передавать это поле «по ссылке», чтобы локальные копии регистра не " "создавались без защиты блокировкой." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:223 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:222 msgid "" "One `struct sigio` is allocated for each registered object associated with " "any process or process group, and contains back-pointers to the object, " @@ -1265,13 +1266,13 @@ msgstr "" "дескриптора на канал во время операции с каналом." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:224 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:223 #, no-wrap msgid "Sysctl" msgstr "Sysctl" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:227 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:226 msgid "" "The `sysctl` MIB service is invoked from both within the kernel and from " "userland applications using a system call. At least two issues are raised in " @@ -1299,7 +1300,7 @@ msgstr "" "изменения в блокировках и семантике `sysctl`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:229 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:228 msgid "" "Need to change the order of operations for sysctl's that update values from " "read old, copyin and copyout, write new to copyin, lock, read old and write " @@ -1317,7 +1318,7 @@ msgstr "" "операций блокировки." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:231 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:230 msgid "" "To allow for the common case, a sysctl could embed a pointer to a mutex in " "the SYSCTL_FOO macros and in the struct. This would work for most sysctl's. " @@ -1333,13 +1334,13 @@ msgstr "" "блокировки." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:232 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:231 #, no-wrap msgid "Taskqueue" msgstr "Очередь задач" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:235 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:234 msgid "" "The taskqueue's interface has two basic locks associated with it in order to " "protect the related shared data. The `taskqueue_queues_mutex` is meant to " @@ -1348,8 +1349,8 @@ msgid "" "structure. The use of the synchronization primitive here is to protect the " "integrity of the data in the `struct taskqueue`. It should be noted that " "there are no separate macros to assist the user in locking down his/her own " -"work since these locks are most likely not going to be used outside of " -"[.filename]#kern/subr_taskqueue.c#." +"work since these locks are most likely not going to be used outside of [." +"filename]#kern/subr_taskqueue.c#." msgstr "" "Интерфейс `taskqueue` имеет две основные блокировки, связанные с ним, для " "защиты соответствующих общих данных. Мьютекс `taskqueue_queues_mutex` " @@ -1362,19 +1363,19 @@ msgstr "" "пределами [.filename]#kern/subr_taskqueue.c#." #. type: Title == -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:237 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:236 #, no-wrap msgid "Implementation Notes" msgstr "Заметки о реализации" #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:239 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:238 #, no-wrap msgid "Sleep Queues" msgstr "Очереди сна" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:242 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:241 msgid "" "A sleep queue is a structure that holds the list of threads asleep on a wait " "channel. Each thread that is not asleep on a wait channel carries a sleep " @@ -1389,7 +1390,7 @@ msgstr "" "каналу. Очереди сна, связанные с каналом ожидания, хранятся в хеш-таблице." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:244 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:243 msgid "" "The sleep queue hash table holds sleep queues for wait channels that have at " "least one blocked thread. Each entry in the hash table is called a " @@ -1422,7 +1423,7 @@ msgstr "" "очереди сна, чем та, с которой он в неё попал." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:246 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:245 msgid "" "The `sleepq_lock` function locks the spin mutex of the sleep queue chain " "that maps to a specific wait channel. The `sleepq_lookup` function looks in " @@ -1439,7 +1440,7 @@ msgstr "" "заданным каналом ожидания." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:248 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:247 msgid "" "A thread is added to a sleep queue via the `sleepq_add`. This function " "accepts the wait channel, a pointer to the mutex that protects the wait " @@ -1477,7 +1478,7 @@ msgstr "" "очереди ожидания с помощью одной из функций ожидания." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:250 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:249 msgid "" "A timeout for a sleep is set by invoking `sleepq_set_timeout`. The function " "accepts the wait channel and the timeout time as a relative tick count as " @@ -1496,7 +1497,7 @@ msgstr "" "номер сигнала; в противном случае она вернёт 0." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:252 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:251 msgid "" "Once a thread has been added to a sleep queue, it blocks using one of the " "`sleepq_wait` functions. There are four wait functions depending on whether " @@ -1524,16 +1525,16 @@ msgstr "" "пробуждения. Функция `sleepq_timedwait` ожидает, пока поток не будет явно " "возобновлён или пока не истечёт таймаут, установленный предыдущим вызовом " "`sleepq_set_timeout`. Функция `sleepq_wait_sig` ожидает, пока поток не будет " -"явно возобновлён или его сон не будет прерван. Функция `sleepq_timedwait_sig`" -" ожидает, пока поток не будет явно возобновлён, не истечёт таймаут, " -"установленный предыдущим вызовом `sleepq_set_timeout`, или сон потока не " -"будет прерван. Все функции ожидания принимают канал ожидания в качестве " -"первого параметра. Кроме того, функция `sleepq_timedwait_sig` принимает " -"второй логический параметр, указывающий, обнаружил ли предыдущий вызов " -"`sleepq_catch_signals` ожидающий сигнал." +"явно возобновлён или его сон не будет прерван. Функция " +"`sleepq_timedwait_sig` ожидает, пока поток не будет явно возобновлён, не " +"истечёт таймаут, установленный предыдущим вызовом `sleepq_set_timeout`, или " +"сон потока не будет прерван. Все функции ожидания принимают канал ожидания в " +"качестве первого параметра. Кроме того, функция `sleepq_timedwait_sig` " +"принимает второй логический параметр, указывающий, обнаружил ли предыдущий " +"вызов `sleepq_catch_signals` ожидающий сигнал." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:254 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:253 msgid "" "If the thread is explicitly resumed or is aborted by a signal, then a value " "of zero is returned by the wait function to indicate a successful sleep. If " @@ -1567,7 +1568,7 @@ msgstr "" "`sleepq_calc_signal_retval`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:256 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:255 msgid "" "Threads asleep on a wait channel are explicitly resumed by the " "`sleepq_broadcast` and `sleepq_signal` functions. Both functions accept the " @@ -1603,7 +1604,7 @@ msgstr "" "функции `sleepq_lock`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:258 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:257 msgid "" "A sleeping thread may have its sleep interrupted by calling the " "`sleepq_abort` function. This function must be called with `sched_lock` held " @@ -1624,34 +1625,34 @@ msgstr "" "для другого канала ожидания, эта функция ничего не делает." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:259 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:258 #, no-wrap msgid "Turnstiles" msgstr "Турникеты" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:262 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:261 msgid "Compare/contrast with sleep queues." msgstr "Сравнение/сопоставление с очередями сна." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:264 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:263 msgid "Lookup/wait/release. - Describe TDF_TSNOBLOCK race." msgstr "Поиск/ожидание/освобождение. - Описать состояние гонки TDF_TSNOBLOCK." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:266 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:265 msgid "Priority propagation." msgstr "Приоритетное распространение." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:267 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:266 #, no-wrap msgid "Details of the Mutex Implementation" msgstr "Подробности реализации мьютекса" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:270 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:269 msgid "" "Should we require mutexes to be owned for mtx_destroy() since we can not " "safely assert that they are unowned by anyone else otherwise?" @@ -1660,29 +1661,29 @@ msgstr "" "иначе мы не можем безопасно утверждать, что они не принадлежат кому-либо ещё?" #. type: Title ==== -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:271 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:270 #, no-wrap msgid "Spin Mutexes" msgstr "Вращающиеся мьютексы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:274 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:273 msgid "Use a critical section..." msgstr "Использование критической секции..." #. type: Title ==== -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:275 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:274 #, no-wrap msgid "Sleep Mutexes" msgstr "Мьютексы сна (Sleep Mutexes)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:278 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:277 msgid "Describe the races with contested mutexes" msgstr "Опишите гонки с оспариваемыми мьютексами" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:280 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:279 msgid "" "Why it is safe to read mtx_lock of a contested mutex when holding the " "turnstile chain lock." @@ -1691,79 +1692,79 @@ msgstr "" "блокировки цепочки турникета." #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:281 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:280 #, no-wrap msgid "Witness" msgstr "Witness" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:284 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:283 msgid "What does it do" msgstr "Что это делает" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:286 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:285 msgid "How does it work" msgstr "Как это работает" #. type: Title == -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:288 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:287 #, no-wrap msgid "Miscellaneous Topics" msgstr "Разные темы" #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:290 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:289 #, no-wrap msgid "Interrupt Source and ICU Abstractions" msgstr "Источники прерываний и абстракции ICU" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:293 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:292 msgid "struct isrc" msgstr "struct isrc" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:295 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:294 msgid "pic drivers" msgstr "pic драйверы" #. type: Title === -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:296 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:295 #, no-wrap msgid "Other Random Questions/Topics" msgstr "Другие случайные вопросы/темы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:299 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:298 msgid "Should we pass an interlock into `sema_wait`?" msgstr "Передавать ли блокировку в `sema_wait`?" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:301 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:300 msgid "Should we have non-sleepable sx locks?" msgstr "Должны ли мы иметь sx блокировки без возможности сна?" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:303 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:302 msgid "Add some info about proper use of reference counts." msgstr "" "Добавить некоторую информацию о правильном использовании счетчиков ссылок." #. type: Title == -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:308 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:307 #, no-wrap msgid "Glossary" msgstr "Глоссарий" #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:311 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:310 #, no-wrap msgid "atomic" msgstr "atomic (атомарный)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:313 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:312 msgid "" "An operation is atomic if all of its effects are visible to other CPUs " "together when the proper access protocol is followed. In the degenerate case " @@ -1781,18 +1782,18 @@ msgstr "" "операций." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:315 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:314 msgid "See Also operation." msgstr "См. также operation (операция)." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:316 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:315 #, no-wrap msgid "block" msgstr "block (блокировать)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:318 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:317 msgid "" "A thread is blocked when it is waiting on a lock, resource, or condition. " "Unfortunately this term is a bit overloaded as a result." @@ -1801,19 +1802,19 @@ msgstr "" "сожалению, этот термин в результате немного перегружен." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:320 -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:357 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:319 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:356 msgid "See Also sleep." msgstr "См. также sleep (спать)." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:321 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:320 #, no-wrap msgid "critical section" msgstr "critical section (критическая секция)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:323 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:322 msgid "" "A section of code that is not allowed to be preempted. A critical section is " "entered and exited using the man:critical_enter[9] API." @@ -1822,67 +1823,67 @@ msgstr "" "и завершается с использованием API man:critical_enter[9]." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:324 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:323 #, no-wrap msgid "MD" msgstr "MD" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:326 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:325 msgid "Machine dependent." msgstr "Машинозависимый (machine dependent)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:328 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:327 msgid "See Also MI." msgstr "Смотри также MI." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:329 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:328 #, no-wrap msgid "memory operation" msgstr "memory operation (операция с памятью)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:331 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:330 msgid "A memory operation reads and/or writes to a memory location." msgstr "Операция с памятью выполняет чтение и/или запись в ячейку памяти." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:332 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:331 #, no-wrap msgid "MI" msgstr "MI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:334 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:333 msgid "Machine independent." msgstr "Машинонезависимый (machine independent)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:336 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:335 msgid "See Also MD." msgstr "См. также MD." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:337 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:336 #, no-wrap msgid "operation" msgstr "operation (операция)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:339 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:338 msgid "See memory operation." msgstr "См. memory operation (операция с памятью)." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:340 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:339 #, no-wrap msgid "primary interrupt context" msgstr "primary interrupt context (основной контекст прерывания)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:342 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:341 msgid "" "Primary interrupt context refers to the code that runs when an interrupt " "occurs. This code can either run an interrupt handler directly or schedule " @@ -1895,13 +1896,13 @@ msgstr "" "обработчиков прерываний данного источника." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:343 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:342 #, no-wrap msgid "realtime kernel thread" msgstr "realtime kernel thread (поток ядра реального времени)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:345 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:344 msgid "" "A high priority kernel thread. Currently, the only realtime priority kernel " "threads are interrupt threads." @@ -1910,18 +1911,18 @@ msgstr "" "с реальным приоритетом являются потоки обработки прерываний." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:347 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:346 msgid "See Also thread." msgstr "См. также thread (поток)." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:348 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:347 #, no-wrap msgid "sleep" msgstr "sleep (спать)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:350 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:349 msgid "" "A thread is asleep when it is blocked on a condition variable or a sleep " "queue via msleep or tsleep." @@ -1930,18 +1931,18 @@ msgstr "" "переменной или в очереди сна через `msleep` или `tsleep`." #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:352 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:351 msgid "See Also block." msgstr "См. также block (блокировать)." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:353 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:352 #, no-wrap msgid "sleepable lock" msgstr "sleepable lock (блокировка с возможностью сна)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:355 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:354 msgid "" "A sleepable lock is a lock that can be held by a thread which is asleep. " "Lockmgr locks and sx locks are currently the only sleepable locks in " @@ -1955,13 +1956,13 @@ msgstr "" "блокировками с возможностью сна." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:358 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:357 #, no-wrap msgid "thread" msgstr "thread (поток)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:360 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:359 msgid "" "A kernel thread represented by a struct thread. Threads own locks and hold a " "single execution context." @@ -1970,13 +1971,13 @@ msgstr "" "блокировками и содержат единственный на поток контекст выполнения." #. type: Labeled list -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:361 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:360 #, no-wrap msgid "wait channel" msgstr "wait channel (канал ожидания)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/smp/_index.adoc:363 +#: documentation/content/en/books/arch-handbook/smp/_index.adoc:362 msgid "A kernel virtual address that threads may sleep on." msgstr "" "Виртуальный адрес ядра, на котором потоки могут переходить в режим ожидания." diff --git a/documentation/content/ru/books/arch-handbook/usb/_index.adoc b/documentation/content/ru/books/arch-handbook/usb/_index.adoc index a097da26ba..0a2c4e4dac 100644 --- a/documentation/content/ru/books/arch-handbook/usb/_index.adoc +++ b/documentation/content/ru/books/arch-handbook/usb/_index.adoc @@ -61,7 +61,7 @@ _Леннарт Аугустссон выполнил большую часть * Различные требования к качеству обслуживания для разных типов устройств, а также максимум в 126 устройств, которые могут быть подключены к одной шине, требуют правильного планирования передач по общей шине, чтобы полностью использовать доступную пропускную способность в 12 Мбит/с (более 400 Мбит/с для USB 2.0) * Устройства являются интеллектуальными и содержат легко доступную информацию о себе -Разработка драйверов для подсистемы USB и подключенных к ней устройств поддерживается спецификациями, которые были разработаны и будут разрабатываться. Эти спецификации общедоступны на домашних страницах USB. Apple активно продвигает стандартизированные драйверы, предоставляя драйверы для универсальных классов в своей операционной системе MacOS и не поощряя использование отдельных драйверов для каждого нового устройства. Эта глава пытается собрать основную информацию для базового понимания реализации стека USB 2.0 в FreeBSD/NetBSD. Однако рекомендуется читать её вместе с соответствующими спецификациями 2.0 и другими ресурсами для разработчиков: +Разработка драйверов для подсистемы USB и подключённых к ней устройств поддерживается спецификациями, которые были разработаны и будут разрабатываться. Эти спецификации общедоступны на домашних страницах USB. Apple активно продвигает стандартизированные драйверы, предоставляя драйверы для универсальных классов в своей операционной системе MacOS и не поощряя использование отдельных драйверов для каждого нового устройства. Эта глава пытается собрать основную информацию для базового понимания реализации стека USB 2.0 в FreeBSD/NetBSD. Однако рекомендуется читать её вместе с соответствующими спецификациями 2.0 и другими ресурсами для разработчиков: * Спецификация USB 2.0 (http://www.usb.org/developers/docs/usb20_docs/[http://www.usb.org/developers/docs/usb20_docs/]) * Универсальный интерфейс хост-контроллера (UHCI) Спецификация (link:ftp://ftp.netbsd.org/pub/NetBSD/misc/blymn/uhci11d.pdf[ftp://ftp.netbsd.org/pub/NetBSD/misc/blymn/uhci11d.pdf]) @@ -93,15 +93,15 @@ _Леннарт Аугустссон выполнил большую часть Каждая передача состоит из одного или нескольких пакетов. Драйвер UHCI разделяет большие передачи на несколько пакетов. Для каждой передачи, за исключением изохронных, выделяется QH. Для каждого типа передачи эти QH собираются в QH для соответствующего типа. Изохронные передачи должны выполняться первыми из-за требования фиксированной задержки и непосредственно указываются указателем в списке кадров. Последний изохронный TD ссылается на QH для прерывающих передач для этого кадра. Все QH для прерывающих передач указывают на QH для управляющих передач, который, в свою очередь, указывает на QH для массовых передач. Следующая диаграмма даёт графическое представление этого: -В результате выполняется следующее расписание в каждом кадре. После получения указателя на текущий кадр из списка кадров контроллер сначала выполняет TDs для всех изохронных пакетов в этом кадре. Последний из этих TDs ссылается на QH для прерывающих передач этого кадра. Хост-контроллер затем переходит от этого QH к QHs для отдельных прерывающих передач. После завершения этой очереди, QH для прерывающих передач ссылается на QH для всех управляющих передач. Он выполняет все подочереди, запланированные там, а затем все передачи, поставленные в очередь в QH для массовых передач. Для упрощения обработки завершенных или неудачных передач аппаратное обеспечение генерирует различные типы прерываний в конце каждого кадра. В последнем TD для передачи бит *Interrupt-On Completion* устанавливается драйвером HC, чтобы вызвать прерывание по завершении передачи. Прерывание ошибки возникает, если TD достигает максимального количества ошибок. Если в TD установлен бит *short packet detect* и передано меньше установленной длины пакета, это прерывание уведомляет драйвер контроллера о завершении передачи. Задача драйвера хост-контроллера — определить, какая передача завершилась или вызвала ошибку. При вызове процедура обслуживания прерывания находит все завершенные передачи и вызывает их callback-функции. +В результате выполняется следующее расписание в каждом кадре. После получения указателя на текущий кадр из списка кадров контроллер сначала выполняет TDs для всех изохронных пакетов в этом кадре. Последний из этих TDs ссылается на QH для прерывающих передач этого кадра. Хост-контроллер затем переходит от этого QH к QHs для отдельных прерывающих передач. После завершения этой очереди, QH для прерывающих передач ссылается на QH для всех управляющих передач. Он выполняет все подочереди, запланированные там, а затем все передачи, поставленные в очередь в QH для массовых передач. Для упрощения обработки завершённых или неудачных передач аппаратное обеспечение генерирует различные типы прерываний в конце каждого кадра. В последнем TD для передачи бит *Interrupt-On Completion* устанавливается драйвером HC, чтобы вызвать прерывание по завершении передачи. Прерывание ошибки возникает, если TD достигает максимального количества ошибок. Если в TD установлен бит *short packet detect* и передано меньше установленной длины пакета, это прерывание уведомляет драйвер контроллера о завершении передачи. Задача драйвера хост-контроллера — определить, какая передача завершилась или вызвала ошибку. При вызове процедура обслуживания прерывания находит все завершённые передачи и вызывает их callback-функции. Обратитесь к спецификации UHCI для более подробного описания. === OHCI -Программирование OHCI-контроллера значительно проще. Контроллер предполагает, что доступен набор конечных точек, и учитывает приоритеты планирования и порядок типов передач в кадре. Основная структура данных, используемая хост-контроллером, — это дескриптор конечной точки (ED), к которому присоединена очередь дескрипторов передачи (TD). ED содержит максимальный размер пакета, разрешенный для конечной точки, а аппаратное обеспечение контроллера выполняет разделение на пакеты. Указатели на буферы данных обновляются после каждой передачи, и когда начальный и конечный указатели становятся равны, TD перемещается в очередь завершенных (done-queue). Четыре типа конечных точек (прерывание, изохронная, управление и массовая) имеют свои собственные очереди. Управляющие и массовые конечные точки помещаются каждая в свою очередь. ED прерываний организуются в дерево, где уровень в дереве определяет частоту их выполнения. +Программирование OHCI-контроллера значительно проще. Контроллер предполагает, что доступен набор конечных точек, и учитывает приоритеты планирования и порядок типов передач в кадре. Основная структура данных, используемая хост-контроллером, — это дескриптор конечной точки (ED), к которому присоединена очередь дескрипторов передачи (TD). ED содержит максимальный размер пакета, разрешенный для конечной точки, а аппаратное обеспечение контроллера выполняет разделение на пакеты. Указатели на буферы данных обновляются после каждой передачи, и когда начальный и конечный указатели становятся равны, TD перемещается в очередь завершённых (done-queue). Четыре типа конечных точек (прерывание, изохронная, управление и массовая) имеют свои собственные очереди. Управляющие и массовые конечные точки помещаются каждая в свою очередь. ED прерываний организуются в дерево, где уровень в дереве определяет частоту их выполнения. -Порядок действий, выполняемых хост-контроллером в каждом кадре, выглядит следующим образом. Контроллер сначала запускает непериодические очереди управления и массовых передач, вплоть до ограничения времени, установленного драйвером HC. Затем выполняются прерывающие передачи для данного номера кадра, используя младшие пять битов номера кадра в качестве индекса уровня 0 дерева ED прерываний. В конце этого дерева подключены изохронные ED, которые затем обходятся. Изохронные TD содержат номер кадра, в котором должна быть запущена первая передача. После выполнения всех периодических передач очереди управления и массовых передач обходятся снова. Периодически вызывается процедура обслуживания прерывания для обработки очереди завершенных операций и вызова обратных вызовов для каждой передачи, а также для перепланирования прерывающих и изохронных конечных точек. +Порядок действий, выполняемых хост-контроллером в каждом кадре, выглядит следующим образом. Контроллер сначала запускает непериодические очереди управления и массовых передач, вплоть до ограничения времени, установленного драйвером HC. Затем выполняются прерывающие передачи для данного номера кадра, используя младшие пять битов номера кадра в качестве индекса уровня 0 дерева ED прерываний. В конце этого дерева подключены изохронные ED, которые затем обходятся. Изохронные TD содержат номер кадра, в котором должна быть запущена первая передача. После выполнения всех периодических передач очереди управления и массовых передач обходятся снова. Периодически вызывается процедура обслуживания прерывания для обработки очереди завершённых операций и вызова обратных вызовов для каждой передачи, а также для перепланирования прерывающих и изохронных конечных точек. См. UHCI Specification для более подробного описания. Средний уровень обеспечивает контролируемый доступ к устройству и управляет ресурсами, используемыми различными драйверами и уровнем сервисов. Этот уровень отвечает за следующие аспекты: @@ -134,7 +134,7 @@ _Леннарт Аугустссон выполнил большую часть Иногда для устройства не является проблемой вернуть меньше данных, чем запрошено. Например, при передаче данных в режиме bulk-in на модем может быть запрошено 200 байт данных, но у модема в данный момент доступно только 5 байт. Драйвер может установить флаг короткого пакета (SPD). Это позволяет хост-контроллеру принять пакет, даже если объём переданных данных меньше запрошенного. Этот флаг действителен только для in-передач, так как объём данных, отправляемых на устройство, всегда известен заранее. Если во время передачи в устройстве происходит неустранимая ошибка, канал останавливается (stalled). Прежде чем принимать или отправлять дополнительные данные, драйвер должен устранить причину остановки и сбросить условие остановки конечной точки, отправив запрос `clear endpoint halt` через канал по умолчанию. Конечная точка по умолчанию никогда не должна останавливаться. -Существует четыре различных типа конечных точек и соответствующих каналов: - Управляющий канал / канал по умолчанию: На каждое устройство приходится один управляющий канал, подключенный к конечной точке по умолчанию (конечная точка 0). Этот канал передаёт запросы устройства и связанные с ними данные. Разница между передачами через канал по умолчанию и другими каналами заключается в том, что протокол для этих передач описан в спецификации USB. Эти запросы используются для сброса и настройки устройства. Базовый набор команд, который должен поддерживаться каждым устройством, приведен в главе 9 спецификации USB. Команды, поддерживаемые на этом канале, могут быть расширены спецификацией класса устройства для обеспечения дополнительной функциональности. +Существует четыре различных типа конечных точек и соответствующих каналов: - Управляющий канал / канал по умолчанию: На каждое устройство приходится один управляющий канал, подключённый к конечной точке по умолчанию (конечная точка 0). Этот канал передаёт запросы устройства и связанные с ними данные. Разница между передачами через канал по умолчанию и другими каналами заключается в том, что протокол для этих передач описан в спецификации USB. Эти запросы используются для сброса и настройки устройства. Базовый набор команд, который должен поддерживаться каждым устройством, приведён в главе 9 спецификации USB. Команды, поддерживаемые на этом канале, могут быть расширены спецификацией класса устройства для обеспечения дополнительной функциональности. * Массовый канал: Это USB-эквивалент среды передачи данных в сыром виде. * Прерывающий канал: Хост отправляет запрос данных на устройство, и если устройству нечего отправлять, оно отвечает NAK на пакет данных. Прерывающие передачи планируются с частотой, указанной при создании канала. @@ -149,7 +149,7 @@ _Леннарт Аугустссон выполнил большую часть После уведомления от концентратора о подключении нового устройства сервисный уровень включает порт, предоставляя устройству ток 100 мА. На этом этапе устройство находится в своём исходном состоянии и прослушивает адрес устройства 0. Сервисный уровень продолжит получение различных дескрипторов через стандартный канал. После этого он отправит запрос Set Address, чтобы переместить устройство с исходного адреса (адрес 0). Несколько драйверов устройств могут поддерживать данное устройство. Например, драйвер модема может поддерживать ISDN TA через интерфейс совместимости AT. Однако драйвер, предназначенный для конкретной модели ISDN-адаптера, может обеспечить гораздо лучшую поддержку этого устройства. Для обеспечения такой гибкости пробы возвращают приоритеты, указывающие уровень их поддержки. Поддержка конкретной версии продукта имеет наивысший приоритет, а универсальный драйвер — самый низкий. Также возможно, что несколько драйверов могут быть подключены к одному устройству, если в одной конфигурации присутствует несколько интерфейсов. Каждому драйверу требуется поддерживать только подмножество интерфейсов. -Поиск драйвера для нового подключенного устройства сначала проверяет наличие специфичных для устройства драйверов. Если они не найдены, код проверки перебирает все поддерживаемые конфигурации, пока драйвер не будет подключен в одной из них. Для поддержки устройств с несколькими драйверами на разных интерфейсах проверка перебирает все интерфейсы в конфигурации, которые ещё не были заняты драйвером. Конфигурации, превышающие выделенный бюджет мощности для концентратора, игнорируются. Во время подключения драйвер должен инициализировать устройство в его рабочее состояние, но не сбрасывать его, так как это приведёт к отключению устройства от шины и перезапуску процесса проверки. Чтобы избежать излишнего потребления пропускной способности, не следует запрашивать канал прерывания во время подключения, а отложить его выделение до момента открытия файла и фактического использования данных. При закрытии файла канал следует снова закрыть, даже если устройство остаётся подключенным. +Поиск драйвера для нового подключённого устройства сначала проверяет наличие специфичных для устройства драйверов. Если они не найдены, код проверки перебирает все поддерживаемые конфигурации, пока драйвер не будет подключен в одной из них. Для поддержки устройств с несколькими драйверами на разных интерфейсах проверка перебирает все интерфейсы в конфигурации, которые ещё не были заняты драйвером. Конфигурации, превышающие выделенный бюджет мощности для концентратора, игнорируются. Во время подключения драйвер должен инициализировать устройство в его рабочее состояние, но не сбрасывать его, так как это приведёт к отключению устройства от шины и перезапуску процесса проверки. Чтобы избежать излишнего потребления пропускной способности, не следует запрашивать канал прерывания во время подключения, а отложить его выделение до момента открытия файла и фактического использования данных. При закрытии файла канал следует снова закрыть, даже если устройство остаётся подключённым. === Отключение и извлечение устройства @@ -157,7 +157,7 @@ _Леннарт Аугустссон выполнил большую часть Кроме того, устройство, которое было отключено и снова подключено, не будет повторно присоединено к тому же экземпляру устройства. Это может измениться в будущем, когда больше устройств будут поддерживать серийные номера (см. дескриптор устройства) или будут разработаны другие способы определения идентификатора устройства. -Отключение устройства сигнализируется концентратором в пакете прерывания, передаваемом драйверу концентратора. Информация об изменении состояния указывает, на каком порту произошло изменение подключения. Метод отключения устройства для всех драйверов устройств, подключенных к этому порту, вызывается, и структуры очищаются. Если состояние порта указывает, что за это время к порту было подключено устройство, начнется процедура обнаружения и подключения устройства. Сброс устройства вызовет последовательность отключения-подключения на концентраторе и будет обработан, как описано выше. +Отключение устройства сигнализируется концентратором в пакете прерывания, передаваемом драйверу концентратора. Информация об изменении состояния указывает, на каком порту произошло изменение подключения. Метод отключения устройства для всех драйверов устройств, подключённых к этому порту, вызывается, и структуры очищаются. Если состояние порта указывает, что за это время к порту было подключено устройство, начнется процедура обнаружения и подключения устройства. Сброс устройства вызовет последовательность отключения-подключения на концентраторе и будет обработан, как описано выше. [[usb-protocol]] == Информация о протоколе драйверов USB diff --git a/documentation/content/ru/books/arch-handbook/usb/_index.po b/documentation/content/ru/books/arch-handbook/usb/_index.po index ab16e356c9..dd916813d7 100644 --- a/documentation/content/ru/books/arch-handbook/usb/_index.po +++ b/documentation/content/ru/books/arch-handbook/usb/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2026-03-08 09:11+0000\n" +"POT-Creation-Date: 2026-08-06 22:55+0100\n" +"PO-Revision-Date: 2026-05-18 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/booksarch-handbookusb_index/ru/>\n" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description @@ -37,13 +37,13 @@ msgid "USB Devices" msgstr "Устройства USB" #. type: Title == -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:52 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:51 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:55 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:54 msgid "" "The Universal Serial Bus (USB) is a new way of attaching devices to personal " "computers. The bus architecture features two-way communication and has been " @@ -75,7 +75,7 @@ msgstr "" "базу. Для реализации подсистемы USB важны некоторые особенности USB." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:57 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:56 msgid "" "_Lennart Augustsson has done most of the implementation of the USB support " "for the NetBSD project. Many thanks for this incredible amount of work. Many " @@ -88,7 +88,7 @@ msgstr "" "статьи._" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:59 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:58 msgid "" "Devices connect to ports on the computer directly or on devices called hubs, " "forming a treelike device structure." @@ -97,19 +97,19 @@ msgstr "" "называемые концентраторами, образуя древовидную структуру устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:60 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:59 msgid "The devices can be connected and disconnected at run time." msgstr "Устройства можно подключать и отключать во время работы." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:61 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:60 msgid "Devices can suspend themselves and trigger resumes of the host system" msgstr "" "Устройства могут приостанавливать свою работу и инициировать возобновление " "работы основной системы" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:62 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:61 msgid "" "As the devices can be powered from the bus, the host software has to keep " "track of power budgets for each hub." @@ -118,7 +118,7 @@ msgstr "" "хоста должно отслеживать энергопотребление для каждого концентратора." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:63 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:62 msgid "" "Different quality of service requirements by the different device types " "together with the maximum of 126 devices that can be connected to the same " @@ -132,7 +132,7 @@ msgstr "" "для USB 2.0)" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:64 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:63 msgid "" "Devices are intelligent and contain easily accessible information about " "themselves" @@ -141,7 +141,7 @@ msgstr "" "о себе" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:66 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:65 msgid "" "The development of drivers for the USB subsystem and devices connected to it " "is supported by the specifications that have been developed and will be " @@ -154,7 +154,7 @@ msgid "" "however to read it together with the relevant 2.0 specifications and other " "developer resources:" msgstr "" -"Разработка драйверов для подсистемы USB и подключенных к ней устройств " +"Разработка драйверов для подсистемы USB и подключённых к ней устройств " "поддерживается спецификациями, которые были разработаны и будут " "разрабатываться. Эти спецификации общедоступны на домашних страницах USB. " "Apple активно продвигает стандартизированные драйверы, предоставляя драйверы " @@ -165,7 +165,7 @@ msgstr "" "соответствующими спецификациями 2.0 и другими ресурсами для разработчиков:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:68 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:67 msgid "" "USB 2.0 Specification (http://www.usb.org/developers/docs/usb20_docs/[http://" "www.usb.org/developers/docs/usb20_docs/])" @@ -174,7 +174,7 @@ msgstr "" "www.usb.org/developers/docs/usb20_docs/])" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:69 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:68 msgid "" "Universal Host Controller Interface (UHCI) Specification (link:ftp://ftp." "netbsd.org/pub/NetBSD/misc/blymn/uhci11d.pdf[ftp://ftp.netbsd.org/pub/NetBSD/" @@ -185,7 +185,7 @@ msgstr "" "misc/blymn/uhci11d.pdf])" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:70 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:69 msgid "" "Open Host Controller Interface (OHCI) Specification(link:ftp://ftp.compaq." "com/pub/supportinformation/papers/hcir1_0a.pdf[ftp://ftp.compaq.com/pub/" @@ -196,7 +196,7 @@ msgstr "" "supportinformation/papers/hcir1_0a.pdf])" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:71 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:70 msgid "" "Developer section of USB home page (http://www.usb.org/developers/[http://" "www.usb.org/developers/])" @@ -205,13 +205,13 @@ msgstr "" "developers/[http://www.usb.org/developers/])" #. type: Title === -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:72 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:71 #, no-wrap msgid "Structure of the USB Stack" msgstr "Структура стека USB" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:75 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:74 msgid "" "The USB support in FreeBSD can be split into three layers. The lowest layer " "contains the host controller driver, providing a generic interface to the " @@ -230,7 +230,7 @@ msgstr "" "к регистрам, управляющим корневыми портами на задней панели машины." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:77 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:76 msgid "" "The middle layer handles the device connection and disconnection, basic " "initialisation of the device, driver selection, the communication channels " @@ -243,7 +243,7 @@ msgstr "" "запросы устройств, передаваемые через них." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:79 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:78 msgid "" "The top layer contains the individual drivers supporting specific (classes " "of) devices. These drivers implement the protocol that is used over the " @@ -260,13 +260,13 @@ msgstr "" "(USBDI), предоставляемый уровнем сервисов." #. type: Title == -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:81 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:80 #, no-wrap msgid "Host Controllers" msgstr "Контроллеры хоста" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:84 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:83 msgid "" "The host controller (HC) controls the transmission of packets on the bus. " "Frames of 1 millisecond are used. At the start of each frame the host " @@ -277,7 +277,7 @@ msgstr "" "генерирует пакет Start of Frame (SOF)." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:86 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:85 msgid "" "The SOF packet is used to synchronise to the start of the frame and to keep " "track of the frame number. Within each frame packets are transferred, either " @@ -304,7 +304,7 @@ msgstr "" "передач и их характеристики описаны ниже." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:88 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:87 msgid "" "Large transfers between the device on the USB bus and the device driver are " "split up into multiple packets by the host controller or the HC driver." @@ -313,7 +313,7 @@ msgstr "" "разделяются на несколько пакетов хост-контроллером или драйвером HC." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:90 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:89 msgid "" "Device requests (control transfers) to the default endpoints are special. " "They consist of two or three phases: SETUP, DATA (optional) and STATUS. The " @@ -362,13 +362,13 @@ msgstr "" "и выполняя большую часть работы самостоятельно." #. type: Title === -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:91 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:90 #, no-wrap msgid "UHCI" msgstr "UHCI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:94 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:93 msgid "" "The UHCI host controller maintains a framelist with 1024 pointers to per " "frame data structures. It understands two different data types: transfer " @@ -383,7 +383,7 @@ msgstr "" "группировки TD (и других QH) вместе." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:96 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:95 msgid "" "Each transfer consists of one or more packets. The UHCI driver splits large " "transfers into multiple packets. For every transfer, apart from isochronous " @@ -407,7 +407,7 @@ msgstr "" "графическое представление этого:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:98 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:97 msgid "" "This results in the following schedule being run in each frame. After " "fetching the pointer for the current frame from the framelist the controller " @@ -437,7 +437,7 @@ msgstr "" "завершения этой очереди, QH для прерывающих передач ссылается на QH для всех " "управляющих передач. Он выполняет все подочереди, запланированные там, а " "затем все передачи, поставленные в очередь в QH для массовых передач. Для " -"упрощения обработки завершенных или неудачных передач аппаратное обеспечение " +"упрощения обработки завершённых или неудачных передач аппаратное обеспечение " "генерирует различные типы прерываний в конце каждого кадра. В последнем TD " "для передачи бит *Interrupt-On Completion* устанавливается драйвером HC, " "чтобы вызвать прерывание по завершении передачи. Прерывание ошибки " @@ -446,21 +446,21 @@ msgstr "" "пакета, это прерывание уведомляет драйвер контроллера о завершении передачи. " "Задача драйвера хост-контроллера — определить, какая передача завершилась " "или вызвала ошибку. При вызове процедура обслуживания прерывания находит все " -"завершенные передачи и вызывает их callback-функции." +"завершённые передачи и вызывает их callback-функции." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:100 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:99 msgid "Refer to the UHCI Specification for a more elaborate description." msgstr "Обратитесь к спецификации UHCI для более подробного описания." #. type: Title === -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:101 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:100 #, no-wrap msgid "OHCI" msgstr "OHCI" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:104 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:103 msgid "" "Programming an OHCI host controller is much simpler. The controller assumes " "that a set of endpoints is available, and is aware of scheduling priorities " @@ -483,14 +483,14 @@ msgstr "" "максимальный размер пакета, разрешенный для конечной точки, а аппаратное " "обеспечение контроллера выполняет разделение на пакеты. Указатели на буферы " "данных обновляются после каждой передачи, и когда начальный и конечный " -"указатели становятся равны, TD перемещается в очередь завершенных (done-" +"указатели становятся равны, TD перемещается в очередь завершённых (done-" "queue). Четыре типа конечных точек (прерывание, изохронная, управление и " "массовая) имеют свои собственные очереди. Управляющие и массовые конечные " "точки помещаются каждая в свою очередь. ED прерываний организуются в дерево, " "где уровень в дереве определяет частоту их выполнения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:106 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:105 msgid "" "The schedule being run by the host controller in each frame looks as " "follows. The controller will first run the non-periodic control and bulk " @@ -515,11 +515,11 @@ msgstr "" "запущена первая передача. После выполнения всех периодических передач " "очереди управления и массовых передач обходятся снова. Периодически " "вызывается процедура обслуживания прерывания для обработки очереди " -"завершенных операций и вызова обратных вызовов для каждой передачи, а также " +"завершённых операций и вызова обратных вызовов для каждой передачи, а также " "для перепланирования прерывающих и изохронных конечных точек." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:108 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:107 msgid "" "See the UHCI Specification for a more elaborate description. The middle " "layer provides access to the device in a controlled way and maintains " @@ -532,34 +532,34 @@ msgstr "" "отвечает за следующие аспекты:" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:110 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:109 msgid "The device configuration information" msgstr "Информация о конфигурации устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:111 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:110 msgid "The pipes to communicate with a device" msgstr "Каналы для взаимодействия с устройством" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:112 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:111 msgid "Probing and attaching and detaching form a device." msgstr "Обнаружение, подключение и отключение от устройства." #. type: Title == -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:114 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:113 #, no-wrap msgid "USB Device Information" msgstr "Информация об устройстве USB" #. type: Title === -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:116 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:115 #, no-wrap msgid "Device Configuration Information" msgstr "Информация о конфигурации устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:119 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:118 msgid "" "Each device provides different levels of configuration information. Each " "device has one or more configurations, of which one is selected during probe/" @@ -587,7 +587,7 @@ msgstr "" "кадров в секунду." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:121 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:120 msgid "" "Within each interface, 0 or more endpoints can be specified. Endpoints are " "the unidirectional access points for communicating with a device. They " @@ -607,7 +607,7 @@ msgstr "" "драйверам устройств." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:123 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:122 msgid "" "This hierarchical configuration information is described in the device by a " "standard set of descriptors (see section 9.6 of the USB specification). They " @@ -622,7 +622,7 @@ msgstr "" "Доступ к дескрипторам предоставляется через вызовы функций." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:125 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:124 msgid "" "Device descriptors: General information about the device, like Vendor, " "Product and Revision Id, supported device class, subclass and protocol if " @@ -634,7 +634,7 @@ msgstr "" "максимальный размер пакета для конечной точки по умолчанию и т. д." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:126 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:125 msgid "" "Configuration descriptors: The number of interfaces in this configuration, " "suspend and resume functionality supported and power requirements." @@ -644,7 +644,7 @@ msgstr "" "питанию." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:127 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:126 msgid "" "Interface descriptors: interface class, subclass and protocol if applicable, " "number of alternate settings for the interface and the number of endpoints." @@ -654,7 +654,7 @@ msgstr "" "конечных точек." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:128 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:127 msgid "" "Endpoint descriptors: Endpoint address, direction and type, maximum packet " "size supported and polling frequency if type is interrupt endpoint. There is " @@ -668,7 +668,7 @@ msgstr "" "дескрипторе интерфейса." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:129 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:128 msgid "" "String descriptors: In the other descriptors string indices are supplied for " "some fields.These can be used to retrieve descriptive strings, possibly in " @@ -679,7 +679,7 @@ msgstr "" "строк, возможно, на нескольких языках." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:131 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:130 msgid "" "Class specifications can add their own descriptor types that are available " "through the GetDescriptor Request." @@ -688,7 +688,7 @@ msgstr "" "которые доступны через запрос GetDescriptor." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:133 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:132 msgid "" "Pipes Communication to end points on a device flows through so-called pipes. " "Drivers submit transfers to endpoints to a pipe and provide a callback to be " @@ -721,7 +721,7 @@ msgstr "" "буфер, либо ошибки протокола." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:135 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:134 msgid "" "If a transfer over a pipe is larger than the maximum packet size specified " "in the associated endpoint descriptor, the host controller (OHCI) or the HC " @@ -734,7 +734,7 @@ msgstr "" "этом последний пакет может быть меньше максимального размера." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:137 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:136 msgid "" "Sometimes it is not a problem for a device to return less data than " "requested. For example abulk-in-transfer to a modem might request 200 bytes " @@ -763,7 +763,7 @@ msgstr "" "умолчанию. Конечная точка по умолчанию никогда не должна останавливаться." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:139 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:138 msgid "" "There are four different types of endpoints and corresponding pipes: - " "Control pipe / default pipe: There is one control pipe per device, connected " @@ -778,23 +778,23 @@ msgid "" msgstr "" "Существует четыре различных типа конечных точек и соответствующих каналов: - " "Управляющий канал / канал по умолчанию: На каждое устройство приходится один " -"управляющий канал, подключенный к конечной точке по умолчанию (конечная " +"управляющий канал, подключённый к конечной точке по умолчанию (конечная " "точка 0). Этот канал передаёт запросы устройства и связанные с ними данные. " "Разница между передачами через канал по умолчанию и другими каналами " "заключается в том, что протокол для этих передач описан в спецификации USB. " "Эти запросы используются для сброса и настройки устройства. Базовый набор " -"команд, который должен поддерживаться каждым устройством, приведен в главе 9 " +"команд, который должен поддерживаться каждым устройством, приведён в главе 9 " "спецификации USB. Команды, поддерживаемые на этом канале, могут быть " "расширены спецификацией класса устройства для обеспечения дополнительной " "функциональности." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:141 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:140 msgid "Bulk pipe: This is the USB equivalent to a raw transmission medium." msgstr "Массовый канал: Это USB-эквивалент среды передачи данных в сыром виде." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:142 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:141 msgid "" "Interrupt pipe: The host sends a request for data to the device and if the " "device has nothing to send, it will NAK the data packet. Interrupt transfers " @@ -805,7 +805,7 @@ msgstr "" "передачи планируются с частотой, указанной при создании канала." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:143 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:142 msgid "" "Isochronous pipe: These pipes are intended for isochronous data, for example " "video or audio streams, with fixed latency, but no guaranteed delivery. Some " @@ -827,7 +827,7 @@ msgstr "" "временные ограничения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:145 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:144 msgid "" "The availability of the necessary bandwidth is calculated during the " "creation of the pipe. Transfers are scheduled within frames of 1 " @@ -846,7 +846,7 @@ msgstr "" "прерывающих пакетов и используют всю оставшуюся полосу пропускания." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:147 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:146 msgid "" "More information on scheduling of transfers and bandwidth reclamation can be " "found in chapter 5 of the USB specification, section 1.3 of the UHCI " @@ -857,13 +857,13 @@ msgstr "" "UHCI и разделе 3.4.2 спецификации OHCI." #. type: Title == -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:149 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:148 #, no-wrap msgid "Device Probe and Attach" msgstr "Обнаружение устройства и подключение" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:152 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:151 msgid "" "After the notification by the hub that a new device has been connected, the " "service layer switches on the port, providing the device with 100 mA of " @@ -900,7 +900,7 @@ msgstr "" "подмножество интерфейсов." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:154 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:153 msgid "" "The probing for a driver for a newly attached device checks first for device " "specific drivers. If not found, the probe code iterates over all supported " @@ -916,7 +916,7 @@ msgid "" "actually used. When the file is closed the pipe should be closed again, even " "though the device might still be attached." msgstr "" -"Поиск драйвера для нового подключенного устройства сначала проверяет наличие " +"Поиск драйвера для нового подключённого устройства сначала проверяет наличие " "специфичных для устройства драйверов. Если они не найдены, код проверки " "перебирает все поддерживаемые конфигурации, пока драйвер не будет подключен " "в одной из них. Для поддержки устройств с несколькими драйверами на разных " @@ -929,16 +929,16 @@ msgstr "" "способности, не следует запрашивать канал прерывания во время подключения, а " "отложить его выделение до момента открытия файла и фактического " "использования данных. При закрытии файла канал следует снова закрыть, даже " -"если устройство остаётся подключенным." +"если устройство остаётся подключённым." #. type: Title === -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:155 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:154 #, no-wrap msgid "Device Disconnect and Detach" msgstr "Отключение и извлечение устройства" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:158 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:157 msgid "" "A device driver should expect to receive errors during any transaction with " "the device. The design of USB supports and encourages the disconnection of " @@ -951,7 +951,7 @@ msgstr "" "ситуаций, когда устройство исчезает." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:160 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:159 msgid "" "Furthermore a device that has been disconnected and reconnected will not be " "reattached at the same device instance. This might change in the future when " @@ -965,7 +965,7 @@ msgstr "" "идентификатора устройства." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:162 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:161 msgid "" "The disconnection of a device is signaled by a hub in the interrupt packet " "delivered to the hub driver. The status change information indicates which " @@ -979,20 +979,20 @@ msgstr "" "Отключение устройства сигнализируется концентратором в пакете прерывания, " "передаваемом драйверу концентратора. Информация об изменении состояния " "указывает, на каком порту произошло изменение подключения. Метод отключения " -"устройства для всех драйверов устройств, подключенных к этому порту, " +"устройства для всех драйверов устройств, подключённых к этому порту, " "вызывается, и структуры очищаются. Если состояние порта указывает, что за " "это время к порту было подключено устройство, начнется процедура обнаружения " "и подключения устройства. Сброс устройства вызовет последовательность " "отключения-подключения на концентраторе и будет обработан, как описано выше." #. type: Title == -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:164 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:163 #, no-wrap msgid "USB Drivers Protocol Information" msgstr "Информация о протоколе драйверов USB" #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:167 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:166 msgid "" "The protocol used over pipes other than the default pipe is undefined by the " "USB specification. Information on this can be found from various sources. " @@ -1022,7 +1022,7 @@ msgstr "" "можно найти в разделе для разработчиков на домашних страницах USB." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:169 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:168 msgid "" "For many devices the protocol information has not yet been published " "however. Information on the protocol being used might be available from the " @@ -1037,7 +1037,7 @@ msgstr "" "случаев это исключает возможность сделать драйвер открытым." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:171 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:170 msgid "" "Another good source of information is the Linux driver sources, as a number " "of companies have started to provide drivers for Linux for their devices. It " @@ -1049,7 +1049,7 @@ msgstr "" "Всегда полезно связаться с авторами этих драйверов для получения информации." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:173 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:172 msgid "" "Example: Human Interface Devices The specification for the Human Interface " "Devices like keyboards, mice, tablets, buttons, dials,etc. is referred to in " @@ -1061,7 +1061,7 @@ msgstr "" "устройств и используется во многих устройствах." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:175 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:174 msgid "" "For example audio speakers provide endpoints to the digital to analogue " "converters and possibly an extra pipe for a microphone. They also provide a " @@ -1095,7 +1095,7 @@ msgstr "" "независимых конечных точек." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:177 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:176 msgid "" "Example: Firmware download Many devices that have been developed are based " "on a general purpose processor with an additional USB core added to it. " @@ -1109,7 +1109,7 @@ msgstr "" "многие устройства требуют загрузки микропрограммы после подключения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:179 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:178 msgid "" "The procedure followed is straightforward. The device identifies itself " "through a vendor and product Id. The first driver probes and attaches to it " @@ -1129,7 +1129,7 @@ msgstr "" "подключится к нему." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:181 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:180 msgid "" "An example of these types of devices is the ActiveWire I/O board, based on " "the EZ-USB chip. For this chip a generic firmware downloader is available. " @@ -1144,7 +1144,7 @@ msgstr "" "для отключения от USB-шины и повторного подключения." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:183 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:182 msgid "" "Example: Mass Storage Devices Support for mass storage devices is mainly " "built around existing protocols. The Iomega USB Zipdrive is based on the " @@ -1161,7 +1161,7 @@ msgstr "" "аналогичным образом." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:185 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:184 msgid "" "The Mass Storage Specification supports 2 different types of wrapping of the " "command block.The initial attempt was based on sending the command and " @@ -1191,7 +1191,7 @@ msgstr "" "никогда не имел множества различных вариантов реализации." #. type: Plain text -#: documentation/content/en/books/arch-handbook/usb/_index.adoc:186 +#: documentation/content/en/books/arch-handbook/usb/_index.adoc:185 msgid "" "The support for the USB floppy from Y-E Data is again less straightforward " "as a new command set has been designed." |
