Units
Translation components API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/translations/documentation/booksarch-handbookpci_index/id/units/?format=api&page=2
https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/units/?format=api", "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "If you place the above source file and [.filename]#Makefile# into a directory, you may run `make` to compile the sample driver. Additionally, you may run `make load` to load the driver into the currently running kernel and `make unload` to unload the driver after it is loaded." ], "previous_source": "", "target": [ "" ], "id_hash": -7099536478630949237, "content_hash": -7099536478630949237, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:282", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 51, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 47, "source_unit": "https://translate-dev.freebsd.org/api/units/1129726/?format=api", "priority": 100, "id": 1390508, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=1d79613009464e8b", "url": "https://translate-dev.freebsd.org/api/units/1390508/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.201304Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Additional Resources" ], "previous_source": "", "target": [ "" ], "id_hash": 4179957802809114289, "content_hash": 4179957802809114289, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:283", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 52, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1129728/?format=api", "priority": 100, "id": 1390509, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=ba023179ac8f3eb1", "url": "https://translate-dev.freebsd.org/api/units/1390509/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.208168Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "http://www.pcisig.org/[PCI Special Interest Group]" ], "previous_source": "", "target": [ "" ], "id_hash": 1663998764448494718, "content_hash": 1663998764448494718, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:286", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 53, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1129730/?format=api", "priority": 100, "id": 1390510, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=9717b60f5da4347e", "url": "https://translate-dev.freebsd.org/api/units/1390510/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.213482Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "PCI System Architecture, Fourth Edition by Tom Shanley, et al." ], "previous_source": "", "target": [ "" ], "id_hash": -1454631280952065051, "content_hash": -1454631280952065051, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:287", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 54, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/1129732/?format=api", "priority": 100, "id": 1390511, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=6bd01c8e93ae43e5", "url": "https://translate-dev.freebsd.org/api/units/1390511/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.217444Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Bus Resources" ], "previous_source": "", "target": [ "" ], "id_hash": 6474778008086669952, "content_hash": 6474778008086669952, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:289", "context": "", "note": "type: Title ==", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 55, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1129734/?format=api", "priority": 100, "id": 1390512, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=d9db084b23846a80", "url": "https://translate-dev.freebsd.org/api/units/1390512/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.221788Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "FreeBSD provides an object-oriented mechanism for requesting resources from a parent bus. Almost all devices will be a child member of some sort of bus (PCI, ISA, USB, SCSI, etc) and these devices need to acquire resources from their parent bus (such as memory segments, interrupt lines, or DMA channels)." ], "previous_source": "", "target": [ "" ], "id_hash": -1459293850244644638, "content_hash": -1459293850244644638, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:292", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 56, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 50, "source_unit": "https://translate-dev.freebsd.org/api/units/1129736/?format=api", "priority": 100, "id": 1390513, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=6bbf8bf9914180e2", "url": "https://translate-dev.freebsd.org/api/units/1390513/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.226999Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Base Address Registers" ], "previous_source": "", "target": [ "" ], "id_hash": -6273060512486327044, "content_hash": -6273060512486327044, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:293", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 57, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/1129738/?format=api", "priority": 100, "id": 1390514, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=28f19cb332b8fcfc", "url": "https://translate-dev.freebsd.org/api/units/1390514/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.234937Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "To do anything particularly useful with a PCI device you will need to obtain the _Base Address Registers_ (BARs) from the PCI Configuration space. The PCI-specific details of obtaining the BAR are abstracted in the `bus_alloc_resource()` function." ], "previous_source": "", "target": [ "" ], "id_hash": 2298597324416259985, "content_hash": 2298597324416259985, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:296", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 58, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 37, "source_unit": "https://translate-dev.freebsd.org/api/units/1129740/?format=api", "priority": 100, "id": 1390515, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=9fe642168b7e9791", "url": "https://translate-dev.freebsd.org/api/units/1390515/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.238894Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "For example, a typical driver might have something similar to this in the `attach()` function:" ], "previous_source": "", "target": [ "" ], "id_hash": 8002623316696028336, "content_hash": 8002623316696028336, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:298", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 59, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 15, "source_unit": "https://translate-dev.freebsd.org/api/units/1129742/?format=api", "priority": 100, "id": 1390516, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=ef0f0781beecd4b0", "url": "https://translate-dev.freebsd.org/api/units/1390516/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.242331Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ " sc->bar0id = PCIR_BAR(0);\n sc->bar0res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->bar0id,\n\t\t\t\t 0, ~0, 1, RF_ACTIVE);\n if (sc->bar0res == NULL) {\n printf(\"Memory allocation of PCI base register 0 failed!\\n\");\n error = ENXIO;\n goto fail1;\n }\n" ], "previous_source": "", "target": [ "" ], "id_hash": 7563779662022398588, "content_hash": 7563779662022398588, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:309", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 60, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 31, "source_unit": "https://translate-dev.freebsd.org/api/units/1129744/?format=api", "priority": 100, "id": 1390517, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=e8f7f1872a2b527c", "url": "https://translate-dev.freebsd.org/api/units/1390517/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.246729Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ " sc->bar1id = PCIR_BAR(1);\n sc->bar1res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->bar1id,\n\t\t\t\t 0, ~0, 1, RF_ACTIVE);\n if (sc->bar1res == NULL) {\n printf(\"Memory allocation of PCI base register 1 failed!\\n\");\n error = ENXIO;\n goto fail2;\n }\n sc->bar0_bt = rman_get_bustag(sc->bar0res);\n sc->bar0_bh = rman_get_bushandle(sc->bar0res);\n sc->bar1_bt = rman_get_bustag(sc->bar1res);\n sc->bar1_bh = rman_get_bushandle(sc->bar1res);\n" ], "previous_source": "", "target": [ "" ], "id_hash": 5133509776506667431, "content_hash": 5133509776506667431, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:322", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 61, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 43, "source_unit": "https://translate-dev.freebsd.org/api/units/1129746/?format=api", "priority": 100, "id": 1390518, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=c73de3f177acc1a7", "url": "https://translate-dev.freebsd.org/api/units/1390518/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.251754Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Handles for each base address register are kept in the `softc` structure so that they can be used to write to the device later." ], "previous_source": "", "target": [ "" ], "id_hash": 1395273226398414871, "content_hash": 1395273226398414871, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:325", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 62, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 24, "source_unit": "https://translate-dev.freebsd.org/api/units/1129748/?format=api", "priority": 100, "id": 1390519, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=935d019b60173817", "url": "https://translate-dev.freebsd.org/api/units/1390519/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.255257Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "These handles can then be used to read or write from the device registers with the `bus_space_*` functions. For example, a driver might contain a shorthand function to read from a board specific register like this:" ], "previous_source": "", "target": [ "" ], "id_hash": 4753573090179229662, "content_hash": 4753573090179229662, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:327", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 63, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 36, "source_unit": "https://translate-dev.freebsd.org/api/units/1129750/?format=api", "priority": 100, "id": 1390520, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=c1f8158a3dfd27de", "url": "https://translate-dev.freebsd.org/api/units/1390520/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.258296Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "uint16_t\nboard_read(struct ni_softc *sc, uint16_t address)\n{\n return bus_space_read_2(sc->bar1_bt, sc->bar1_bh, address);\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": -1881631713957041687, "content_hash": -1881631713957041687, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:335", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 64, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/1129752/?format=api", "priority": 100, "id": 1390521, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=65e319eceb7b29e9", "url": "https://translate-dev.freebsd.org/api/units/1390521/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.261572Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Similarly, one could write to the registers with:" ], "previous_source": "", "target": [ "" ], "id_hash": -1642376599329064125, "content_hash": -1642376599329064125, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:338", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 65, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 8, "source_unit": "https://translate-dev.freebsd.org/api/units/1129754/?format=api", "priority": 100, "id": 1390522, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=69351b2f4193bb43", "url": "https://translate-dev.freebsd.org/api/units/1390522/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.265117Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "void\nboard_write(struct ni_softc *sc, uint16_t address, uint16_t value)\n{\n bus_space_write_2(sc->bar1_bt, sc->bar1_bh, address, value);\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": 7155397246767281952, "content_hash": 7155397246767281952, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:346", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 66, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 14, "source_unit": "https://translate-dev.freebsd.org/api/units/1129756/?format=api", "priority": 100, "id": 1390523, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=e34d13e2905f3720", "url": "https://translate-dev.freebsd.org/api/units/1390523/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.268780Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "These functions exist in 8bit, 16bit, and 32bit versions and you should use `bus_space_{read|write}_{1|2|4}` accordingly." ], "previous_source": "", "target": [ "" ], "id_hash": -8282821802144077829, "content_hash": -8282821802144077829, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:349", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 67, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 15, "source_unit": "https://translate-dev.freebsd.org/api/units/1129758/?format=api", "priority": 100, "id": 1390524, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=0d0d8174895767fb", "url": "https://translate-dev.freebsd.org/api/units/1390524/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.296771Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "In FreeBSD 7.0 and later, you can use the `bus_*` functions instead of `bus_space_*`. The `bus_*` functions take a struct resource * pointer instead of a bus tag and handle. Thus, you could drop the bus tag and bus handle members from the `softc` and rewrite the `board_read()` function as:" ], "previous_source": "", "target": [ "" ], "id_hash": -1326596572561154466, "content_hash": -1326596572561154466, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:353", "context": "", "note": "type: delimited block = 4", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 68, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 50, "source_unit": "https://translate-dev.freebsd.org/api/units/1129760/?format=api", "priority": 100, "id": 1390525, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=6d96fb72243dde5e", "url": "https://translate-dev.freebsd.org/api/units/1390525/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.303610Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "uint16_t\nboard_read(struct ni_softc *sc, uint16_t address)\n{\n\treturn (bus_read(sc->bar1res, address));\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": -3397348066565614653, "content_hash": -3397348066565614653, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:361", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 69, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/1129762/?format=api", "priority": 100, "id": 1390526, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=50da31eef1ff13c3", "url": "https://translate-dev.freebsd.org/api/units/1390526/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.308168Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Interrupts" ], "previous_source": "", "target": [ "" ], "id_hash": 4548500038881723789, "content_hash": 4548500038881723789, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:365", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 70, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1129764/?format=api", "priority": 100, "id": 1390527, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=bf1f84afb665458d", "url": "https://translate-dev.freebsd.org/api/units/1390527/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.312223Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Interrupts are allocated from the object-oriented bus code in a way similar to the memory resources. First an IRQ resource must be allocated from the parent bus, and then the interrupt handler must be set up to deal with this IRQ." ], "previous_source": "", "target": [ "" ], "id_hash": 4112065784920741423, "content_hash": 4112065784920741423, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:368", "context": "", "note": "type: delimited block = 4", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 71, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 41, "source_unit": "https://translate-dev.freebsd.org/api/units/1129766/?format=api", "priority": 100, "id": 1390528, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=b910fe0b733d162f", "url": "https://translate-dev.freebsd.org/api/units/1390528/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.316452Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Again, a sample from a device `attach()` function says more than words." ], "previous_source": "", "target": [ "" ], "id_hash": 3765428998798586830, "content_hash": 3765428998798586830, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:370", "context": "", "note": "type: delimited block = 4", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 72, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/1129768/?format=api", "priority": 100, "id": 1390529, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=b4417db96c5833ce", "url": "https://translate-dev.freebsd.org/api/units/1390529/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.320445Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "/* Get the IRQ resource */\n" ], "previous_source": "", "target": [ "" ], "id_hash": -3673797461047135011, "content_hash": -3673797461047135011, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:374", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 73, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/1129770/?format=api", "priority": 100, "id": 1390530, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=4d040cac7d8db4dd", "url": "https://translate-dev.freebsd.org/api/units/1390530/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.323856Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ " sc->irqid = 0x0;\n sc->irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &(sc->irqid),\n\t\t\t\t 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);\n if (sc->irqres == NULL) {\n\tprintf(\"IRQ allocation failed!\\n\");\n\terror = ENXIO;\n\tgoto fail3;\n }\n" ], "previous_source": "", "target": [ "" ], "id_hash": 6613747448976308755, "content_hash": 6613747448976308755, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:383", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 74, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 28, "source_unit": "https://translate-dev.freebsd.org/api/units/1129772/?format=api", "priority": 100, "id": 1390531, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=dbc8c0438260fa13", "url": "https://translate-dev.freebsd.org/api/units/1390531/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.327434Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ " /* Now we should set up the interrupt handler */\n" ], "previous_source": "", "target": [ "" ], "id_hash": -4543295520966690718, "content_hash": -4543295520966690718, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:385", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 75, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/1129774/?format=api", "priority": 100, "id": 1390532, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=40f2f8cb8b283862", "url": "https://translate-dev.freebsd.org/api/units/1390532/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.331753Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ " error = bus_setup_intr(dev, sc->irqres, INTR_TYPE_MISC,\n\t\t\t my_handler, sc, &(sc->handler));\n if (error) {\n\tprintf(\"Couldn't set up irq\\n\");\n\tgoto fail4;\n }\n" ], "previous_source": "", "target": [ "" ], "id_hash": -7790109340676383347, "content_hash": -7790109340676383347, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:392", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 76, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 18, "source_unit": "https://translate-dev.freebsd.org/api/units/1129776/?format=api", "priority": 100, "id": 1390533, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=13e3f8d413881d8d", "url": "https://translate-dev.freebsd.org/api/units/1390533/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.340622Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Some care must be taken in the detach routine of the driver. You must quiesce the device's interrupt stream, and remove the interrupt handler. Once `bus_teardown_intr()` has returned, you know that your interrupt handler will no longer be called and that all threads that might have been executing this interrupt handler have returned. Since this function can sleep, you must not hold any mutexes when calling this function." ], "previous_source": "", "target": [ "" ], "id_hash": 6897904909905045999, "content_hash": 6897904909905045999, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:395", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 77, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 68, "source_unit": "https://translate-dev.freebsd.org/api/units/1129778/?format=api", "priority": 100, "id": 1390534, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=dfba47f8095029ef", "url": "https://translate-dev.freebsd.org/api/units/1390534/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.345074Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "DMA" ], "previous_source": "", "target": [ "" ], "id_hash": 2285541035077318466, "content_hash": 2285541035077318466, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:396", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 78, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1129780/?format=api", "priority": 100, "id": 1390535, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=9fb7df764b5cb742", "url": "https://translate-dev.freebsd.org/api/units/1390535/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.348596Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "This section is obsolete, and present only for historical reasons. The proper methods for dealing with these issues is to use the `bus_space_dma*()` functions instead. This paragraph can be removed when this section is updated to reflect that usage. However, at the moment, the API is in a bit of flux, so once that settles down, it would be good to update this section to reflect that." ], "previous_source": "", "target": [ "" ], "id_hash": -959609704791182836, "content_hash": -959609704791182836, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:399", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 79, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 67, "source_unit": "https://translate-dev.freebsd.org/api/units/1129782/?format=api", "priority": 100, "id": 1390536, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=72aec80ec6e7720c", "url": "https://translate-dev.freebsd.org/api/units/1390536/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.352367Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "On the PC, peripherals that want to do bus-mastering DMA must deal with physical addresses. This is a problem since FreeBSD uses virtual memory and deals almost exclusively with virtual addresses. Fortunately, there is a function, `vtophys()` to help." ], "previous_source": "", "target": [ "" ], "id_hash": -4505542813747033974, "content_hash": -4505542813747033974, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:401", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 80, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 39, "source_unit": "https://translate-dev.freebsd.org/api/units/1129784/?format=api", "priority": 100, "id": 1390537, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=417918aeaa4b488a", "url": "https://translate-dev.freebsd.org/api/units/1390537/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.356170Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "#include <vm/vm.h>\n#include <vm/pmap.h>\n" ], "previous_source": "", "target": [ "" ], "id_hash": -5633610065317403412, "content_hash": -5633610065317403412, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:406", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 81, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1129786/?format=api", "priority": 100, "id": 1390538, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=31d1657e65b0e4ec", "url": "https://translate-dev.freebsd.org/api/units/1390538/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.360606Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "#define vtophys(virtual_address) (...)\n" ], "previous_source": "", "target": [ "" ], "id_hash": 2832117704313281761, "content_hash": 2832117704313281761, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:408", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 82, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/1129788/?format=api", "priority": 100, "id": 1390539, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=a74db40bffb01ce1", "url": "https://translate-dev.freebsd.org/api/units/1390539/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.364315Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "The solution is a bit different on the alpha however, and what we really want is a function called `vtobus()`." ], "previous_source": "", "target": [ "" ], "id_hash": -5556038995601555399, "content_hash": -5556038995601555399, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:411", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 83, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 20, "source_unit": "https://translate-dev.freebsd.org/api/units/1129790/?format=api", "priority": 100, "id": 1390540, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=32e4fbf87cf38039", "url": "https://translate-dev.freebsd.org/api/units/1390540/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.368365Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "#if defined(__alpha__)\n#define vtobus(va) alpha_XXX_dmamap((vm_offset_t)va)\n#else\n#define vtobus(va) vtophys(va)\n#endif\n" ], "previous_source": "", "target": [ "" ], "id_hash": -3299689832399566146, "content_hash": -3299689832399566146, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:419", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 84, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/1129792/?format=api", "priority": 100, "id": 1390541, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=5235259476db0abe", "url": "https://translate-dev.freebsd.org/api/units/1390541/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.372270Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "Deallocating Resources" ], "previous_source": "", "target": [ "" ], "id_hash": 8211303612089306340, "content_hash": 8211303612089306340, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:421", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 85, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1129794/?format=api", "priority": 100, "id": 1390542, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=f1f469213d770ce4", "url": "https://translate-dev.freebsd.org/api/units/1390542/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.376308Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookpci_index/id/?format=api", "source": [ "It is very important to deallocate all of the resources that were allocated during `attach()`. Care must be taken to deallocate the correct stuff even on a failure condition so that the system will remain usable while your driver dies." ], "previous_source": "", "target": [ "" ], "id_hash": -6291558940050731992, "content_hash": -6291558940050731992, "location": "documentation/content/en/books/arch-handbook/pci/_index.adoc:423", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 86, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 40, "source_unit": "https://translate-dev.freebsd.org/api/units/1129796/?format=api", "priority": 100, "id": 1390543, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookpci_index/id/?checksum=28afe47a66d7cc28", "url": "https://translate-dev.freebsd.org/api/units/1390543/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2022-03-09T17:04:56.384604Z" } ] }{ "count": 86, "next": null, "previous": "