Chameleon

Chameleon Commit Details

Date:2010-09-25 05:02:14 (8 years 9 months ago)
Author:Evan Lojewski
Commit:549
Parents: 548
Message:Modules bugfix. USB module is compiled now. Added a few changes to the gui module.
Changes:
M/branches/meklort/i386/modules/Makefile
M/branches/meklort/i386/modules/GUI/GUI_module.c
M/branches/meklort/i386/modules/USBFix/USBFix.c
M/branches/meklort/i386/modules/GraphicsEnabler/nvidia.c
M/branches/meklort/i386/boot2/modules.c
M/branches/meklort/i386/modules/HelloWorld/HelloWorld.c
M/branches/meklort/i386/modules/GUI/gui.c

File differences

branches/meklort/i386/boot2/modules.c
190190
191191
192192
193
193194
194195
195196
197
198
196199
197200
198201
......
548551
549552
550553
551
552
553
554
554555
555556
556557
......
559560
560561
561562
562
563563
564564
565565
while(callbacks)
{
DBG("Executing '%s' with callback 0x%X.\n", name, callbacks->callback);
// Execute callback
callbacks->callback(arg1, arg2, arg3, arg4);
callbacks = callbacks->next;
DBG("Hook '%s' callback executed, next is 0x%X.\n", name, callbacks);
}
DBG("Hook '%s' executed.\n", name);
case REBASE_OPCODE_SET_TYPE_IMM:
// Set rebase type (pointer, absolute32, pcrel32)
//printf("Rebase type = 0x%X\n", immediate);
//getc();
// NOTE: This is currently NOT used
//DBG("Rebase type = 0x%X\n", immediate);
type = immediate;
break;
// Locate address to begin rebasing
segmentAddress = 0;
struct segment_command* segCommand = NULL; // NOTE: 32bit only
unsigned int binIndex = 0;
branches/meklort/i386/modules/USBFix/USBFix.c
1010
1111
1212
13
13
1414
1515
1616
1717
1818
1919
20
20
2121
2222
2323
2424
2525
26
26
2727
2828
2929
int usb_loop();
void notify_usb_dev(pci_dt_t *pci_dev);
void USBFix_pci_hook(void* binary, void* arg2, void* arg3, void* arg4)
void USBFix_pci_hook(pci_dt_t* current, void* arg2, void* arg3, void* arg4)
{
if(current->class_id != PCI_CLASS_SERIAL_USB) return;
notify_usb_dev(current);
}
void USBFix_start_hook(void* binary, void* arg2, void* arg3, void* arg4)
void USBFix_start_hook(void* arg1, void* arg2, void* arg3, void* arg4)
{
usb_loop();
}
void HelloWorld_start()
void USBFix_start()
{
//printf("Hooking 'ExecKernel'\n");
register_hook_callback("PCIDevice", &USBFix_pci_hook);
branches/meklort/i386/modules/GUI/gui.c
710710
711711
712712
713
713
714714
715715
716716
......
18631863
18641864
18651865
1866
1866
18671867
18681868
18691869
#endif
}
if(is_module_loaded("Resolution"))
if(is_module_loaded("Resolution.dylib"))
{
getResolution(&screen_params[0], &screen_params[1], &screen_params[2]);
}
loadBootGraphics();
}
if(is_module_loaded("Resolution"))
if(is_module_loaded("Resolution.dylib"))
{
getResolution(&screen_params[0], &screen_params[1], &screen_params[2]);
}
branches/meklort/i386/modules/GUI/GUI_module.c
7575
7676
7777
78
79
8078
8179
8280
setVideoMode( GRAPHICS_MODE, 0 );
}
}
/**
branches/meklort/i386/modules/GraphicsEnabler/nvidia.c
342342
343343
344344
345
345346
346347
347348
{ 0x10DE06FA, "Quadro NVS 450" },
{ 0x10DE06FD, "Quadro NVS 295" },
{ 0x10DE086C, "GeForce 9300/nForce 730i" },
{ 0x10DE0876, "ION 9400M" },
{ 0x10DE087D, "ION 9400M" },
{ 0x10DE087E, "ION LE" },
{ 0x10DE0A20, "GeForce GT220" },
branches/meklort/i386/modules/HelloWorld/HelloWorld.c
99
1010
1111
12
12
1313
1414
1515
void helloWorld(void* binary, void* arg2, void* arg3, void* arg4)
{
printf("Hello world from ExecKernel hook. Binary located at 0x%X\n", binary);
getc();
//getc();
}
branches/meklort/i386/modules/Makefile
2727
2828
2929
30
30
3131
3232
3333
# The order of building is important.
# TODO: exclude Symbols from find so it isn't compiled twice
SUBDIRS = Symbols Resolution Memory KernelPatcher KextPatcher HelloWorld GUI GraphicsEnabler ACPIPatcher HPET
SUBDIRS = Symbols Resolution Memory KernelPatcher KextPatcher HelloWorld GUI GraphicsEnabler ACPIPatcher HPET USBFix
all embedtheme optionrom tags debug install installhdrs:
@rm -rf $(OBJROOT)

Archive Download the corresponding diff file

Revision: 549