Example: Human Interface Devices The specification for the Human Interface Devices like keyboards, mice, tablets, buttons, dials,etc. is referred to in other device class specifications and is used in many devices.
例子:人机界面设备。人机界面设备,如键盘、鼠标、数字输入板、 按钮、拨号盘等的规范被其他设备类规范引用,并在很多设备中使用。
a month ago
New strings to translate a month ago
Resource update a month ago
Because ofDue to this practice, FreeBSD drivers usually rely on numeric IDs for device identification. Using numeric IDs and a centralized database complicates adding IDs and support for cards to the system. One must carefully check to see who really made the card, especially when it appears that the vendor who made the card might already have a different manufacturer ID listed in the central database. Linksys, D-Link, and NetGear are a number of US manufacturers of LAN hardware that often sell the same design. These same designs can be sold in Japan under names such as Buffalo and Corega. Often, these devices will all have the same manufacturer and product IDs.
a month ago
Example: Firmware download Many devices that have been developed are based on a general purpose processor with an additional USB core added to it. BecausSince the development of drivers and firmware for USB devices is still very new, many devices require the downloading of the firmware after they have been connected.
a month ago
The poll function is used to simulate the interrupts when the interrupt subsystem is not functioning (for example, when the system has crashed and is creating the system dump). The CAM subsystem sets the proper interrupt level before calling the poll routine. So all it needs to do is to call the interrupt routine (or the other way around, the poll routine may be doing the real action and the interrupt routine would just call the poll routine). Why bother about a separate function then? Because ofDue to different calling conventions. The <function>xxx_poll</function> routine gets the struct cam_sim pointer as its argument when the PCI interrupt routine by common convention gets pointer to the struct <varname remap="structname">xxx_softc</varname> and the ISA interrupt routine gets just the device unit number. So the poll routine would normally look as:
a month ago
That is all for the ABORT request, although there is one more issue. BecauseAs the ABORT message cleans all the ongoing transactions on a LUN we have to mark all the other active transactions on this LUN as aborted. That should be done in the interrupt routine, after the transaction gets aborted.
a month ago
If the CCB is being transferred right now we would like to signal to the SCSI controller in some hardware-dependent way that we want to abort the current transfer. The SCSI controller would set the SCSI ATTENTION signal and when the target responds to it send an ABORT message. We also reset the timeout to make sure that the target is not sleeping forever. If the command would not get aborted in some reasonable time like 10 seconds the timeout routine would go ahead and reset the whole SCSI bus. BecausSince the command will be aborted in some reasonable time we can just return the abort request now as successfully completed, and mark the aborted CCB as aborted (but not mark it as done yet).
a month ago
BecauseAs we are interested in writing a SCSI adapter driver here, from this point on we will consider everything from the SIM standpoint.
a month ago
Then allocate and activate all the necessary resources. BecauseAs normally the port range will be released before returning from probe, it has to be allocated again. We expect that the probe routine had properly set all the resource ranges, as well as saved them in the structure softc. If the probe routine had left some resource allocated then it does not need to be allocated again (which would be considered an error).
a month ago
Before calling the callback function from <function>bus_dmamap_load()</function> the segment array is stored in the stack. And it gets pre-allocated for the maximal number of segments allowed by the tag. BecauseAs a result of this the practical limit for the number of segments on i386 architecture is about 250-300 (the kernel stack is 4KB minus the size of the user structure, size of a segment array entry is 8 bytes, and some space must be left). BecausSince the array is allocated based on the maximal number this value must not be set higher than really needed. Fortunately, for most of hardware the maximal supported number of segments is much lower. But if the driver wants to handle buffers with a very large number of scatter-gather segments it should do that in portions: load part of the buffer, transfer it to the device, load next part of the buffer, and so on.
a month ago
Free the memory allocated by <function>bus_dmamem_alloc()</function>. At present, freeing of the memory allocated with ISA restrictions is not implemented. Because ofDue to this the recommended model of use is to keep and re-use the allocated areas for as long as possible. Do not lightly free some area and then shortly allocate it again. That does not mean that <function>bus_dmamem_free()</function> should not be used at all: hopefully it will be properly implemented soon.
a month ago
BecauseAs the PnP devices are disabled when probing the legacy devices they will not be attached twice (once as legacy and once as PnP). But in case of device-dependent identify routines it is the responsibility of the driver to make sure that the same device will not be attached by the driver twice: once as legacy user-configured and once as auto-identified.
a month ago
<literal>boot2</literal> defines an important structure, <literal>struct bootinfo</literal>. This structure is initialized by <literal>boot2</literal> and passed to the loader, and then further to the kernel. Some nodes of this structures are set by <literal>boot2</literal>, the rest by the loader. This structure, among other information, contains the kernel filename, <acronym>BIOS</acronym> harddisk geometry, <acronym>BIOS</acronym> drive number for boot device, physical memory available, <literal>envp</literal> pointer etc. The definition for it is:
boot2 定义了很重要的引导信息数据结构。此结构由 boot2 初始化,然后传递到加载程序,再传到内核。
3 months ago
#define XREADORG 0x725
#define XREADORG 0x725
3 months ago
Resource update 7 months ago
Committed changes 7 months ago
The value of <literal>0xfffffff0</literal> is slightly less than 4 GB, so unless the machine has 4 GB of physical memory, it cannot point to a valid memory address. The computer's hardware translates this address so that it points to a <acronym>BIOS</acronym> memory block.
0xfffffff0 <literal>0xfffffff0</literal> 略小于4G,因此计算机没有 4G 字节物理内存, 这就不会是一个有效的内存地址。计算机硬件将这个地址转指向BIOS <acronym>BIOS</acronym> 存储块。
7 months ago
The key to understanding this process is that it is a series of stages of increasing complexity. These stages are <filename>boot1</filename>, <filename>boot2</filename>, and <filename>loader</filename> (see <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more detail). The boot system executes each stage in sequence. The last stage, <filename>loader</filename>, is responsible for loading the FreeBSD kernel. Each stage is examined in the following sections.
理解此过程的关键在于这些阶段的复杂度逐级增加。这些阶段是<filename>boot1</filename>,<filename>boot2</filename> 和 <filename>loader</filename>(更多详情请参阅 <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>8</manvolnum></citerefentry>)。这些阶段在系统启动时按顺序执行。最后一步,<filename>loader</filename>,负责加载 FreeBSD 内核。以下章节将介绍各个阶段。
7 months ago

Search