Chameleon

Chameleon Commit Details

Date:2010-05-15 19:53:14 (13 years 11 months ago)
Author:Evan Lojewski
Commit:155
Parents: 154
Message:Support files updated (headers, memory map to fit large ramdisks, etc)
Changes:
M/branches/meklort/i386/boot2/ramdisk.h
M/branches/meklort/i386/libsa/memory.h
M/branches/meklort/i386/boot2/boot.c
M/branches/meklort/i386/libsaio/usb.c
M/branches/meklort/i386/boot2/boot.h
M/branches/meklort/i386/boot2/drivers.c

File differences

branches/meklort/i386/libsaio/usb.c
2323
2424
2525
26
27
2826
2927
3028
#endif
#define MAX_USB_DEVS 9
struct pciList
{
pci_dt_t* pciDev;
branches/meklort/i386/boot2/ramdisk.h
88
99
1010
11
12
1113
14
15
16
17
18
19
1220
1321
1422
#define __BOOT_RAMDISK_H
#define RAMDISKCONFIG_FILENAME "rd(0,0)/RAMDisk.plist"
//#define kPostbootRamdisk
void md0Ramdisk();
typedef struct RAMDiskParam
{
ppnum_t base;
unsigned int size;
} RAMDiskParam;
/* mboot.c */
extern struct multiboot_info *gMI;
extern int multibootRamdiskReadBytes( int biosdev, unsigned int blkno,
branches/meklort/i386/boot2/boot.c
7575
7676
7777
78
79
7880
7981
8082
//intmenucount = 0;
int gDeviceCount = 0;
boolrecoveryMode = false;
BVRef bvr;
BVRef menuBVR;
BVRef bvChain;
branches/meklort/i386/boot2/boot.h
9292
9393
9494
95
96
97
9598
9699
97100
......
139142
140143
141144
145
146
147
148
149
150
142151
143152
144153
#define kScreenWidth"ScreenWidth"/* edid.h */
#define kScreenHeight"ScreenHeight"/* edid.h */
#define kRecoveryFolder"RecoveryFolder"/* drivers.h */
/*
* Flags to the booter or kernel
*/
extern void common_boot(int biosdev);
/*
* usb.c
*/
extern int usb_loop();
/*
* graphics.c
*/
extern void printVBEModeInfo();
branches/meklort/i386/boot2/drivers.c
4141
4242
4343
44
4445
46
4547
4648
4749
......
184186
185187
186188
187
188
189
190
191
189
190
191
192192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
193
194
195
196
197
198
199
200
201
202
203
204
205
212206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
213238
214239
215240
#include "kernel_patcher.h"
extern char gMacOSVersion;
extern intrecoveryMode;
struct Module {
struct Module *nextModule;
long willLoad;
else if ( gBootFileType == kBlockDeviceType )
{
// First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0).
if (gRAMDiskVolume && !gRAMDiskBTAliased)
{
strcpy(dirSpecExtra, "rd(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
if(recoveryMode)
{
verbose("Loading recovery extensions\n");
// Next try to load Extra extensions from the selected root partition.
strcpy(dirSpecExtra, "/Extra/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// If failed, then try to load Extra extensions from the boot partition
// in case we have a separate booter partition or a bt(0,0) aliased ramdisk.
if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no)
|| (gRAMDiskVolume && gRAMDiskBTAliased) )
{
// First try a specfic OS version folder ie 10.5
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// Next we'll try the base
strcpy(dirSpecExtra, "bt(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
}
}
const char* recoveryFolder;
int len;
if (getValueForKey(kWakeImage, &recoveryFolder, &len, &bootInfo->bootConfig))
{
sprintf(dirSpecExtra, "/Extra/%s/", &recoveryFolder);
if(FileLoadDrivers(dirSpecExtra, 0) != 0)
{
verbose("Unable to locate recovery extensions\n");
}
}
else {
verbose("Unable to locate recovery extensions\n");
}
}
else
{
if (gRAMDiskVolume && !gRAMDiskBTAliased)
{
strcpy(dirSpecExtra, "rd(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
// Next try to load Extra extensions from the selected root partition.
strcpy(dirSpecExtra, "/Extra/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// If failed, then try to load Extra extensions from the boot partition
// in case we have a separate booter partition or a bt(0,0) aliased ramdisk.
if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no)
|| (gRAMDiskVolume && gRAMDiskBTAliased) )
{
// First try a specfic OS version folder ie 10.5
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
// Next we'll try the base
strcpy(dirSpecExtra, "bt(0,0)/Extra/");
FileLoadDrivers(dirSpecExtra, 0);
}
}
}
}
// Also try to load Extensions from boot helper partitions.
strcpy(dirSpecExtra, "/com.apple.boot.P/System/Library/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
branches/meklort/i386/libsa/memory.h
8484
8585
8686
87
88
87
88
8989
90
90
9191
9292
9393
#define VIDEO_ADDR 0x000A0000 // unusable space
#define VIDEO_LEN 0x00060000
#define KERNEL_ADDR 0x00100000 // 64M kernel + drivers
#define KERNEL_LEN 0x04000000
#define KERNEL_ADDR 0x00100000 // 128M kernel + drivers // Was 64
#define KERNEL_LEN 0x08000000
#define ZALLOC_ADDR 0x04100000 // 256M zalloc area
#define ZALLOC_ADDR 0x08100000 // 192M zalloc area// Was 256
#define ZALLOC_LEN 0x10000000
#define LOAD_ADDR 0x14100000 // 95M File load buffer

Archive Download the corresponding diff file

Revision: 155