|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: /* ! 26: * Copyright (c) 1995-1996 NeXT Software, Inc. ! 27: * ! 28: * Interface for hardware dependent (relatively) code ! 29: * for the Mace Ethernet chip ! 30: * ! 31: * HISTORY ! 32: * ! 33: * 11/22/97 R. Berkoff ! 34: * Created. ! 35: */ ! 36: ! 37: ! 38: #import "MaceEnet.h" ! 39: ! 40: void WriteMaceRegister( IOPPCAddress ioEnetBase, u_int32_t reg_offset, u_int8_t data); ! 41: volatile u_int8_t ReadMaceRegister( IOPPCAddress ioEnetBase, u_int32_t reg_offset); ! 42: ! 43: ! 44: @interface MaceEnet(Private) ! 45: - (BOOL)_allocateMemory; ! 46: - (BOOL)_initTxRing; ! 47: - (BOOL)_initRxRing; ! 48: ! 49: - (BOOL)_initChip; ! 50: - (void)_resetChip; ! 51: - (void)_disableAdapterInterrupts; ! 52: - (void)_enableAdapterInterrupts; ! 53: ! 54: - (void)_startChip; ! 55: - (void)_restartChip; ! 56: - (void)_stopReceiveDMA; ! 57: - (void)_stopTransmitDMA; ! 58: - (BOOL)_transmitPacket:(netbuf_t)packet; ! 59: ! 60: - (BOOL)_receiveInterruptOccurred; ! 61: - (BOOL)_receivePackets:(BOOL)fDebugger; ! 62: - (BOOL)_transmitInterruptOccurred; ! 63: - (BOOL) _updateDescriptorFromNetBuf:(netbuf_t) nb Desc:(enet_dma_cmd_t *)desc ReceiveFlag:(BOOL) isReceive; ! 64: ! 65: /* ! 66: * Kernel Debugger ! 67: */ ! 68: - (void)_sendPacket:(void *)pkt length:(unsigned int)pkt_len; ! 69: - (void)_receivePacket:(void *)pkt length:(unsigned int *)pkt_len timeout:(unsigned int)timeout; ! 70: -(void) _packetToDebugger: (netbuf_t) packet; ! 71: ! 72: - (void)_getStationAddress:(enet_addr_t *)ea; ! 73: - (void)_addToHashTableMask:(u_int8_t *)addr; ! 74: - (void)_removeFromHashTableMask:(u_int8_t *)addr; ! 75: - (void)_updateHashTableMask; ! 76: - (void)_dumpRegisters; ! 77: - (void)_dumpDesc:(void *)addr Size:(u_int32_t)size; ! 78: ! 79: ! 80: @end ! 81:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.