|
|
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) 1998-1999 by Apple Computer, Inc., All rights reserved.
27: *
28: * Interface for hardware dependent (relatively) code
29: * for the BMac Ethernet chip
30: *
31: * HISTORY
32: *
33: */
34:
35:
36: #import "BMacEnet.h"
37: #import "BMacEnetMII.h"
38:
39: void WriteBigMacRegister( IOPPCAddress ioEnetBase, u_int32_t reg_offset, u_int16_t data);
40: volatile u_int16_t ReadBigMacRegister( IOPPCAddress ioEnetBase, u_int32_t reg_offset);
41: void reset_and_select_srom(IOPPCAddress base);
42: u_int16_t read_srom(IOPPCAddress base, unsigned int addr, unsigned int addr_len);
43:
44:
45: @interface BMacEnet (Private)
46: - (BOOL)_allocateMemory;
47: - (BOOL)_initTxRing;
48: - (BOOL)_initRxRing;
49:
50: - (BOOL)_initChip;
51: - (void)_resetChip;
52: - (void)_disableAdapterInterrupts;
53: - (void)_enableAdapterInterrupts;
54: - (void)_setDuplexMode:(BOOL)duplexMode;
55:
56: - (void)_startChip;
57: - (void)_restartTransmitter;
58: - (void)_restartReceiver;
59: - (void)_stopTransmitDMA;
60: - (void)_stopReceiveDMA;
61: - (BOOL)_transmitPacket:(netbuf_t)packet;
62:
63: - (BOOL)_receiveInterruptOccurred;
64: - (BOOL)_receivePackets:(BOOL)fDebugger;
65: - (BOOL)_transmitInterruptOccurred;
66: - (BOOL) _updateDescriptorFromNetBuf:(netbuf_t) nb Desc:(enet_dma_cmd_t *)desc ReceiveFlag:(BOOL) isReceive;
67:
68: /*
69: * Kernel Debugger
70: */
71: - (void)_sendPacket:(void *)pkt length:(unsigned int)pkt_len;
72: - (void)_receivePacket:(void *)pkt length:(unsigned int *)pkt_len timeout:(unsigned int)timeout;
73:
74: - (void) _sendDummyPacket;
75: - (void)_getStationAddress:(enet_addr_t *)ea;
76: - (void)_addToHashTableMask:(u_int8_t *)addr;
77: - (void)_removeFromHashTableMask:(u_int8_t *)addr;
78: - (void)_updateBMacHashTableMask;
79: - (void)_dumpRegisters;
80: - (void)_dumpDesc:(void *)addr Size:(u_int32_t)size;
81: - (void)_dump_srom;
82: @end
83:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.