Chameleon

Chameleon Commit Details

Date:2011-06-18 08:48:34 (12 years 10 months ago)
Author:Azimutz
Commit:1023
Parents: 1022
Message:Revert r925/926 (getc/getchar stuff) until it gets fixed.
Changes:
M/branches/azimutz/Chazi/i386/libsaio/load.c
M/branches/azimutz/Chazi/i386/libsaio/biosfn.c
M/branches/azimutz/Chazi/i386/libsaio/acpi_patcher.c
M/branches/azimutz/Chazi/i386/boot2/mboot.c
M/branches/azimutz/Chazi/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ati.c
M/branches/azimutz/Chazi/i386/modules/Memory/spd.c
M/branches/azimutz/Chazi/i386/boot2/gui.c
M/branches/azimutz/Chazi/i386/libsaio/disk.c
M/branches/azimutz/Chazi/i386/libsaio/saio_internal.h
M/branches/azimutz/Chazi/i386/boot2/ramdisk.c
M/branches/azimutz/Chazi/i386/boot2/options.c
M/branches/azimutz/Chazi/i386/boot2/resume.c
M/branches/azimutz/Chazi/i386/modules/KernelPatcher/kernel_patcher.c
M/branches/azimutz/Chazi/i386/modules/GraphicsEnabler/IntelGraphicsEnabler/gma.c
M/branches/azimutz/Chazi/i386/boot2/modules.c
M/branches/azimutz/Chazi/i386/boot2/boot.h
M/branches/azimutz/Chazi/i386/modules/HelloWorld/HelloWorld.cpp

File differences

branches/azimutz/Chazi/i386/libsaio/acpi_patcher.c
11071107
11081108
11091109
1110
1110
11111111
11121112
11131113
}
#if DEBUG_ACPI
printf("Press a key to continue... (DEBUG_ACPI)\n");
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
#endif
return 1;
}
branches/azimutz/Chazi/i386/libsaio/load.c
137137
138138
139139
140
140
141141
142142
143143
......
221221
222222
223223
224
224
225225
226226
227227
......
241241
242242
243243
244
244
245245
246246
247247
......
325325
326326
327327
328
328
329329
330330
331331
printf("ncmds: %x\n", (unsigned)mH->ncmds);
printf("sizeofcmds: %x\n", (unsigned)mH->sizeofcmds);
printf("flags: %x\n", (unsigned)mH->flags);
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
#endif
ncmds = mH->ncmds;
printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x, nsects: %d, flags: %x.\n",
segCmd->segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize,
(unsigned) segCmd->nsects, (unsigned)segCmd->flags);
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
#endif
}
else
printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x, nsects: %d, flags: %x.\n",
segCmd->segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize,
(unsigned) segCmd->nsects, (unsigned)segCmd->flags);
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
#endif
}
#ifdef DEBUG
printf("symoff: %x, nsyms: %x, stroff: %x, strsize: %x\n",
symTab->symoff, symTab->nsyms, symTab->stroff, symTab->strsize);
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
#endif
symsSize = symTab->stroff - symTab->symoff;
branches/azimutz/Chazi/i386/libsaio/disk.c
16491649
16501650
16511651
1652
1652
16531653
16541654
16551655
printf(" bvr: %d, dev: %d, part: %d, flags: %d, vis: %d\n", bvr, bvr->biosdev, bvr->part_no, bvr->flags, bvr->visible);
}
printf("count: %d\n", bvCount);
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
#endif
*count = bvCount;
branches/azimutz/Chazi/i386/libsaio/biosfn.c
254254
255255
256256
257
257
258258
259259
260
260
261261
262262
263263
......
511511
512512
513513
514
514
515515
516516
517517
......
676676
677677
678678
679
679
680680
681681
682682
#if DEBUG
{
int i;
printf("%d total ranges\n", count); getchar(); //getc(); Azi: getc stuff
printf("%d total ranges\n", count); getc(); //getchar(); Azi: getc stuff
for (i=0, range = rangeArray; i<count; i++, range++) {
printf("range: type %d, base 0x%x, length 0x%x\n",
range->type, (unsigned int)range->base, (unsigned int)range->length); getchar(); //getc(); Azi: getc stuff
range->type, (unsigned int)range->base, (unsigned int)range->length); getc(); //getchar(); Azi: getc stuff
}
}
#endif
printf("media_type: %x\n", pkt.media_type);
printf("drive_num: %x\n", pkt.drive_num);
printf("device_spec: %x\n", pkt.device_spec);
printf("press a key->\n"); getchar(); //getc(); Azi: getc stuff
pause();
#endif
/* Some BIOSes erroneously return cf = 1 */
print_drive_info(di);
printf("uses_ebios = 0x%x\n", dp->uses_ebios);
printf("result %d\n", ret);
printf("press a key->\n"); getchar(); //getc(); Azi: getc stuff
pause();
#endif
if (ret == 0) {
branches/azimutz/Chazi/i386/libsaio/saio_internal.h
4949
5050
5151
52
53
5452
5553
5654
......
9391
9492
9593
94
9695
9796
9897
9998
10099
101100
101
102102
103103
104104
extern int ebiosEjectMedia(int biosdev);
extern void bios_putchar(int ch);
extern void putca(int ch, int attr, int repeat);
//extern int getc(void); Azi: getc stuff
extern void pause();
extern int readKeyboardStatus(void);
extern int readKeyboardShiftFlags(void);
extern unsigned int time18(void);
extern void initBooterLog(void);
extern void setupBooterLog(void);
extern int putchar(int ch);
extern int getc(void); //Azi: getc stuff
extern int getchar(void);
extern void msglog(const char * format, ...);
extern int printf(const char *format, ...);
extern int error(const char *format, ...);
extern int verbose(const char *format, ...);
extern void stop(const char *format, ...);
extern void pause();
/* disk.c */
extern void rescanBIOSDevice(int biosdev);
branches/azimutz/Chazi/i386/boot2/mboot.c
344344
345345
346346
347
348
349
350
351
352
353
354347
355348
356349
bootArgs = NULL;
return bootdevice;
}
/* declared on gui.h - moved to boot.h
enum {
kReturnKey = 0x0d,
kEscapeKey = 0x1b,
kBackspaceKey = 0x08,
kASCIIKeyMask = 0x7f
};*/
//Azi:reminder
// This is the meat of our implementation. It grabs the boot device from
branches/azimutz/Chazi/i386/boot2/resume.c
118118
119119
120120
121
121
122122
123123
124124
......
145145
146146
147147
148
148
149149
150150
151151
printf ("Resuming from Encrypted image is unsupported.\n"
"Uncheck \"Use secure virtual memory\" in \"Security\" pane on system preferences.\n"
"Press any key to proceed with normal boot.\n");
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
return;
}
// depends on NVRAM
if ( (long long)mem_base + allocSize < 1024*bootInfo->extmem + 0x100000 )
{
printf("Not enough space to restore image. Press any key to proceed with normal boot.\n");
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
return;
}
branches/azimutz/Chazi/i386/boot2/boot.h
162162
163163
164164
165
165
166
166167
167168
168169
#define kBootTimeout -1
#define kCDBootTimeout 8
//Azi: place ??
//Azi: place ?? Well, somehow this change of place seemd a good idea
// to me at the time; if i just remembered why ??? - check in what files are these used!***
enum {
kBackspaceKey = 0x08,
kTabKey = 0x09,
branches/azimutz/Chazi/i386/boot2/modules.c
1717
1818
1919
20
20
2121
2222
2323
......
8787
8888
8989
90
90
9191
9292
9393
......
186186
187187
188188
189
189
190190
191191
192192
......
305305
306306
307307
308
308
309309
310310
311311
......
892892
893893
894894
895
895
896896
897897
898898
......
911911
912912
913913
914
914
915915
916916
917917
......
929929
930930
931931
932
932
933933
934934
935935
......
954954
955955
956956
957
957
958958
959959
960960
......
11341134
11351135
11361136
1137
1137
11381138
11391139
11401140
#if CONFIG_MODULE_DEBUG
#define DBG(x...)printf(x);
#define DBGPAUSE()getchar()
#define DBGPAUSE()getc() //getchar()
#else
#define DBG(x...)
#define DBGPAUSE()
else
{
// The module does not have a valid start function
printf("Unable to start %s\n", SYMBOLS_MODULE); getchar();
printf("Unable to start %s\n", SYMBOLS_MODULE); getc(); //getchar();
}
}
}
else // The module does not have a valid start function. This may be a library.
{
printf("WARNING: Unable to start %s\n", module);
getchar();
getc(); //getchar();
}
#else
else msglog("WARNING: Unable to start %s\n", module);
#if CONFIG_MODULE_DEBUG
printf("Unable to locate symbol %s\n", name);
getchar();
getc(); //getchar();
#endif
if(strcmp(name, VOID_SYMBOL) == 0) return 0xFFFFFFFF;
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //getchar();
}
segmentAddress += sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //getchar();
}
segmentAddress += tmp + sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //getchar();
}
segmentAddress += (immediate * sizeof(void*)) + sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //getchar();
}
break;
}
void dyld_stub_binder()
{
printf("ERROR: dyld_stub_binder was called, should have been take care of by the linker.\n");
getchar();
getc(); //getchar();
}
#else /* CONFIG_MODULES */
branches/azimutz/Chazi/i386/boot2/gui.c
16341634
16351635
16361636
1637
1637
16381638
16391639
16401640
updateVRAM();
key = getchar(); //getc(); Azi: getc stuff
key = getc(); //getchar(); Azi: getc stuff
if( key == kUpArrowkey )
if( currentline > 0 )
branches/azimutz/Chazi/i386/boot2/ramdisk.c
278278
279279
280280
281
281
282282
283283
284284
......
291291
292292
293293
294
294
295295
296296
297297
showInfoRAMDisk();
//Azi: check Chazileon on these line breaks here***
printf("\n\nPress any key to continue.\n");
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
setActiveDisplayPage(0);
}
else
printf("\n?rd m <filename> - mount ramdisk image\n?rd u - unmount ramdisk image");
printf("\n?rd e - enable bt(0,0) alias\n?rd d - disable bt(0,0) alias");
printf("\n\nPress any key to continue.\n");
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
setActiveDisplayPage(0);
}
}
branches/azimutz/Chazi/i386/boot2/options.c
924924
925925
926926
927
927
928928
929929
930930
......
14891489
14901490
14911491
1492
1492
14931493
14941494
14951495
......
15621562
15631563
15641564
1565
1565
15661566
15671567
15681568
......
16131613
16141614
16151615
1616
1616
16171617
16181618
16191619
// reset cursor co-ords
gui.debug.cursor = pos( gui.screen.width - 160 , 10 );
}
key = getchar(); //getc(); Azi: getc stuff
key = getc(); //getchar(); Azi: getc stuff
updateMenu( key, (void **) &menuBVR );
newShowPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot);
printf("[Type %s%sq to quit viewer]", (line_offset > 0) ? "p for previous page, " : "", (*bp != '\1') ? "space for next page, " : "");
}
c = getchar(); //getc(); Azi: getc stuff
c = getc(); //getchar(); Azi: getc stuff
if (c == 'q' || c == 'Q') {
break;
}
printf("Typical boot devices are 80 (First HD), 81 (Second HD)\n");
printf("Enter two-digit hexadecimal boot device [%02x]: ", bootdevice);
do {
key = getchar(); //getc(); Azi: getc stuff
key = getc(); //getchar(); Azi: getc stuff
switch (key & kASCIIKeyMask) {
case kBackspaceKey:
if (digitsI > 0) {
bool promptForRescanOption(void)
{
printf("\nWould you like to enable media rescan option?\nPress ENTER to enable or any key to skip.\n");
if ( getchar()/*getc(); Azi: getc stuff*/ == kReturnKey) {
if ( getc()/*getchar(); Azi: getc stuff*/ == kReturnKey) {
return true;
} else {
return false;
branches/azimutz/Chazi/i386/modules/KernelPatcher/kernel_patcher.c
390390
391391
392392
393
393
394394
395395
396396
}
else {
printf("Running on a 10.0.0 kernel, patch unsupported\n");
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
}
branches/azimutz/Chazi/i386/modules/Memory/spd.c
328328
329329
330330
331
331
332332
333333
334334
slot->SerialNo);
#if DEBUG_SPD
dumpPhysAddr("spd content: ",slot->spd, spd_size);
getchar(); //getc(); Azi: getc stuff
getc(); //getchar(); Azi: getc stuff
#endif
}
branches/azimutz/Chazi/i386/modules/GraphicsEnabler/IntelGraphicsEnabler/gma.c
109109
110110
111111
112
112
113113
114114
115115
......
161161
162162
163163
164
164
165165
166166
167167
{
printf("Failed initializing dev-prop string dev-entry, press any key...\n");
getchar();
getc(); //Azi: getchar();
return false;
}
if (!stringdata)
{
printf("no stringdata press a key...\n");
getchar();
getc(); //Azi: getchar();
return false;
}
branches/azimutz/Chazi/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ati.c
658658
659659
660660
661
661
662662
663663
664664
device = devprop_add_device(string, devicepath);
if (!device) {
printf("Failed initializing dev-prop string dev-entry, press any key...\n");
getchar();
getc(); //Azi: getchar();
return false;
}
branches/azimutz/Chazi/i386/modules/HelloWorld/HelloWorld.cpp
3535
3636
3737
38
39
40
41
38
4239
4340
4441
delete obj2;
printf("Hello world from ExecKernel hook. Binary located at 0x%X\n", binary);
getchar();
//
getc(); //Azi: getchar();
}
void HelloWorld_start()

Archive Download the corresponding diff file

Revision: 1023