serviço do kernel eeh_init
Propósito
Este serviço registra um slot de adaptador de função única em um barramento PCI/PCI-E para funcionamento de EEH.
Sintaxe
#include <sys/eeh.h>
eeh_handle_t eeh_init(pbid, slot, flag)
long pbid;
long slot;
long flag;
Parâmetros
| Item | Descrição |
|---|---|
| pbid | Identificador de barramento pai do AIX |
| slot | slot de dispositivo (device*8+function). Essa é a mesma propriedade "connwhere" em CuDv. |
| flag | bandeira que possibilita eeh |
Descrição
O argumento pbid identifica um tipo de barramento e número. O tipo de barramento é IO_PCI no caso de barramento PCI e PCI-X. Se o tipo de barramento for IO_PCIE, o dispositivo está em barramento PCI-E (PCI Express). O número do barramento é um identificador único determinado durante a configuração do barramento. A macro BID_VAL definida em ioacc.h é usada para gerar o bid(lance). O argumento slot é a combinação dispositivo / função (((device*8) + função) como no esquema de endereçamento PCI. O argumento bandeira de EEH_ENABLE ativa o slot. O argumento bandeira de EEH_DISABLE não habilita o slot mas ainda aloca uma alça de EEH. Este serviço deve ser chamado apenas pelos drivers de adaptador de função única.
A macro EEH_INIT(pbid, slot, bandeira) é fornecida para que os drivers de dispositivo chamem este serviço. O eeh_handle é definido como a seguir em <sys/eeh.h>:
/*
* This is the eeh_handle structure for the eeh_* services
*/
typedef struct eeh_handle * eeh_handle_t;
struct eeh_handle {
struct eeh_handle *next;
long bid; /* bus id passed to eeh_init */
long slot; /* slot passed to eeh_init */
long flag; /* flag passed to eeh_init */
int config_addr; /* Configuration Space Address */
int eeh_mode; /* Indicates safe mode */
uint retry_delay; /* re-read the slot state after *
* these many seconds. */
int reserved1;
int reserved2;
int reserved3;
long long PHB_Unit_ID; /* /pci@ */
void (*eeh_clear)(eeh_handle_t);
long (*eeh_enable_pio)(eeh_handle_t);
long (*eeh_enable_dma)(eeh_handle_t);
long (*eeh_reset_slot)(eeh_handle_t, int);
long (*eeh_enable_slot)(eeh_handle_t);
long (*eeh_disable_slot)(eeh_handle_t);
long (*eeh_read_slot_state)(eeh_handle_t, long *, long *);
long (*eeh_slot_error)(eeh_handle_t, int, char *, long);
struct eeh_shared_domain *parent_sd; /* point back to the parent
* shared domain structure if
* in shared domain, NULL if singlefunc.
*/
void (*eeh_configure_bridge)(eeh_handle_t);
void (*eeh_broadcast)(eeh_handle_t, unsigned long long);
};
Este é um serviço de kernel exportado.
Ambiente de Execução
Este serviço só pode ser chamado a partir do ambiente de processo.
Valores De Retorno
| Item | Descrição |
|---|---|
| EEH_FAIL | Não é possível alocar alça de EEH. |
| EEH_NO_SUPPORT | EEH não suportado neste sistema, sem alça alocada. |
| struct eeh_handle * | Se bem-sucedido. |