1 |
|
/* |
2 |
|
* name_registry.cpp - Name Registry handling |
3 |
|
* |
4 |
< |
* SheepShaver (C) 1997-2005 Christian Bauer and Marc Hellwig |
4 |
> |
* SheepShaver (C) Christian Bauer and Marc Hellwig |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
60 |
|
|
61 |
|
// Ethernet driver stub |
62 |
|
static const uint8 ethernet_driver[] = { |
63 |
+ |
#ifdef USE_ETHER_FULL_DRIVER |
64 |
+ |
#include "EthernetDriverFull.i" |
65 |
+ |
#else |
66 |
|
#include "EthernetDriverStub.i" |
67 |
+ |
#endif |
68 |
|
}; |
69 |
|
|
70 |
|
// Helper for RegEntryID |
97 |
|
SheepRegEntryID aapl_rom; |
98 |
|
if (!RegistryCStrEntryCreate(device_tree.addr(), "AAPL,ROM", aapl_rom.addr())) { |
99 |
|
RegistryPropertyCreateStr(aapl_rom.addr(), "device_type", "rom"); |
100 |
< |
SheepPair reg(ROM_BASE, ROM_SIZE); |
100 |
> |
SheepPair reg(ROMBase, ROM_SIZE); |
101 |
|
RegistryPropertyCreate(aapl_rom.addr(), "reg", reg.addr(), 8); |
102 |
|
} |
103 |
|
|
104 |
|
// Create "PowerPC,60x" |
105 |
|
SheepRegEntryID power_pc; |
106 |
< |
char *str; |
106 |
> |
const char *str; |
107 |
|
switch (PVR >> 16) { |
108 |
|
case 1: // 601 |
109 |
|
str = "PowerPC,601"; |
337 |
|
} |
338 |
|
|
339 |
|
// Create "ethernet" |
336 |
– |
// XXX the current ethernet driver is not direct addressing clean |
337 |
– |
#if REAL_ADDRESSING |
340 |
|
SheepRegEntryID ethernet; |
341 |
|
if (!RegistryCStrEntryCreate(device_tree.addr(), "ethernet", ethernet.addr())) { |
342 |
|
RegistryPropertyCreateStr(ethernet.addr(), "AAPL,connector", "ethernet"); |
347 |
|
// local-mac-address |
348 |
|
// max-frame-size 2048 |
349 |
|
} |
348 |
– |
#endif |
350 |
|
} |
351 |
|
D(bug("done.\n")); |
352 |
|
} |