Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting TCP-IP programmer's guide.Ver 1.6.pdf
Скачиваний:
43
Добавлен:
23.08.2013
Размер:
2.64 Mб
Скачать

The i8255x Ethernet Driver

D.3 Porting the i8255x driver

This section lists considerations for porting the i8255x driver:

Driver memory allocation on page D-6

µHAL on page D-6.

Note

ARM currently provides the i8255x driver in object form. There is no source code provided as a starting point for porting.

D.3.1 Driver memory allocation

Data areas that need to be shared between the Ethernet MAC and the IP stack are allocated using the i8255x_alloc() function. As shipped, this function manages the area of memory being used as a heap, using a very simple allocation algorithm that assumes the memory is never freed.

TO_PCI_ADDRESS This macro translates from the virtual address of a memory area allocated by i8255x_alloc() to the physical address of the memory area, as seen from the PCI bus.

TO_CPU_ADDRESS This macro translates the physical address (as seen from the PCI bus) of a memory area to the virtual address that the processor would use to access that memory.

D.3.2 µHAL

If your target system does not support µHAL, you must provide routines that implement equivalent functionality to the following ARM Firmware Suite 1.1 functions:

uHALr_PCIHost()

PCIr_ForEveryDevice()

uHALr_EnableInterrupt()

uHALr_DisableInterrupt()

uHALr_FreeInterrupt()

uHALr_RequestInterrupt()

uHALr_PCICfgWrite16()

uHALr_PCICfgRead16()

uHALr_PCICfgWrite32()

uHALr_PCICfgRead32()

uHALr_PCICfgWrite8()

D-6

Copyright © 1998-2001 ARM Limited. All rights reserved.

ARM DUI 0144B

The i8255x Ethernet Driver

uHALr_PCICfgRead8()

uHALr_PCIIORead32().

Please refer to the documentation that accompanies the ARM Firmware Suite for details of the functionality provided by these routines.

ARM DUI 0144B

Copyright © 1998-2001 ARM Limited. All rights reserved.

D-7

The i8255x Ethernet Driver

D-8

Copyright © 1998-2001 ARM Limited. All rights reserved.

ARM DUI 0144B