Rev 3198 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3198 | Rev 3205 | ||
---|---|---|---|
Line 314... | Line 314... | ||
314 | .fset db ? |
314 | .fset db ? |
315 | .fdx db ? |
315 | .fdx db ? |
Line 316... | Line 316... | ||
316 | 316 | ||
317 | .io_addr dd ? |
317 | .io_addr dd ? |
318 | .irq_line db ? |
318 | .irq_line db ? |
319 | .pci_bus db ? |
319 | .pci_bus dd ? |
Line 320... | Line 320... | ||
320 | .pci_dev db ? |
320 | .pci_dev dd ? |
321 | 321 | ||
322 | .read_csr dd ? |
322 | .read_csr dd ? |
323 | .write_csr dd ? |
323 | .write_csr dd ? |
Line 424... | Line 424... | ||
424 | mov esi, device_list |
424 | mov esi, device_list |
425 | ; mov eax, [IOCTL.input] ; get the pci bus and device numbers |
425 | ; mov eax, [IOCTL.input] ; get the pci bus and device numbers |
426 | mov ax , [eax+1] ; |
426 | mov ax , [eax+1] ; |
427 | .nextdevice: |
427 | .nextdevice: |
428 | mov ebx, [esi] |
428 | mov ebx, [esi] |
429 | cmp ax , word [device.pci_bus] ; compare with pci and device num in device list (notice the usage of word instead of byte) |
429 | cmp al, byte[device.pci_bus] |
- | 430 | jne @f |
|
- | 431 | cmp ah, byte[device.pci_dev] |
|
430 | je .find_devicenum ; Device is already loaded, let's find it's device number |
432 | je .find_devicenum ; Device is already loaded, let's find it's device number |
- | 433 | @@: |
|
431 | add esi, 4 |
434 | add esi, 4 |
432 | loop .nextdevice |
435 | loop .nextdevice |
Line 433... | Line 436... | ||
433 | 436 | ||
Line 449... | Line 452... | ||
449 | mov [device.name], my_service |
452 | mov [device.name], my_service |
Line 450... | Line 453... | ||
450 | 453 | ||
Line 451... | Line 454... | ||
451 | ; save the pci bus and device numbers |
454 | ; save the pci bus and device numbers |
452 | 455 | ||
453 | mov eax, [IOCTL.input] |
456 | mov eax, [IOCTL.input] |
454 | mov cl, [eax+1] |
457 | movzx ecx, byte[eax+1] |
455 | mov [device.pci_bus], cl |
458 | mov [device.pci_bus], ecx |
Line 456... | Line 459... | ||
456 | mov cl, [eax+2] |
459 | movzx ecx, byte[eax+2] |
Line 457... | Line 460... | ||
457 | mov [device.pci_dev], cl |
460 | mov [device.pci_dev], ecx |
Line 458... | Line 461... | ||
458 | 461 | ||
Line 459... | Line 462... | ||
459 | ; Now, it's time to find the base io addres of the PCI device |
462 | ; Now, it's time to find the base io addres of the PCI device |
Line 460... | Line 463... | ||
460 | 463 | ||
461 | find_io [device.pci_bus], [device.pci_dev], [device.io_addr] |
464 | PCI_find_io |
Line 462... | Line 465... | ||
462 | 465 | ||
Line 695... | Line 698... | ||
695 | 698 | ||
696 | mov [device.dxsuflo],1 |
699 | mov [device.dxsuflo],1 |
697 | mov [device.ltint],1 |
700 | mov [device.ltint],1 |
Line 698... | Line 701... | ||
698 | .L11: |
701 | .L11: |
Line 699... | Line 702... | ||
699 | 702 | ||
700 | make_bus_master [device.pci_bus], [device.pci_dev] |
703 | PCI_make_bus_master |
701 | 704 |