Units
Translation components API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/units/?format=api&page=5
https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/units/?format=api&page=6", "previous": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/units/?format=api&page=4", "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/conf/ldscript.i386:</filename>\nENTRY(btext)" ], "previous_source": "", "target": [ "<filename>sys/conf/ldscript.i386:</filename>\nENTRY(btext)" ], "id_hash": -4665339647307567730, "content_hash": -4665339647307567730, "location": "book.translate.xml:2102", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 212, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/102354/?format=api", "priority": 100, "id": 34122, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=3f41624f0dafad8e", "url": "https://translate-dev.freebsd.org/api/units/34122/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.194971Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "says that a kernel's entry point is the symbol `btext'. This symbol is defined in <filename>locore.s</filename>:" ], "previous_source": "", "target": [ "" ], "id_hash": -5997747690220351332, "content_hash": -5997747690220351332, "location": "book.translate.xml:2105", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 213, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 16, "source_unit": "https://translate-dev.freebsd.org/api/units/102355/?format=api", "priority": 100, "id": 34123, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=2cc3b840cfff109c", "url": "https://translate-dev.freebsd.org/api/units/34123/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.217661Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/i386/i386/locore.s:</filename>\n\t.text\n/**********************************************************************\n *\n * This is where the bootblocks start us, set the ball rolling...\n *\n */\nNON_GPROF_ENTRY(btext)" ], "previous_source": "", "target": [ "<filename>sys/i386/i386/locore.s:</filename>\n\t.text\n/**********************************************************************\n *\n * This is where the bootblocks start us, set the ball rolling...\n *\n */\nNON_GPROF_ENTRY(btext)" ], "id_hash": 5123569119522241229, "content_hash": 5123569119522241229, "location": "book.translate.xml:2108", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 214, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/102356/?format=api", "priority": 100, "id": 34124, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=c71a92f7e748bacd", "url": "https://translate-dev.freebsd.org/api/units/34124/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.225649Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "First, the register EFLAGS is set to a predefined value of 0x00000002. Then all the segment registers are initialized:" ], "previous_source": "", "target": [ "" ], "id_hash": 7924353816035518423, "content_hash": 7924353816035518423, "location": "book.translate.xml:2117", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 215, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/102357/?format=api", "priority": 100, "id": 34126, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=edf8f5cf874ee7d7", "url": "https://translate-dev.freebsd.org/api/units/34126/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.233006Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/i386/i386/locore.s:</filename>\n/* Don't trust what the BIOS gives for eflags. */\n\tpushl\t$PSL_KERNEL\n\tpopfl\n\n/*\n * Don't trust what the BIOS gives for %fs and %gs. Trust the bootstrap\n * to set %cs, %ds, %es and %ss.\n */\n\tmov\t%ds, %ax\n\tmov\t%ax, %fs\n\tmov\t%ax, %gs" ], "previous_source": "", "target": [ "<filename>sys/i386/i386/locore.s:</filename>\n/* Don't trust what the BIOS gives for eflags. */\n\tpushl\t$PSL_KERNEL\n\tpopfl\n\n/*\n * Don't trust what the BIOS gives for %fs and %gs. Trust the bootstrap\n * to set %cs, %ds, %es and %ss.\n */\n\tmov\t%ds, %ax\n\tmov\t%ax, %fs\n\tmov\t%ax, %gs" ], "id_hash": 7102829034276942690, "content_hash": 7102829034276942690, "location": "book.translate.xml:2121", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 216, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 47, "source_unit": "https://translate-dev.freebsd.org/api/units/102358/?format=api", "priority": 100, "id": 34127, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=e292515fd0687362", "url": "https://translate-dev.freebsd.org/api/units/34127/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.240822Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "btext calls the routines <function>recover_bootinfo()</function>, <function>identify_cpu()</function>, <function>create_pagetables()</function>, which are also defined in <filename>locore.s</filename>. Here is a description of what they do:" ], "previous_source": "", "target": [ "" ], "id_hash": -2407773672749901055, "content_hash": -2407773672749901055, "location": "book.translate.xml:2134", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 217, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 21, "source_unit": "https://translate-dev.freebsd.org/api/units/102359/?format=api", "priority": 100, "id": 34129, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=5e95de9a00345b01", "url": "https://translate-dev.freebsd.org/api/units/34129/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.248658Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<function>recover_bootinfo</function>" ], "previous_source": "", "target": [ "" ], "id_hash": -682989891242429330, "content_hash": -682989891242429330, "location": "book.translate.xml:2145", "context": "", "note": "(itstool) path: row/entry", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 218, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/102360/?format=api", "priority": 100, "id": 34130, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=76858850034ff46e", "url": "https://translate-dev.freebsd.org/api/units/34130/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.258597Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "This routine parses the parameters to the kernel passed from the bootstrap. The kernel may have been booted in 3 ways: by the loader, described above, by the old disk boot blocks, or by the old diskless boot procedure. This function determines the booting method, and stores the <literal>struct bootinfo</literal> structure into the kernel memory." ], "previous_source": "", "target": [ "" ], "id_hash": -6445549220168996748, "content_hash": -6445549220168996748, "location": "book.translate.xml:2146", "context": "", "note": "(itstool) path: row/entry", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 219, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 55, "source_unit": "https://translate-dev.freebsd.org/api/units/102361/?format=api", "priority": 100, "id": 34132, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=268ccf225d87e874", "url": "https://translate-dev.freebsd.org/api/units/34132/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.287189Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<function>identify_cpu</function>" ], "previous_source": "", "target": [ "" ], "id_hash": -3287706447532065227, "content_hash": -3287706447532065227, "location": "book.translate.xml:2156", "context": "", "note": "(itstool) path: row/entry", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 220, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/102362/?format=api", "priority": 100, "id": 34133, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=525fb867ad16fe35", "url": "https://translate-dev.freebsd.org/api/units/34133/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.308559Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "This functions tries to find out what CPU it is running on, storing the value found in a variable <varname>_cpu</varname>." ], "previous_source": "", "target": [ "" ], "id_hash": -2369995879425585843, "content_hash": -2369995879425585843, "location": "book.translate.xml:2157", "context": "", "note": "(itstool) path: row/entry", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 221, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 20, "source_unit": "https://translate-dev.freebsd.org/api/units/102363/?format=api", "priority": 100, "id": 34135, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=5f1c154defb2cd4d", "url": "https://translate-dev.freebsd.org/api/units/34135/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.319190Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<function>create_pagetables</function>" ], "previous_source": "", "target": [ "" ], "id_hash": 8880265222815887718, "content_hash": 8880265222815887718, "location": "book.translate.xml:2163", "context": "", "note": "(itstool) path: row/entry", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 222, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/102364/?format=api", "priority": 100, "id": 34136, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=fb3d0a2ba5323166", "url": "https://translate-dev.freebsd.org/api/units/34136/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.329143Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "This function allocates and fills out a Page Table Directory at the top of the kernel memory area." ], "previous_source": "", "target": [ "" ], "id_hash": 4990639712572731837, "content_hash": 4990639712572731837, "location": "book.translate.xml:2164", "context": "", "note": "(itstool) path: row/entry", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 223, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 18, "source_unit": "https://translate-dev.freebsd.org/api/units/102365/?format=api", "priority": 100, "id": 34137, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=c542506085daf1bd", "url": "https://translate-dev.freebsd.org/api/units/34137/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.339267Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "The next steps are enabling VME, if the CPU supports it:" ], "previous_source": "", "target": [ "" ], "id_hash": 7317705378113244796, "content_hash": 7317705378113244796, "location": "book.translate.xml:2171", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 224, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/102366/?format=api", "priority": 100, "id": 34138, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=e58db6454167ce7c", "url": "https://translate-dev.freebsd.org/api/units/34138/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.347461Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "\ttestl\t$CPUID_VME, R(_cpu_feature)\n\tjz\t1f\n\tmovl\t%cr4, %eax\n\torl\t$CR4_VME, %eax\n\tmovl\t%eax, %cr4" ], "previous_source": "", "target": [ "\ttestl\t$CPUID_VME, R(_cpu_feature)\n\tjz\t1f\n\tmovl\t%cr4, %eax\n\torl\t$CR4_VME, %eax\n\tmovl\t%eax, %cr4" ], "id_hash": -7884920161667798200, "content_hash": -7884920161667798200, "location": "book.translate.xml:2174", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 225, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 14, "source_unit": "https://translate-dev.freebsd.org/api/units/102367/?format=api", "priority": 100, "id": 34140, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=129322e39979ab48", "url": "https://translate-dev.freebsd.org/api/units/34140/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.368910Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Then, enabling paging:" ], "previous_source": "", "target": [ "" ], "id_hash": -2203610664238600569, "content_hash": -2203610664238600569, "location": "book.translate.xml:2180", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 226, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/102368/?format=api", "priority": 100, "id": 34141, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=616b33c6aecbae87", "url": "https://translate-dev.freebsd.org/api/units/34141/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.381594Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "/* Now enable paging */\n\tmovl\tR(_IdlePTD), %eax\n\tmovl\t%eax,%cr3\t\t\t/* load ptd addr into mmu */\n\tmovl\t%cr0,%eax\t\t\t/* get control word */\n\torl\t$CR0_PE|CR0_PG,%eax\t\t/* enable paging */\n\tmovl\t%eax,%cr0\t\t\t/* and let's page NOW! */" ], "previous_source": "", "target": [ "/* Now enable paging */\n\tmovl\tR(_IdlePTD), %eax\n\tmovl\t%eax,%cr3\t\t\t/* load ptd addr into mmu */\n\tmovl\t%cr0,%eax\t\t\t/* get control word */\n\torl\t$CR0_PE|CR0_PG,%eax\t\t/* enable paging */\n\tmovl\t%eax,%cr0\t\t\t/* and let's page NOW! */" ], "id_hash": -7484232127929409768, "content_hash": -7484232127929409768, "location": "book.translate.xml:2182", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 227, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 38, "source_unit": "https://translate-dev.freebsd.org/api/units/102369/?format=api", "priority": 100, "id": 34142, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=1822aa8866339f18", "url": "https://translate-dev.freebsd.org/api/units/34142/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.392234Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "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:" ], "previous_source": "", "target": [ "" ], "id_hash": 1551786771268156184, "content_hash": 1551786771268156184, "location": "book.translate.xml:2189", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 228, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 25, "source_unit": "https://translate-dev.freebsd.org/api/units/102370/?format=api", "priority": 100, "id": 34144, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=95890dd8c496bb18", "url": "https://translate-dev.freebsd.org/api/units/34144/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.405196Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "\tpushl\t$begin\t\t\t\t/* jump to high virtualized address */\n\tret\n\n/* now running relocated at KERNBASE where the system is linked to run */\nbegin:" ], "previous_source": "", "target": [ "\tpushl\t$begin\t\t\t\t/* jump to high virtualized address */\n\tret\n\n/* now running relocated at KERNBASE where the system is linked to run */\nbegin:" ], "id_hash": 8561530896435268759, "content_hash": 8561530896435268759, "location": "book.translate.xml:2193", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 229, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 25, "source_unit": "https://translate-dev.freebsd.org/api/units/102371/?format=api", "priority": 100, "id": 34145, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=f6d0aafd478e4c97", "url": "https://translate-dev.freebsd.org/api/units/34145/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.416672Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "The function <function>init386()</function> is called with a pointer to the first free physical page, after that <function>mi_startup()</function>. <function>init386</function> is an architecture dependent initialization function, and <function>mi_startup()</function> is an architecture independent one (the 'mi_' prefix stands for Machine Independent). The kernel never returns from <function>mi_startup()</function>, and by calling it, the kernel finishes booting:" ], "previous_source": "", "target": [ "" ], "id_hash": 5459392811433185964, "content_hash": 5459392811433185964, "location": "book.translate.xml:2199", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 230, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 52, "source_unit": "https://translate-dev.freebsd.org/api/units/102372/?format=api", "priority": 100, "id": 34147, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=cbc3a8d63ecbd2ac", "url": "https://translate-dev.freebsd.org/api/units/34147/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.429061Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/i386/i386/locore.s:</filename>\n\tmovl\tphysfree, %esi\n\tpushl\t%esi\t\t\t\t/* value of first for init386(first) */\n\tcall\t_init386\t\t\t/* wire 386 chip for unix operation */\n\tcall\t_mi_startup\t\t\t/* autoconfiguration, mountroot etc */\n\thlt\t\t/* never returns to here */" ], "previous_source": "", "target": [ "<filename>sys/i386/i386/locore.s:</filename>\n\tmovl\tphysfree, %esi\n\tpushl\t%esi\t\t\t\t/* value of first for init386(first) */\n\tcall\t_init386\t\t\t/* wire 386 chip for unix operation */\n\tcall\t_mi_startup\t\t\t/* autoconfiguration, mountroot etc */\n\thlt\t\t/* never returns to here */" ], "id_hash": 2599063148998124823, "content_hash": 2599063148998124823, "location": "book.translate.xml:2208", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 231, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 37, "source_unit": "https://translate-dev.freebsd.org/api/units/102373/?format=api", "priority": 100, "id": 34148, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=a411ba29e0d76517", "url": "https://translate-dev.freebsd.org/api/units/34148/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.436696Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<function>init386()</function>" ], "previous_source": "", "target": [ "" ], "id_hash": 5156086936705366475, "content_hash": 5156086936705366475, "location": "book.translate.xml:2216", "context": "", "note": "(itstool) path: sect2/title", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 232, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/102374/?format=api", "priority": 100, "id": 34150, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=c78e19c0355af9cb", "url": "https://translate-dev.freebsd.org/api/units/34150/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.456688Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<function>init386()</function> is defined in <filename>sys/i386/i386/machdep.c</filename> and performs low-level initialization specific to the i386 chip. The switch to protected mode was performed by the loader. The loader has created the very first task, in which the kernel continues to operate. Before looking at the code, consider the tasks the processor must complete to initialize protected mode execution:" ], "previous_source": "", "target": [ "" ], "id_hash": 2910832095395725264, "content_hash": 2910832095395725264, "location": "book.translate.xml:2218", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 233, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 56, "source_unit": "https://translate-dev.freebsd.org/api/units/102375/?format=api", "priority": 100, "id": 34151, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=a8655a5e56de3fd0", "url": "https://translate-dev.freebsd.org/api/units/34151/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.465580Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Initialize the kernel tunable parameters, passed from the bootstrapping program." ], "previous_source": "", "target": [ "" ], "id_hash": -5328921482662450207, "content_hash": -5328921482662450207, "location": "book.translate.xml:2229", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 234, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/102376/?format=api", "priority": 100, "id": 34152, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=360bde2535f4ebe1", "url": "https://translate-dev.freebsd.org/api/units/34152/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.472944Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Prepare the GDT." ], "previous_source": "", "target": [ "准备GDT(全局描述符表)。" ], "id_hash": 647716917981549738, "content_hash": 647716917981549738, "location": "book.translate.xml:2234", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 235, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/102377/?format=api", "priority": 100, "id": 34155, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=88fd271aeb4d14aa", "url": "https://translate-dev.freebsd.org/api/units/34155/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.479919Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Prepare the IDT." ], "previous_source": "", "target": [ "准备IDT(中断描述符表)。" ], "id_hash": -211121161498787148, "content_hash": -211121161498787148, "location": "book.translate.xml:2238", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 236, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/102378/?format=api", "priority": 100, "id": 34156, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=7d11f26c144c02b4", "url": "https://translate-dev.freebsd.org/api/units/34156/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.485841Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Initialize the system console." ], "previous_source": "", "target": [ "初始化系统控制台。" ], "id_hash": 1222461413106835769, "content_hash": 1222461413106835769, "location": "book.translate.xml:2242", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 237, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/102379/?format=api", "priority": 100, "id": 34159, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=90f70e2da7dae139", "url": "https://translate-dev.freebsd.org/api/units/34159/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.495795Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Initialize the DDB, if it is compiled into kernel." ], "previous_source": "", "target": [ "初始化DDB(内核的点调试器),如果它被编译进内核的话。" ], "id_hash": 4152514282231439949, "content_hash": 4152514282231439949, "location": "book.translate.xml:2246", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 238, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 9, "source_unit": "https://translate-dev.freebsd.org/api/units/102380/?format=api", "priority": 100, "id": 34160, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=b9a0b1bd1d24224d", "url": "https://translate-dev.freebsd.org/api/units/34160/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.507126Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Initialize the TSS." ], "previous_source": "", "target": [ "初始化TSS(任务状态段)。" ], "id_hash": 998333914161637941, "content_hash": 998333914161637941, "location": "book.translate.xml:2251", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 239, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/102381/?format=api", "priority": 100, "id": 34162, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=8ddacb67d0d46a35", "url": "https://translate-dev.freebsd.org/api/units/34162/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.514068Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Prepare the LDT." ], "previous_source": "", "target": [ "准备LDT(局部描述符表)。" ], "id_hash": 3142268028058164897, "content_hash": 3142268028058164897, "location": "book.translate.xml:2255", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 240, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/102382/?format=api", "priority": 100, "id": 34164, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=ab9b941f81795ea1", "url": "https://translate-dev.freebsd.org/api/units/34164/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.519618Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Set up proc0's pcb." ], "previous_source": "", "target": [ "建立proc0(0号进程,即内核的进程)的pcb(进程控制块)。" ], "id_hash": -8711774971391433844, "content_hash": -8711774971391433844, "location": "book.translate.xml:2259", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 241, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/102383/?format=api", "priority": 100, "id": 34166, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=07198ed20b13238c", "url": "https://translate-dev.freebsd.org/api/units/34166/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.531455Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<primary>parameters</primary>" ], "previous_source": "", "target": [ "<primary>parameters(参数)</primary>" ], "id_hash": -1938613604108112933, "content_hash": -1938613604108112933, "location": "book.translate.xml:2263", "context": "", "note": "(itstool) path: sect2/indexterm", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 242, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/102384/?format=api", "priority": 100, "id": 34167, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=6518a932c2656bdb", "url": "https://translate-dev.freebsd.org/api/units/34167/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.542282Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<function>init386()</function> initializes the tunable parameters passed from bootstrap by setting the environment pointer (envp) and calling <function>init_param1()</function>. The envp pointer has been passed from loader in the <literal>bootinfo</literal> structure:" ], "previous_source": "", "target": [ "<function>init386()</function>首先初始化内核的可调整参数,\n 这些参数由引导程序传来。先设置环境指针(environment pointer, envp)调用,\n 再调用<function>init_param1()</function>。\n envp指针已由loader存放在结构<literal>bootinfo</literal>中:" ], "id_hash": 7615617453547684842, "content_hash": 7615617453547684842, "location": "book.translate.xml:2264", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 243, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 29, "source_unit": "https://translate-dev.freebsd.org/api/units/102385/?format=api", "priority": 100, "id": 34169, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=e9b01bb987f983ea", "url": "https://translate-dev.freebsd.org/api/units/34169/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.549274Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/i386/i386/machdep.c:</filename>\n\t\tkern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE;\n\n\t/* Init basic tunables, hz etc */\n\tinit_param1();" ], "previous_source": "", "target": [ "<filename>sys/i386/i386/machdep.c:</filename>\n\t\tkern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE;\n\n\t/* Init basic tunables, hz etc */\n\tinit_param1();" ], "id_hash": -3401405425303308598, "content_hash": -3401405425303308598, "location": "book.translate.xml:2270", "context": "", "note": "(itstool) path: sect2/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 244, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 14, "source_unit": "https://translate-dev.freebsd.org/api/units/102386/?format=api", "priority": 100, "id": 34171, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=50cbc7c97fb5b6ca", "url": "https://translate-dev.freebsd.org/api/units/34171/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.560966Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<function>init_param1()</function> is defined in <filename>sys/kern/subr_param.c</filename>. That file has a number of sysctls, and two functions, <function>init_param1()</function> and <function>init_param2()</function>, that are called from <function>init386()</function>:" ], "previous_source": "", "target": [ "" ], "id_hash": -8216303503565745829, "content_hash": -8216303503565745829, "location": "book.translate.xml:2276", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 245, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 23, "source_unit": "https://translate-dev.freebsd.org/api/units/102387/?format=api", "priority": 100, "id": 34172, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=0df9d37ecf2a915b", "url": "https://translate-dev.freebsd.org/api/units/34172/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.570665Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/kern/subr_param.c:</filename>\n\thz = HZ;\n\tTUNABLE_INT_FETCH(\"kern.hz\", &hz);" ], "previous_source": "", "target": [ "<filename>sys/kern/subr_param.c:</filename>\n\thz = HZ;\n\tTUNABLE_INT_FETCH(\"kern.hz\", &hz);" ], "id_hash": 1575541201842057847, "content_hash": 1575541201842057847, "location": "book.translate.xml:2283", "context": "", "note": "(itstool) path: sect2/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 246, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/102388/?format=api", "priority": 100, "id": 34175, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=95dd726020c9b277", "url": "https://translate-dev.freebsd.org/api/units/34175/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.578961Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "TUNABLE_<typename>_FETCH is used to fetch the value from the environment:" ], "previous_source": "", "target": [ "" ], "id_hash": -6850610759654604266, "content_hash": -6850610759654604266, "location": "book.translate.xml:2287", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 247, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/102389/?format=api", "priority": 100, "id": 34177, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=20edbdcf68518216", "url": "https://translate-dev.freebsd.org/api/units/34177/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.594571Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>/usr/src/sys/sys/kernel.h:</filename>\n#define\tTUNABLE_INT_FETCH(path, var)\tgetenv_int((path), (var))" ], "previous_source": "", "target": [ "<filename>/usr/src/sys/sys/kernel.h:</filename>\n#define\tTUNABLE_INT_FETCH(path, var)\tgetenv_int((path), (var))" ], "id_hash": -4049811226271349518, "content_hash": -4049811226271349518, "location": "book.translate.xml:2290", "context": "", "note": "(itstool) path: sect2/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 248, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/102390/?format=api", "priority": 100, "id": 34179, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=47cc2e2582b504f2", "url": "https://translate-dev.freebsd.org/api/units/34179/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.609837Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Sysctl <literal>kern.hz</literal> is the system clock tick. Additionally, these sysctls are set by <function>init_param1()</function>: <literal>kern.maxswzone, kern.maxbcache, kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz, kern.sgrowsiz</literal>." ], "previous_source": "", "target": [ "" ], "id_hash": -1586850113454684236, "content_hash": -1586850113454684236, "location": "book.translate.xml:2293", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 249, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 22, "source_unit": "https://translate-dev.freebsd.org/api/units/102391/?format=api", "priority": 100, "id": 34181, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=69fa603ab3bec7b4", "url": "https://translate-dev.freebsd.org/api/units/34181/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.652238Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<primary>Global Descriptors Table (GDT)</primary>" ], "previous_source": "", "target": [ "" ], "id_hash": -6277306714833953306, "content_hash": -6277306714833953306, "location": "book.translate.xml:2299", "context": "", "note": "(itstool) path: sect2/indexterm", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 250, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/102392/?format=api", "priority": 100, "id": 34183, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=28e286cd2c25dde6", "url": "https://translate-dev.freebsd.org/api/units/34183/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.667584Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Then <function>init386()</function> prepares the Global Descriptors Table (GDT). Every task on an x86 is running in its own virtual address space, and this space is addressed by a segment:offset pair. Say, for instance, the current instruction to be executed by the processor lies at CS:EIP, then the linear virtual address for that instruction would be <quote>the virtual address of code segment CS</quote> + EIP. For convenience, segments begin at virtual address 0 and end at a 4Gb boundary. Therefore, the instruction's linear virtual address for this example would just be the value of EIP. Segment registers such as CS, DS etc are the selectors, i.e., indexes, into GDT (to be more precise, an index is not a selector itself, but the INDEX field of a selector). FreeBSD's GDT holds descriptors for 15 selectors per CPU:" ], "previous_source": "", "target": [ "" ], "id_hash": 7367580168285465604, "content_hash": 7367580168285465604, "location": "book.translate.xml:2303", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 251, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 135, "source_unit": "https://translate-dev.freebsd.org/api/units/102393/?format=api", "priority": 100, "id": 34184, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=e63ee720c0de2c04", "url": "https://translate-dev.freebsd.org/api/units/34184/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.680350Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/i386/i386/machdep.c:</filename>\nunion descriptor gdt[NGDT * MAXCPU];\t/* global descriptor table */\n\n<filename>sys/i386/include/segments.h:</filename>\n/*\n * Entries in the Global Descriptor Table (GDT)\n */\n#define\tGNULL_SEL\t0\t/* Null Descriptor */\n#define\tGCODE_SEL\t1\t/* Kernel Code Descriptor */\n#define\tGDATA_SEL\t2\t/* Kernel Data Descriptor */\n#define\tGPRIV_SEL\t3\t/* SMP Per-Processor Private Data */\n#define\tGPROC0_SEL\t4\t/* Task state process slot zero and up */\n#define\tGLDT_SEL\t5\t/* LDT - eventually one per process */\n#define\tGUSERLDT_SEL\t6\t/* User LDT */\n#define\tGTGATE_SEL\t7\t/* Process task switch gate */\n#define\tGBIOSLOWMEM_SEL\t8\t/* BIOS low memory access (must be entry 8) */\n#define\tGPANIC_SEL\t9\t/* Task state to consider panic from */\n#define GBIOSCODE32_SEL\t10\t/* BIOS interface (32bit Code) */\n#define GBIOSCODE16_SEL\t11\t/* BIOS interface (16bit Code) */\n#define GBIOSDATA_SEL\t12\t/* BIOS interface (Data) */\n#define GBIOSUTIL_SEL\t13\t/* BIOS interface (Utility) */\n#define GBIOSARGS_SEL\t14\t/* BIOS interface (Arguments) */" ], "previous_source": "", "target": [ "<filename>sys/i386/i386/machdep.c:</filename>\nunion descriptor gdt[NGDT * MAXCPU];\t/* global descriptor table */\n\n<filename>sys/i386/include/segments.h:</filename>\n/*\n * Entries in the Global Descriptor Table (GDT)\n */\n#define\tGNULL_SEL\t0\t/* Null Descriptor */\n#define\tGCODE_SEL\t1\t/* Kernel Code Descriptor */\n#define\tGDATA_SEL\t2\t/* Kernel Data Descriptor */\n#define\tGPRIV_SEL\t3\t/* SMP Per-Processor Private Data */\n#define\tGPROC0_SEL\t4\t/* Task state process slot zero and up */\n#define\tGLDT_SEL\t5\t/* LDT - eventually one per process */\n#define\tGUSERLDT_SEL\t6\t/* User LDT */\n#define\tGTGATE_SEL\t7\t/* Process task switch gate */\n#define\tGBIOSLOWMEM_SEL\t8\t/* BIOS low memory access (must be entry 8) */\n#define\tGPANIC_SEL\t9\t/* Task state to consider panic from */\n#define GBIOSCODE32_SEL\t10\t/* BIOS interface (32bit Code) */\n#define GBIOSCODE16_SEL\t11\t/* BIOS interface (16bit Code) */\n#define GBIOSDATA_SEL\t12\t/* BIOS interface (Data) */\n#define GBIOSUTIL_SEL\t13\t/* BIOS interface (Utility) */\n#define GBIOSARGS_SEL\t14\t/* BIOS interface (Arguments) */" ], "id_hash": 9174629869987849216, "content_hash": 9174629869987849216, "location": "book.translate.xml:2319", "context": "", "note": "(itstool) path: sect2/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 252, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 159, "source_unit": "https://translate-dev.freebsd.org/api/units/102394/?format=api", "priority": 100, "id": 34185, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=ff52d541ea506400", "url": "https://translate-dev.freebsd.org/api/units/34185/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.691576Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "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 example, an actual selector for the kernel code (GCODE_SEL) has the value 0x08." ], "previous_source": "", "target": [ "" ], "id_hash": -6185314331280180435, "content_hash": -6185314331280180435, "location": "book.translate.xml:2342", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 253, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 39, "source_unit": "https://translate-dev.freebsd.org/api/units/102395/?format=api", "priority": 100, "id": 34187, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=2a2959630be97b2d", "url": "https://translate-dev.freebsd.org/api/units/34187/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.707465Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<primary>Interrupt Descriptor Table (IDT)</primary>" ], "previous_source": "", "target": [ "" ], "id_hash": -5851456268081209083, "content_hash": -5851456268081209083, "location": "book.translate.xml:2347", "context": "", "note": "(itstool) path: sect2/indexterm", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 254, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/102396/?format=api", "priority": 100, "id": 34189, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=2ecb7386ca496105", "url": "https://translate-dev.freebsd.org/api/units/34189/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.719030Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "The next step is to initialize the Interrupt Descriptor Table (IDT). This table is referenced by the processor when a software or hardware interrupt occurs. For example, to make a system call, user application issues the <literal>INT 0x80</literal> instruction. This is a software interrupt, so the processor's hardware looks up a record with index 0x80 in the IDT. This record points to the routine that handles this interrupt, in this particular case, this will be the kernel's syscall gate. The IDT may have a maximum of 256 (0x100) records. The kernel allocates NIDT records for the IDT, where NIDT is the maximum (256):" ], "previous_source": "", "target": [ "" ], "id_hash": -5734709083183047243, "content_hash": -5734709083183047243, "location": "book.translate.xml:2349", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 255, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 103, "source_unit": "https://translate-dev.freebsd.org/api/units/102397/?format=api", "priority": 100, "id": 34190, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=306a3878feab1db5", "url": "https://translate-dev.freebsd.org/api/units/34190/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.735446Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/i386/i386/machdep.c:</filename>\nstatic struct gate_descriptor idt0[NIDT];\nstruct gate_descriptor *idt = &idt0[0];\t/* interrupt descriptor table */" ], "previous_source": "", "target": [ "<filename>sys/i386/i386/machdep.c:</filename>\nstatic struct gate_descriptor idt0[NIDT];\nstruct gate_descriptor *idt = &idt0[0];\t/* interrupt descriptor table */" ], "id_hash": 7585068796507817474, "content_hash": 7585068796507817474, "location": "book.translate.xml:2361", "context": "", "note": "(itstool) path: sect2/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 256, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 15, "source_unit": "https://translate-dev.freebsd.org/api/units/102398/?format=api", "priority": 100, "id": 34191, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=e94393e20cbf8602", "url": "https://translate-dev.freebsd.org/api/units/34191/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.746410Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "For each interrupt, an appropriate handler is set. The syscall gate for <literal>INT 0x80</literal> is set as well:" ], "previous_source": "", "target": [ "" ], "id_hash": -8037068513560695436, "content_hash": -8037068513560695436, "location": "book.translate.xml:2365", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 257, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 18, "source_unit": "https://translate-dev.freebsd.org/api/units/102399/?format=api", "priority": 100, "id": 34192, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=107698c4e5bced74", "url": "https://translate-dev.freebsd.org/api/units/34192/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.757375Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<filename>sys/i386/i386/machdep.c:</filename>\n\tsetidt(0x80, &IDTVEC(int0x80_syscall),\n\t\t\tSDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL));" ], "previous_source": "", "target": [ "<filename>sys/i386/i386/machdep.c:</filename>\n\tsetidt(0x80, &IDTVEC(int0x80_syscall),\n\t\t\tSDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL));" ], "id_hash": -5594138438486353386, "content_hash": -5594138438486353386, "location": "book.translate.xml:2369", "context": "", "note": "(itstool) path: sect2/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 258, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/102400/?format=api", "priority": 100, "id": 34194, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=325da0baada99a16", "url": "https://translate-dev.freebsd.org/api/units/34194/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.769281Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "So when a userland application issues the <literal>INT 0x80</literal> instruction, control will transfer to the function <function>_Xint0x80_syscall</function>, which is in the kernel code segment and will be executed with supervisor privileges." ], "previous_source": "", "target": [ "" ], "id_hash": -7762065141410761194, "content_hash": -7762065141410761194, "location": "book.translate.xml:2373", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 259, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 31, "source_unit": "https://translate-dev.freebsd.org/api/units/102401/?format=api", "priority": 100, "id": 34195, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=14479ae10ac4f616", "url": "https://translate-dev.freebsd.org/api/units/34195/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.779025Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "Console and DDB are then initialized:" ], "previous_source": "", "target": [ "" ], "id_hash": -6863308999037175752, "content_hash": -6863308999037175752, "location": "book.translate.xml:2379", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 260, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/102402/?format=api", "priority": 100, "id": 34196, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=20c0a0d428a5b838", "url": "https://translate-dev.freebsd.org/api/units/34196/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.786378Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "<primary>DDB</primary>" ], "previous_source": "", "target": [ "<primary>DDB</primary>" ], "id_hash": 8137874088173392274, "content_hash": 8137874088173392274, "location": "book.translate.xml:2380", "context": "", "note": "(itstool) path: sect2/indexterm", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 261, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/102403/?format=api", "priority": 100, "id": 34198, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=f0ef895dec6e5192", "url": "https://translate-dev.freebsd.org/api/units/34198/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:44.793000Z" } ] }{ "count": 2721, "next": "