diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/include/netif/xadapter.h b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/include/netif/xadapter.h index 23686eab..dacd2f31 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/include/netif/xadapter.h +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/include/netif/xadapter.h @@ -58,6 +58,9 @@ struct xemac_s { #if !NO_SYS sys_sem_t sem_rx_data_available; #endif +#if defined(OS_IS_FREERTOS) && defined(__arm__) && !defined(ARMR5) + TimerHandle_t xTimer; +#endif }; void lwip_raw_init(); diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xadapter.c b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xadapter.c index d435cc08..7e582efc 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xadapter.c +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xadapter.c @@ -1,6 +1,6 @@ /****************************************************************************** * -* Copyright (C) 2007 - 2014 Xilinx, Inc. All rights reserved. +* Copyright (C) 2007 - 2017 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -135,7 +135,7 @@ xemac_add(struct netif *netif, case xemac_type_xps_emaclite: #ifdef XLWIP_CONFIG_INCLUDE_EMACLITE return netif_add(netif, ipaddr, netmask, gw, - (void*)mac_baseaddr, + (void*)(UINTPTR)mac_baseaddr, xemacliteif_init, #if NO_SYS ethernet_input @@ -149,7 +149,7 @@ xemac_add(struct netif *netif, case xemac_type_axi_ethernet: #ifdef XLWIP_CONFIG_INCLUDE_AXI_ETHERNET return netif_add(netif, ipaddr, netmask, gw, - (void*)mac_baseaddr, + (void*)(UINTPTR)mac_baseaddr, xaxiemacif_init, #if NO_SYS ethernet_input diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif.c b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif.c index 971e66a3..3bfededc 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif.c +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif.c @@ -86,6 +86,11 @@ static u8_t xemacps_mcast_entry_mask = 0; XEmacPs_Config *mac_config; struct netif *NetIf; +#if defined(OS_IS_FREERTOS) && defined(__arm__) && !defined(ARMR5) +int32_t lExpireCounter = 0; +#define RESETRXTIMEOUT 10 +#endif + /* * this function is always called with interrupts off * this function also assumes that there are available BD's @@ -266,6 +271,21 @@ s32_t xemacpsif_input(struct netif *netif) } +#if defined(OS_IS_FREERTOS) && defined(__arm__) && !defined(ARMR5) +void vTimerCallback( TimerHandle_t pxTimer ) +{ + /* Do something if the pxTimer parameter is NULL */ + configASSERT(pxTimer); + + lExpireCounter++; + /* If the timer has expired 100 times then reset RX */ + if(lExpireCounter >= RESETRXTIMEOUT) { + lExpireCounter = 0; + xemacpsif_resetrx_on_no_rxdata(NetIf); + } +} + #endif + static err_t low_level_init(struct netif *netif) { UINTPTR mac_address = (UINTPTR)(netif->state); @@ -337,6 +357,17 @@ static err_t low_level_init(struct netif *netif) XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, XEMACPS_DMACR_OFFSET, dmacrreg); +#if defined(OS_IS_FREERTOS) && defined(__arm__) && !defined(ARMR5) + /* Freertos tick is 10ms by default; set period to the same */ + xemac->xTimer = xTimerCreate("Timer", 10, pdTRUE, ( void * ) 1, vTimerCallback); + if (xemac->xTimer == NULL) { + ipmc_lwip_printf("In %s:Timer creation failed....\r\n", __func__); + } else { + if(xTimerStart(xemac->xTimer, 0) != pdPASS) { + ipmc_lwip_printf("In %s:Timer start failed....\r\n", __func__); + } + } +#endif setup_isr(xemac); init_dma(xemac); start_emacps(xemacpsif); diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_dma.c b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_dma.c index f032c05e..4a5b3060 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_dma.c +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_dma.c @@ -311,7 +311,11 @@ XStatus emacps_sgsend(xemacpsif_s *xemacpsif, struct pbuf *p) /* Send the data from the pbuf to the interface, one pbuf at a time. The size of the data in each pbuf is kept in the ->len variable. */ - Xil_DCacheFlushRange((UINTPTR)q->payload, (UINTPTR)q->len); + // TODO: For when Vivado gets update to 2017.4 + //if (xemacpsif->emacps.Config.IsCacheCoherent == 0) { + Xil_DCacheFlushRange((UINTPTR)q->payload, (UINTPTR)q->len); + //} + XEmacPs_BdSetAddressTx(txbd, (UINTPTR)q->payload); #ifdef ZYNQMP_USE_JUMBO @@ -413,9 +417,14 @@ void setup_rx_bds(xemacpsif_s *xemacpsif, XEmacPs_BdRing *rxring) return; } #ifdef ZYNQMP_USE_JUMBO - Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)MAX_FRAME_SIZE_JUMBO); + if (xemacpsif->emacps.Config.IsCacheCoherent == 0) { + Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)MAX_FRAME_SIZE_JUMBO); + } #else - Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)XEMACPS_MAX_FRAME_SIZE); + // TODO: For when Vivado gets update to 2017.4 + //if (xemacpsif->emacps.Config.IsCacheCoherent == 0) { + Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)XEMACPS_MAX_FRAME_SIZE); + //} #endif bdindex = XEMACPS_BD_TO_INDEX(rxring, rxbd); temp = (u32 *)rxbd; @@ -551,6 +560,24 @@ XStatus init_dma(struct xemac_s *xemac) XEmacPs_Bd *bdrxterminate; u32 *temp; + /* + * Disable L1 prefetch if the processor type is Cortex A53. It is + * observed that the L1 prefetching for ARMv8 can cause issues while + * dealing with cache memory on Rx path. On Rx path, the lwIP adapter + * does a clean and invalidation of buffers (pbuf payload) before + * allocating them to Rx BDs. However, there are chances that the + * the same cache line may get prefetched by the time Rx data is + * DMAed to the same buffer. In such cases, CPU fetches stale data from + * cache memory instead of getting them from memory. To avoid such + * scenarios L1 prefetch is being disabled for ARMv8. That can cause + * a performance degaradation in the range of 3-5%. In tests, it is + * generally observed that this performance degaradation is quite + * insignificant to be really visible. + */ +#if defined __aarch64__ + Xil_ConfigureL1Prefetch(0); +#endif + xemacpsif_s *xemacpsif = (xemacpsif_s *)(xemac->state); struct xtopology_t *xtopologyp = &xtopology[xemac->topology_index]; @@ -694,9 +721,14 @@ XStatus init_dma(struct xemac_s *xemac) *temp = 0; dsb(); #ifdef ZYNQMP_USE_JUMBO - Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)MAX_FRAME_SIZE_JUMBO); + if (xemacpsif->emacps.Config.IsCacheCoherent == 0) { + Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)MAX_FRAME_SIZE_JUMBO); + } #else - Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)XEMACPS_MAX_FRAME_SIZE); + // TODO: For when Vivado gets update to 2017.4 + //if (xemacpsif->emacps.Config.IsCacheCoherent == 0) { + Xil_DCacheInvalidateRange((UINTPTR)p->payload, (UINTPTR)XEMACPS_MAX_FRAME_SIZE); + //} #endif XEmacPs_BdSetAddressRx(rxbd, (UINTPTR)p->payload); @@ -724,10 +756,10 @@ XStatus init_dma(struct xemac_s *xemac) XEmacPs_Out32((xemacpsif->emacps.Config.BaseAddress + XEMACPS_RXQ1BASE_OFFSET), (UINTPTR)bdrxterminate); XEmacPs_BdClear(bdtxterminate); - XEmacPs_BdSetStatus(bdrxterminate, (XEMACPS_TXBUF_USED_MASK | + XEmacPs_BdSetStatus(bdtxterminate, (XEMACPS_TXBUF_USED_MASK | XEMACPS_TXBUF_WRAP_MASK)); XEmacPs_Out32((xemacpsif->emacps.Config.BaseAddress + XEMACPS_TXQBASE_OFFSET), - (UINTPTR)bdrxterminate); + (UINTPTR)bdtxterminate); } diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_hw.c b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_hw.c index 9124fa4e..11a62f5b 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_hw.c +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_hw.c @@ -209,7 +209,7 @@ void emacps_error_handler(void *arg,u8 Direction, u32 ErrorWord) xemac = (struct xemac_s *)(arg); xemacpsif = (xemacpsif_s *)(xemac->state); rxring = &XEmacPs_GetRxRing(&xemacpsif->emacps); - txring = &XEmacPs_GetRxRing(&xemacpsif->emacps); + txring = &XEmacPs_GetTxRing(&xemacpsif->emacps); if (ErrorWord != 0) { switch (Direction) { diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_physpeed.c b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_physpeed.c index 5b144ec4..d948b49a 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_physpeed.c +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/netif/xemacpsif_physpeed.c @@ -111,6 +111,11 @@ #include "xparameters_ps.h" #include "xparameters.h" +#if defined (__aarch64__) +#include "bspconfig.h" +#include "xil_smc.h" +#endif + /* Advertisement control register. */ #define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ #define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ @@ -904,12 +909,28 @@ static void SetUpSLCRDivisors(u32_t mac_baseaddr, s32_t speed) } if (CrlApbDiv0 != 0 && CrlApbDiv1 != 0) { + #if EL1_NONSECURE + XSmc_OutVar RegRead; + RegRead = Xil_Smc(MMIO_READ_SMC_FID, (u64)(CrlApbBaseAddr), + 0, 0, 0, 0, 0, 0); + CrlApbGemCtrl = RegRead.Arg0 >> 32; + #else CrlApbGemCtrl = *(volatile u32_t *)(UINTPTR)(CrlApbBaseAddr); + #endif CrlApbGemCtrl &= ~CRL_APB_GEM_DIV0_MASK; CrlApbGemCtrl |= CrlApbDiv0 << CRL_APB_GEM_DIV0_SHIFT; CrlApbGemCtrl &= ~CRL_APB_GEM_DIV1_MASK; CrlApbGemCtrl |= CrlApbDiv1 << CRL_APB_GEM_DIV1_SHIFT; + #if EL1_NONSECURE + Xil_Smc(MMIO_WRITE_SMC_FID, (u64)(CrlApbBaseAddr) | ((u64)(0xFFFFFFFF) << 32), + (u64)CrlApbGemCtrl, 0, 0, 0, 0, 0); + do { + RegRead = Xil_Smc(MMIO_READ_SMC_FID, (u64)(CrlApbBaseAddr), + 0, 0, 0, 0, 0, 0); + } while((RegRead.Arg0 >> 32) != CrlApbGemCtrl); + #else *(volatile u32_t *)(UINTPTR)(CrlApbBaseAddr) = CrlApbGemCtrl; + #endif } else { ipmc_lwip_printf("Clock Divisors incorrect - Please check\r\n"); } diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/sys_arch.c b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/sys_arch.c index e2592f8f..3a35896b 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/sys_arch.c +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/contrib/ports/xilinx/sys_arch.c @@ -6,7 +6,7 @@ /****************************************************************************** * -* Copyright (C) 2007 - 2014 Xilinx, Inc. All rights reserved. +* Copyright (C) 2007 - 2017 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -476,7 +476,7 @@ void sys_sem_set_invalid(sys_sem_t *sem) /* Very crude mechanism used to determine if the critical section handling functions are being called from an interrupt context or not. This relies on the interrupt handler setting this variable manually. */ -extern long xInsideISR; +extern u32 xInsideISR; /*---------------------------------------------------------------------------* * Routine: sys_mbox_new @@ -764,6 +764,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; *---------------------------------------------------------------------------*/ err_t sys_sem_new( sys_sem_t *pxSemaphore, u8_t ucCount ) { + (void) ucCount; err_t xReturn = ERR_MEM; *pxSemaphore = xSemaphoreCreateBinary(); @@ -1006,7 +1007,7 @@ xTaskHandle xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; - xResult = xTaskCreate( pxThread, ( char * ) pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); + xResult = xTaskCreate( pxThread, ( const char * const) pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); if( xResult == pdPASS ) { diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/ipv4/lwip/ip_addr.h b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/ipv4/lwip/ip_addr.h index 1e6b68ce..77f84e02 100755 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/ipv4/lwip/ip_addr.h +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/ipv4/lwip/ip_addr.h @@ -210,7 +210,7 @@ u8_t ip4_addr_netmask_valid(u32_t netmask); #define ip_addr_islinklocal(addr1) (((addr1)->addr & PP_HTONL(0xffff0000UL)) == PP_HTONL(0xa9fe0000UL)) #define ip_addr_debug_print(debug, ipaddr) \ - LWIP_DEBUGF(debug, ("%" U16_F ".%" U16_F ".%" U16_F ".%" U16_F, \ + LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F, \ ipaddr != NULL ? ip4_addr1_16(ipaddr) : 0, \ ipaddr != NULL ? ip4_addr2_16(ipaddr) : 0, \ ipaddr != NULL ? ip4_addr3_16(ipaddr) : 0, \ diff --git a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/lwip/arch.h b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/lwip/arch.h old mode 100755 new mode 100644 index 5c01d1ef..2c3eb473 --- a/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/lwip/arch.h +++ b/Vivado/ipmc_zynq_vivado.sdk/common/lwIP/src/lwip-1.4.1/src/include/lwip/arch.h @@ -76,256 +76,132 @@ extern "C" { #ifdef LWIP_PROVIDE_ERRNO -#undef EPERM #define EPERM 1 /* Operation not permitted */ -#undef ENOENT #define ENOENT 2 /* No such file or directory */ -#undef ESRCH #define ESRCH 3 /* No such process */ -#undef EINTR #define EINTR 4 /* Interrupted system call */ -#undef EIO #define EIO 5 /* I/O error */ -#undef ENXIO #define ENXIO 6 /* No such device or address */ -#undef E2BIG #define E2BIG 7 /* Arg list too long */ -#undef ENOEXEC #define ENOEXEC 8 /* Exec format error */ -#undef EBADF #define EBADF 9 /* Bad file number */ -#undef ECHILD #define ECHILD 10 /* No child processes */ -#undef EAGAIN #define EAGAIN 11 /* Try again */ -#undef ENOMEM #define ENOMEM 12 /* Out of memory */ -#undef EACCES #define EACCES 13 /* Permission denied */ -#undef EFAULT #define EFAULT 14 /* Bad address */ -#undef ENOTBLK #define ENOTBLK 15 /* Block device required */ -#undef EBUSY #define EBUSY 16 /* Device or resource busy */ -#undef EEXIST #define EEXIST 17 /* File exists */ -#undef EXDEV #define EXDEV 18 /* Cross-device link */ -#undef ENODEV #define ENODEV 19 /* No such device */ -#undef ENOTDIR #define ENOTDIR 20 /* Not a directory */ -#undef EISDIR #define EISDIR 21 /* Is a directory */ -#undef EINVAL #define EINVAL 22 /* Invalid argument */ -#undef ENFILE #define ENFILE 23 /* File table overflow */ -#undef EMFILE #define EMFILE 24 /* Too many open files */ -#undef ENOTTY #define ENOTTY 25 /* Not a typewriter */ -#undef ETXTBSY #define ETXTBSY 26 /* Text file busy */ -#undef EFBIG #define EFBIG 27 /* File too large */ -#undef ENOSPC #define ENOSPC 28 /* No space left on device */ -#undef ESPIPE #define ESPIPE 29 /* Illegal seek */ -#undef EROFS #define EROFS 30 /* Read-only file system */ -#undef EMLINK #define EMLINK 31 /* Too many links */ -#undef EPIPE #define EPIPE 32 /* Broken pipe */ -#undef EDOM #define EDOM 33 /* Math argument out of domain of func */ -#undef ERANGE #define ERANGE 34 /* Math result not representable */ -#undef EDEADLK #define EDEADLK 35 /* Resource deadlock would occur */ -#undef ENAMETOOLONG #define ENAMETOOLONG 36 /* File name too long */ -#undef ENOLCK #define ENOLCK 37 /* No record locks available */ -#undef ENOSYS #define ENOSYS 38 /* Function not implemented */ -#undef ENOTEMPTY #define ENOTEMPTY 39 /* Directory not empty */ -#undef ELOOP #define ELOOP 40 /* Too many symbolic links encountered */ -#undef EWOULDBLOCK #define EWOULDBLOCK EAGAIN /* Operation would block */ -#undef ENOMSG #define ENOMSG 42 /* No message of desired type */ -#undef EIDRM #define EIDRM 43 /* Identifier removed */ -#undef ECHRNG #define ECHRNG 44 /* Channel number out of range */ -#undef EL2NSYNC #define EL2NSYNC 45 /* Level 2 not synchronized */ -#undef EL3HLT #define EL3HLT 46 /* Level 3 halted */ -#undef EL3RST #define EL3RST 47 /* Level 3 reset */ -#undef ELNRNG #define ELNRNG 48 /* Link number out of range */ -#undef EUNATCH #define EUNATCH 49 /* Protocol driver not attached */ -#undef ENOCSI #define ENOCSI 50 /* No CSI structure available */ -#undef EL2HLT #define EL2HLT 51 /* Level 2 halted */ -#undef EBADE #define EBADE 52 /* Invalid exchange */ -#undef EBADR #define EBADR 53 /* Invalid request descriptor */ -#undef EXFULL #define EXFULL 54 /* Exchange full */ -#undef ENOANO #define ENOANO 55 /* No anode */ -#undef EBADRQC #define EBADRQC 56 /* Invalid request code */ -#undef EBADSLT #define EBADSLT 57 /* Invalid slot */ -#undef EDEADLOCK #define EDEADLOCK EDEADLK -#undef EBFONT #define EBFONT 59 /* Bad font file format */ -#undef ENOSTR #define ENOSTR 60 /* Device not a stream */ -#undef ENODATA #define ENODATA 61 /* No data available */ -#undef ETIME #define ETIME 62 /* Timer expired */ -#undef ENOSR #define ENOSR 63 /* Out of streams resources */ -#undef ENONET #define ENONET 64 /* Machine is not on the network */ -#undef ENOPKG #define ENOPKG 65 /* Package not installed */ -#undef EREMOTE #define EREMOTE 66 /* Object is remote */ -#undef ENOLINK #define ENOLINK 67 /* Link has been severed */ -#undef EADV #define EADV 68 /* Advertise error */ -#undef ESRMNT #define ESRMNT 69 /* Srmount error */ -#undef ECOMM #define ECOMM 70 /* Communication error on send */ -#undef EPROTO #define EPROTO 71 /* Protocol error */ -#undef EMULTIHOP #define EMULTIHOP 72 /* Multihop attempted */ -#undef EDOTDOT #define EDOTDOT 73 /* RFS specific error */ -#undef EBADMSG #define EBADMSG 74 /* Not a data message */ -#undef EOVERFLOW #define EOVERFLOW 75 /* Value too large for defined data type */ -#undef ENOTUNIQ #define ENOTUNIQ 76 /* Name not unique on network */ -#undef EBADFD #define EBADFD 77 /* File descriptor in bad state */ -#undef EREMCHG #define EREMCHG 78 /* Remote address changed */ -#undef ELIBACC #define ELIBACC 79 /* Can not access a needed shared library */ -#undef ELIBBAD #define ELIBBAD 80 /* Accessing a corrupted shared library */ -#undef ELIBSCN #define ELIBSCN 81 /* .lib section in a.out corrupted */ -#undef ELIBMAX #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#undef ELIBEXEC #define ELIBEXEC 83 /* Cannot exec a shared library directly */ -#undef EILSEQ #define EILSEQ 84 /* Illegal byte sequence */ -#undef ERESTART #define ERESTART 85 /* Interrupted system call should be restarted */ -#undef ESTRPIPE #define ESTRPIPE 86 /* Streams pipe error */ -#undef EUSERS #define EUSERS 87 /* Too many users */ -#undef ENOTSOCK #define ENOTSOCK 88 /* Socket operation on non-socket */ -#undef EDESTADDRREQ #define EDESTADDRREQ 89 /* Destination address required */ -#undef EMSGSIZE #define EMSGSIZE 90 /* Message too long */ -#undef EPROTOTYPE #define EPROTOTYPE 91 /* Protocol wrong type for socket */ -#undef ENOPROTOOPT #define ENOPROTOOPT 92 /* Protocol not available */ -#undef EPROTONOSUPPORT #define EPROTONOSUPPORT 93 /* Protocol not supported */ -#undef ESOCKTNOSUPPORT #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#undef EOPNOTSUPP #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#undef EPFNOSUPPORT #define EPFNOSUPPORT 96 /* Protocol family not supported */ -#undef EAFNOSUPPORT #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#undef EADDRINUSE #define EADDRINUSE 98 /* Address already in use */ -#undef EADDRNOTAVAIL #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#undef ENETDOWN #define ENETDOWN 100 /* Network is down */ -#undef ENETUNREACH #define ENETUNREACH 101 /* Network is unreachable */ -#undef ENETRESET #define ENETRESET 102 /* Network dropped connection because of reset */ -#undef ECONNABORTED #define ECONNABORTED 103 /* Software caused connection abort */ -#undef ECONNRESET #define ECONNRESET 104 /* Connection reset by peer */ -#undef ENOBUFS #define ENOBUFS 105 /* No buffer space available */ -#undef EISCONN #define EISCONN 106 /* Transport endpoint is already connected */ -#undef ENOTCONN #define ENOTCONN 107 /* Transport endpoint is not connected */ -#undef ESHUTDOWN #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#undef ETOOMANYREFS #define ETOOMANYREFS 109 /* Too many references: cannot splice */ -#undef ETIMEDOUT #define ETIMEDOUT 110 /* Connection timed out */ -#undef ECONNREFUSED #define ECONNREFUSED 111 /* Connection refused */ -#undef EHOSTDOWN #define EHOSTDOWN 112 /* Host is down */ -#undef EHOSTUNREACH #define EHOSTUNREACH 113 /* No route to host */ -#undef EALREADY #define EALREADY 114 /* Operation already in progress */ -#undef EINPROGRESS #define EINPROGRESS 115 /* Operation now in progress */ -#undef ESTALE #define ESTALE 116 /* Stale NFS file handle */ -#undef EUCLEAN #define EUCLEAN 117 /* Structure needs cleaning */ -#undef ENOTNAM #define ENOTNAM 118 /* Not a XENIX named type file */ -#undef ENAVAIL #define ENAVAIL 119 /* No XENIX semaphores available */ -#undef EISNAM #define EISNAM 120 /* Is a named type file */ -#undef EREMOTEIO #define EREMOTEIO 121 /* Remote I/O error */ -#undef EDQUOT #define EDQUOT 122 /* Quota exceeded */ -#undef ENOMEDIUM #define ENOMEDIUM 123 /* No medium found */ -#undef EMEDIUMTYPE #define EMEDIUMTYPE 124 /* Wrong medium type */ #ifndef errno