NeXTSTEPDRIVERKIT:Chapter5 AutoDetectionofDevices

From 흡혈양파의 번역工房
Revision as of 07:35, 29 January 2018 by Onionmixer (talk | contribs) (wiki 문법 수정)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Auto Detection of Devices

장치의 자동 감지

EISA- and PCI-compliant systems can support automatic detection of devices, referred to as the auto detect feature. When auto detect is supported, the system can determine which devices are connected to the bus and the location of the devices. Devices are easier to configure because less information is required in the .table files for the driver. Auto detect is nondestructive: It doesn't change the state of any device.
EISA 및 PCI 호환 시스템은 자동 감지 기능(auto detect feature) 이라고 하는 장치의 자동 감지를 지원할 수 있습니다. 자동 감지가 지원되면 시스템은 버스에 연결된 장치와 장치의 위치를 판별할 수 있습니다. 드라이버의 .table 파일에 필요한 정보가 적어지기 때문에 장치를 설정하는 것이 더 쉬워집니다. 자동 감지는 아무것도 망가뜨리지 않으며, 어떤 장치의 상태도 변경은 없습니다.


Auto detect determines which devices are connected to a bus and their bus location. Each device identifies itself with an auto detect ID and indicates its location with an anchor.
자동 감지 기능은 버스에 연결된 장치와 버스 위치를 결정합니다. 각 장치는 자동 감지 ID 로 자신을 식별하고 앵커(anchor)로 위치를 나타냅니다.


Auto Detect ID 와 Anchors

Each device driver identifies itself by an auto detect ID string, which is a list of identifiers that can be used to detect the devices that can be controlled by the driver. The meaning of the identifiers is different for each bus type.
각 장치 드라이버는 드라이버가 제어 할 수있는 장치를 검색하는데 사용할 수 있는 식별자 목록인 자동 검색 ID 문자열로 스스로(itself)를 식별합니다. 식별자의 의미는 각 버스 유형마다 다릅니다.

For the EISA, PCI and Plug and Play bus types, this ID is expressed as a 32-bit hexadecimal number containing the vendor ID and the device ID for the device. For the EISA bus and for Plug and Play, the device ID is in the lower 16 bits, and the vendor ID is in the upper 16 bits. For the PCI bus, the vendor ID is in the lower 16 bits, and the device ID is in the upper 16 bits. The "Auto Detect IDs" key should contain IDs for all the devices that can be controlled by the device driver. There is currently no provision for matching "don't care" bits in the ID, although that may be added in the future.
EISA, PCI 및 플러그 앤 플레이 버스 유형의 경우, 이 ID 는 장치의 공급 업체 ID 및 장치 ID 를 포함하는 32 비트 길이의 16 진수로 표시됩니다. EISA 버스 및 플러그 앤 플레이의 경우 장치 ID 는 하위 16 비트이며 공급 업체 ID 는 상위 16 비트가 됩니다. "Auto Detect IDs" 키에는 장치 드라이버에서 제어 할 수 있는 모든 장치의 ID 가 포함 되어야 합니다. 현재 ID 에 "do not care" 비트를 매칭하는 규정은 없지만, 미래에 추가될 수 있습니다.


When your driver is configured in the system, the configuration software will scan the bus for devices that match your auto detect IDs. When it finds a device, it will create a device description for your driver with a value for the "Location" key that allows you to locate your device on the bus. This key is known as the "anchor" for your device and is different for each bus type.
드라이버가 시스템에 설정(configured)되면 configuration 소프트웨어는 버스에서 자동 감지 ID 와 일치하는 장치를 검색합니다. 장치를 찾으면 버스에서 장치를 찾을 수있는 "Location" 키 값과 함께 드라이버에 대한 장치 설명(device description)을 만듭니다. 이 키는 장치의 "anchor" 로 알려져 있으며 각 버스 유형마다 다릅니다.


For the EISA bus, the anchor is a slot number between 0 and 15. The value of the "Location" key is "Slot <n>", where <n> is your slot number.
EISA 버스의 anchor 는 0 에서 15 사이의 슬롯 번호입니다. "Location" 키의 값은 "슬롯 <n>" 이며, 여기서 <n> 는 슬롯 번호입니다.


For the PCI bus, the anchor is a three-part identifier containing the bus number, the device number, and the function number for your device. The bus number can be between 0 and 255, the device number can be between 0 and 31, and the function number can be between 0 and 7. The syntax of the "Location" key is "Dev:<d> Func:<f> Bus:<b>", where <b> is the bus number, <d> is the device number, and <f> is the function number.
PCI 버스의 경우, anchor 는 버스 번호, 장치 번호 및 장치의 기능 번호를 포함하는 세 부분으로 된 식별자가 됩니다. 버스 번호는 0 에서 255 사이이며, 장치 번호는 0 에서 31 사이이고, 기능 번호는 0 에서 7 사이일 수 있습니다. "Location" 키의 구문은 "Dev:<d> Func:<f> 버스:<b>" 입니다. 여기서 <b> 는 버스 번호이고 <d> 는 장치 번호이며 <f> 는 기능 번호입니다.


Plug and Play support does not currently define an anchor for the card. Instead, the resources assigned in your configuration table, such as base I/O address, IRQ level, and DMA channels, are programmed into your device using the Plug and Play control registers. In the future, an anchor will be assigned so you can use new Driver Kit methods to control resources in more detail.
플러그 앤 플레이 지원은 현재 카드에 대한 anchor 를 정의하지 않으며, 대신에 기본 I/O 주소, IRQ 레벨 및 DMA 채널처럼 configuration table 에 할당 된 자원이 플러그 앤 플레이 제어 레지스터를 사용해서 장치에 프로그래밍 됩니다. 앞으로는 새로운 드라이버 키트의 방법을 사용해서 리소스를 보다 자세히 제어 할 수 있도록 anchor 가 지정됩니다.


자동 감지 프로세스

The driver bundle's Default.table has two key/value pairs of interest for auto detection: "Bus Type" and "Auto Detect IDs". The first tells which bus the driver supports. The second lists the auto detect IDs of all the supported devices for this driver, expressed in the 32-bit hexadecimal number format.
드라이버 번들(driver bundle)의 Default.table 에는 "Bus Type" 및 "Auto Detect IDs" 라는 자동 검색에 대한 두 가지 key/value 쌍이 있습니다. 첫 번째는 드라이버가 지원하는 버스를 알려줍니다. 두 번째 항목은 이 드라이버에 대해 지원되는 모든 장치의 자동 감지 ID(auto detect IDs) 를 나열하며 32 비트 16 진수 형식으로 표시됩니다.


Auto detection is used at two times: During installation and when you use the Configure application.
자동 감지는 두 번 사용됩니다 : 설치중일때와 Configure 응용 프로그램을 사용할 때.


During initial installation, the auto detect software scans each bus and obtains from each device its auto detect ID and its anchor in the form that the bus uses. It adds the "Location" key to your driver's device description in memory.
초기 설치 중, 자동 감지 소프트웨어는 각 버스를 스캔하고, 버스가 사용하는 형태로 각 장치에서 자동 감지 ID(auto detect ID) 와 앵커(anchor)를 가져옵니다.


Note: A computer may have more than one bus, and the buses may be different types.
Note: 컴퓨터에는 둘 이상의 버스가 있을 수 있으며 각 버스는 다른 유형일 수 있습니다.


When you use Configure to add a driver to your system, it looks at every file with a .table extension (with the exception of Instancen.table files) in each configuration bundle, trying to match bus types and auto detect IDs. It first examines the "Bus Type" and then the "Auto Detect IDs" key/value pairs and generates a candidate list of drivers for each device found. There may be more than one candidate driver for a device. In that case, the user is presented with a list of drivers for the device and asked to pick one. After the user chooses, the .table file is copied to an Instancen.table with this line appended:
Configure 프로그램을 사용해서 시스템에 드라이버를 추가하면 각 구성 번들(bundle)에서 .table 확장자를 가진 모든 파일(Instancen.table 파일은 제외)을 살펴보고 버스 유형을 일치시키며, ID 를 자동 감지 합니다. 먼저 "Bus Type" 과 "Auto Detect IDs" key/value 쌍을 검사하고 발견된 각 장치에 대한 드라이버의 후보 목록을 생성합니다. 장치에 대한 후보 드라이버가 두 개 이상 있을 수 있습니다. 이 경우, 사용자는 장치에 대한 드라이버 목록을 제공 받고 이를 선택하도록 요청받습니다. 사용자가 드라이버를 선택하면, .table 파일이 아래의 행을 추가한 Instancen.table 에 복사됩니다.

"Location" = "anchor"


where anchor is the anchor in the format appropriate for the bus.
여기서 anchor 는 버스에 적합한 형식의 anchor 입니다.


There are cases where "Location" is blank. Each bus-specific category of IODirectDevice (IOEISADirectDevice, IOPCIDirectDevice, and so on) and IODeviceDescription subclass (IOPCMCIADeviceDescription and so on) provide methods for extracting this information, such as getPCIDevice:function:bus and getEISASlotNumber.
"Location" 이 비어있는 경우가 있습니다. IODirectDevice (IOEISADirectDevice, IOPCIDirectDevice 등)및 IODeviceDescription 하위 클래스(IOPCMCIADeviceDescription 등)의 각 버스 관련 카테고리는 getPCIDevice:function:bus 및 getEISASlotNumber 와 같은 해당 정보를 추출하는 메소드를 제공합니다.