Chameleon

Chameleon Commit Details

Date:2011-06-24 02:14:18 (12 years 9 months ago)
Author:Azimutz
Commit:1039
Parents: 1038
Message:Sync with trunk (r1038).
Changes:
M/branches/azimutz/trunkAutoResolution/i386/libsaio/saio_internal.h
M/branches/azimutz/trunkAutoResolution/i386/boot2/gui.h
M/branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.h
M/branches/azimutz/trunkAutoResolution/i386/boot2/ramdisk.c
M/branches/azimutz/trunkAutoResolution/i386/boot2/options.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/xml.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/hpet.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/console.c
M/branches/azimutz/trunkAutoResolution/i386/boot2/resume.c
M/branches/azimutz/trunkAutoResolution
M/branches/azimutz/trunkAutoResolution/i386/boot2/boot.c
M/branches/azimutz/trunkAutoResolution/i386/libsa/libsa.h
M/branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c
M/branches/azimutz/trunkAutoResolution/i386/boot2/modules.c
M/branches/azimutz/trunkAutoResolution/CHANGES
M/branches/azimutz/trunkAutoResolution/i386/modules/HelloWorld/HelloWorld.cpp
M/branches/azimutz/trunkAutoResolution/i386/libsaio/ati.c
M/branches/azimutz/trunkAutoResolution/i386/libsa/string.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/load.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/biosfn.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/acpi_patcher.c
M/branches/azimutz/trunkAutoResolution/package/smbios.plist
M/branches/azimutz/trunkAutoResolution/i386/util/fdisk/misc.c
M/branches/azimutz/trunkAutoResolution/i386/boot2/gui.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.c
M/branches/azimutz/trunkAutoResolution/i386/libsaio/disk.c

File differences

branches/azimutz/trunkAutoResolution/i386/libsaio/xml.c
355355
356356
357357
358
358
359359
360360
361361
......
380380
381381
382382
383
383
384384
385385
386386
......
423423
424424
425425
426
426
427427
428428
429429
......
448448
449449
450450
451
451
452452
453453
454454
......
669669
670670
671671
672
672
673673
674674
675675
......
710710
711711
712712
713
713
714714
715715
716716
......
731731
732732
733733
734
734
735735
736736
737737
......
771771
772772
773773
774
774
775775
776776
777777
......
803803
804804
805805
806
806
807807
808808
809809
else
{
printf("ParseStringID error (0x%x)\n", *val);
getc(); //Azi: getchar();
getchar();
return -1;
}
}
else
{
printf("ParseStringIDREF error (0x%x)\n", *val);
getc(); //Azi: getchar();
getchar();
return -1;
}
}
else
{
printf("ParseIntegerID error (0x%x)\n", *val);
getc(); //Azi: getchar();
getchar();
return -1;
}
}
else
{
printf("ParseStringIDREF error (0x%x)\n", *val);
getc(); //Azi: getchar();
getchar();
return -1;
}
}
if(buffer[0] == '<')
{
printf("Warning integer is non existant\n");
getc(); //Azi: getchar();
getchar();
tmpTag = NewTag();
tmpTag->type = kTagTypeInteger;
tmpTag->string = 0;
else
{
printf("ParseTagInteger hex error (0x%x) in buffer %s\n", *val, buffer);
getc(); //Azi: getchar();
getchar();
return -1;
}
}
if (*val < '0' || *val > '9')
{
printf("ParseTagInteger decimal error (0x%x) in buffer %s\n", *val, buffer);
getc(); //Azi: getchar();
getchar();
return -1;
}
//printf("ParseTagData unimplimented\n");
//printf("Data: %s\n", buffer);
//getc(); //Azi: getchar();
//getchar();
// TODO: base64 decode
if (tmpTag == 0) return -1;
printf("ParseTagDate unimplimented\n");
getc(); //Azi: getchar();
getchar();
tmpTag->type = kTagTypeDate;
tmpTag->string = 0;
branches/azimutz/trunkAutoResolution/i386/libsaio/console.c
158158
159159
160160
161
161
162162
163163
164164
165
165
166166
167
167
168168
169169
170170
......
263263
264264
265265
266
267
266
267
268268
// Read and echo a character from console. This doesn't echo backspace
// since that screws up higher level handling
int getchar() //Azi: study!!!
int getchar()
{
register int c = getc();
if ( c == '\r' ) c = '\n'; //Azi: CR/LF ??
//if ( c == '\r' ) c = '\n';
if ( c >= ' ' && c < 0x7f) putchar(c); //Azi: check gui.h - kReturnKey, etc...
//if ( c >= ' ' && c < 0x7f) putchar(c);
return (c);
}
void pause()
{
printf("Press a key to continue...\n");
getc(); //getchar(); //Azi: getc works here because the function is up above.
// replace get/getchar by pause() ??
getchar(); //getc(); //Azi: getc works here because the function is up above; changed for now.
// replace getchar() by pause() ??
}
branches/azimutz/trunkAutoResolution/i386/libsaio/acpi_patcher.c
10581058
10591059
10601060
1061
1061
10621062
10631063
10641064
}
#if DEBUG_ACPI
printf("Press a key to continue... (DEBUG_ACPI)\n");
getc(); //Azi: getchar();
getchar();
#endif
return 1;
}
branches/azimutz/trunkAutoResolution/i386/libsaio/nvidia.c
891891
892892
893893
894
894
895
895896
896897
897898
headerlength = 8;
}
if (sig != 0x4edcbdcb) {
printf("bad display config block signature (0x%8x)\n", sig);
//Azi: match this with one below and add line number ?
printf("Bad display config block signature (0x%8x)\n", sig);
return PATCH_ROM_FAILED;
}
} else if (dcbtable_version >= 0x14) { /* some NV15/16, and NV11+ */
branches/azimutz/trunkAutoResolution/i386/libsaio/ati.c
456456
457457
458458
459
460459
461460
462461
{ 0x9443,0x00000000,CHIP_FAMILY_RV770,"ATI Radeon HD 4850 X2",kMotmot},
{ 0x944C,0x00000000,CHIP_FAMILY_RV770,"ATI Radeon HD 4800 Series",kMotmot},
{ 0x944E,0x00000000,CHIP_FAMILY_RV770,"ATI Radeon HD 4700 Series",kMotmot},
{ 0x944E,0x00000000,CHIP_FAMILY_RV770,"ATI Radeon HD 4700 Series",kMotmot},
{ 0x9450,0x00000000,CHIP_FAMILY_RV770,"AMD FireStream 9270",kMotmot},
{ 0x9452,0x00000000,CHIP_FAMILY_RV770,"AMD FireStream 9250",kMotmot},
{ 0x9460,0x00000000,CHIP_FAMILY_RV770,"ATI Radeon HD 4800 Series",kMotmot},
branches/azimutz/trunkAutoResolution/i386/libsaio/load.c
135135
136136
137137
138
138
139139
140140
141141
......
219219
220220
221221
222
222
223223
224224
225225
......
239239
240240
241241
242
242
243243
244244
245245
......
317317
318318
319319
320
320
321321
322322
323323
printf("ncmds: %x\n", (unsigned)mH->ncmds);
printf("sizeofcmds: %x\n", (unsigned)mH->sizeofcmds);
printf("flags: %x\n", (unsigned)mH->flags);
getc(); //Azi: getchar();;
getchar();
#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);
getc(); //Azi: getchar();
getchar();
#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);
getc(); //Azi: getchar();
getchar();
#endif
}
#if DEBUG
printf("symoff: %x, nsyms: %x, stroff: %x, strsize: %x\n",
symTab->symoff, symTab->nsyms, symTab->stroff, symTab->strsize);
getc(); //Azi: getchar();
getchar();
#endif
symsSize = symTab->stroff - symTab->symoff;
branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.c
286286
287287
288288
289
289
290290
291291
292292
/*if(bus_ratio_max > 0) bus_ratio = flex_ratio;*/
p->CPU.MaxRatio = max_ratio;
p->CPU.MinRatio = min_ratio;
myfsb = fsbFrequency / 1000000;
verbose("Sticking with [BCLK: %dMhz, Bus-Ratio: %d]\n", myfsb, max_ratio);
currcoef = bus_ratio_max;
branches/azimutz/trunkAutoResolution/i386/libsaio/disk.c
16361636
16371637
16381638
1639
1639
16401640
16411641
16421642
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);
getc(); //Azi: getchar();
getchar();
#endif
*count = bvCount;
branches/azimutz/trunkAutoResolution/i386/libsaio/cpu.h
66
77
88
9
9
1010
1111
1212
#ifndef __LIBSAIO_CPU_H
#define __LIBSAIO_CPU_H
#include "libsaio.h"
//#include "libsaio.h"
extern void scan_cpu(PlatformInfo_t *);
branches/azimutz/trunkAutoResolution/i386/libsaio/hpet.c
9898
9999
100100
101
101
102102
103103
#if DEBUG_HPET
printf("Press [Enter] to continue...\n");
getc(); //Azi: getchar();
getchar();
#endif
}
branches/azimutz/trunkAutoResolution/i386/libsaio/biosfn.c
185185
186186
187187
188
188
189189
190190
191191
......
252252
253253
254254
255
255
256256
257257
258
258
259259
260260
261261
......
509509
510510
511511
512
513
512
514513
515514
516515
......
676675
677676
678677
679
680678
681679
682680
// Some BIOSes will simply ignore the value of ECX on entry.
// Probably best to keep its value at 20 to avoid surprises.
//printf("Get memory map 0x%x, %d\n", rangeArray); getc(); //Azi: getchar();
//printf("Get memory map 0x%x, %d\n", rangeArray); getchar();
if (maxRangeCount > (BIOS_LEN / sizeof(MemoryRange))) {
maxRangeCount = (BIOS_LEN / sizeof(MemoryRange));
}
#if DEBUG
{
int i;
printf("%d total ranges\n", count); getc(); //Azi: getchar();
printf("%d total ranges\n", count); getchar();
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); getc(); //Azi: getchar();
range->type, (unsigned int)range->base, (unsigned int)range->length); getchar();
}
}
#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"); getc(); //Azi: getchar();
pause();
printf("press a key->\n"); getchar();
#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"); getc(); //Azi: getchar();
pause();
#endif
branches/azimutz/trunkAutoResolution/i386/libsaio/saio_internal.h
4949
5050
5151
52
53
5452
5553
5654
......
9088
9189
9290
91
9392
9493
9594
96
9795
9896
9997
10098
99
100
101101
102102
103103
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: getchar();
extern void pause(); //Azi: replace getc/getchar with ? console.c - btw, what is it doing here ?? there's a console.c section below...
extern int readKeyboardStatus(void);
extern int readKeyboardShiftFlags(void);
extern unsigned int time18(void);
extern bool gVerboseMode;
extern bool gErrors;
extern void initBooterLog(void);
extern void msglog(const char * format, ...);
extern void setupBooterLog(void);
extern int putchar(int ch);
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, ...);
//Azi: replace getc/getchar with ? console.c
extern void pause();
/* disk.c */
extern void rescanBIOSDevice(int biosdev);
branches/azimutz/trunkAutoResolution/i386/boot2/resume.c
119119
120120
121121
122
122
123123
124124
125125
......
143143
144144
145145
146
146
147147
148148
149149
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");
getc(); //Azi: getchar();
getchar();
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");
getc(); //Azi: getchar();
getchar();
return;
}
branches/azimutz/trunkAutoResolution/i386/boot2/boot.c
187187
188188
189189
190
190
191191
192192
193193
......
381381
382382
383383
384
384
385385
386386
387387
bool dummyVal;
if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal) {
printf("Press any key to continue...");
getc(); //Azi: getchar();
getchar();
}
usb_loop();
#if DEBUG
printf(" Default: %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBootVolume, gBootVolume->biosdev, gBootVolume->part_no, gBootVolume->flags);
printf(" bt(0,0): %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBIOSBootVolume, gBIOSBootVolume->biosdev, gBIOSBootVolume->part_no, gBIOSBootVolume->flags);
getc(); //Azi: getchar();
getchar();
#endif
useGUI = true;
branches/azimutz/trunkAutoResolution/i386/boot2/modules.c
1616
1717
1818
19
19
2020
2121
2222
......
8686
8787
8888
89
89
9090
9191
9292
......
185185
186186
187187
188
188
189189
190190
191191
......
304304
305305
306306
307
307
308308
309309
310310
......
370370
371371
372372
373
373
374374
375375
376376
......
379379
380380
381381
382
382
383383
384384
385385
......
891891
892892
893893
894
894
895895
896896
897897
......
910910
911911
912912
913
913
914914
915915
916916
......
928928
929929
930930
931
931
932932
933933
934934
......
953953
954954
955955
956
956
957957
958958
959959
......
10851085
10861086
10871087
1088
1088
10891089
10901090
10911091
......
11331133
11341134
11351135
1136
1136
11371137
11381138
11391139
#if CONFIG_MODULE_DEBUG
#define DBG(x...)printf(x);
#define DBGPAUSE()getc() // getchar();
#define DBGPAUSE()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); getc(); //Azi: getchar();
printf("Unable to start %s\n", SYMBOLS_MODULE); getchar();
}
}
}
else // The module does not have a valid start function. This may be a library.
{
printf("WARNING: Unable to start %s\n", module);
getc(); //Azi: getchar();
getchar();
}
#else
else msglog("WARNING: Unable to start %s\n", module);
#if CONFIG_MODULE_DEBUG
printf("Unable to locate symbol %s\n", name);
getc(); //Azi: getchar();
getchar();
#endif
if(strcmp(name, VOID_SYMBOL) == 0) return 0xFFFFFFFF;
else
{
verbose("Invalid mach magic 0x%X\n", ((struct mach_header*)binary)->magic);
//getc(); //Azi: getchar();
//getchar();
return NULL;
}
/*if(((struct mach_header*)binary)->filetype != MH_DYLIB)
{
printf("Module is not a dylib. Unable to load.\n");
getc(); //Azi: getchar();
getchar();
return NULL; // Module is in the incorrect format
}*/
else
{
printf("Unable to bind symbol %s\n", symbolName);
getc(); //Azi: getchar();
getchar();
}
segmentAddress += sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getc(); //Azi: getchar();
getchar();
}
segmentAddress += tmp + sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getc(); //Azi: getchar();
getchar();
}
segmentAddress += (immediate * sizeof(void*)) + sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getc(); //Azi: getchar();
getchar();
}
break;
}
#if CONFIG_MODULE_DEBUG
//print_hook_list();
//getc(); //Azi: getchar();
//getchar();
#endif
}
void dyld_stub_binder()
{
printf("ERROR: dyld_stub_binder was called, should have been take care of by the linker.\n");
getc(); //Azi: getchar();
getchar();
}
#else /* CONFIG_MODULES */
branches/azimutz/trunkAutoResolution/i386/boot2/gui.c
143143
144144
145145
146
147
146
147
148148
149
150
151149
152150
153151
......
942940
943941
944942
945
946
943
944
947945
948946
949947
......
957955
958956
959957
960
958
961959
962
963
964
965
966
967
968
969
970
971960
972961
973962
......
979968
980969
981970
982
983
984
985971
986
987
988
989
990
991
972
992973
993974
994975
......
16121593
16131594
16141595
1615
1596
16161597
16171598
16181599
extern MenuItem *menuItems;
char prompt[BOOT_STRING_LEN];
//extern char gBootArgs[BOOT_STRING_LEN]; //Azi: getchar/prompt stuff
//char prompt[BOOT_STRING_LEN];
extern char gBootArgs[BOOT_STRING_LEN];
int prompt_pos = 0;
char prompt_text[] = "boot: ";
menuitem_t infoMenuItems[] =
void clearGraphicBootPrompt()
{
// clear text buffer
prompt[0] = '\0'; //Azi: getchar/prompt stuff
prompt_pos=0;
//prompt[0] = '\0';
//prompt_pos=0;
if(gui.bootprompt.draw == true )
return;
}
void updateGraphicBootPrompt(int key)
void updateGraphicBootPrompt()
{
if ( key == kBackspaceKey ) //Azi: getchar/prompt stuff
prompt[--prompt_pos] = '\0';
else
{
prompt[prompt_pos] = key;
prompt_pos++;
prompt[prompt_pos] = '\0';
}
fillPixmapWithColor( gui.bootprompt.pixmap, gui.bootprompt.bgcolor);
makeRoundedCorners( gui.bootprompt.pixmap);
// get the position of the end of the boot prompt text to display user input
position_t p_prompt = pos( p_text.x + ( ( strlen(prompt_text) ) * font_console.chars[0]->width ), p_text.y );
//Azi: getchar/prompt stuff
// calculate the position of the cursor
intoffset = ( prompt_pos - ( ( gui.bootprompt.width / font_console.chars[0]->width ) - strlen(prompt_text) - 2 ) );
if ( offset < 0)
offset = 0;
drawStr( prompt+offset, &font_console, gui.bootprompt.pixmap, p_prompt);
// end
drawStr( prompt + offset, &font_console, gui.bootprompt.pixmap, p_prompt);
drawStr( gBootArgs, &font_console, gui.bootprompt.pixmap, p_prompt);
gui.menu.draw = false;
gui.bootprompt.draw = true;
updateVRAM();
key = getc(); //Azi: getchar();
key = getchar();
if( key == kUpArrowkey )
if( currentline > 0 )
branches/azimutz/trunkAutoResolution/i386/boot2/gui.h
11
2
3
2
3
44
5
6
7
5
6
7
88
99
1010
11
12
13
1114
1215
1316
1417
1518
1619
17
18
19
2020
2121
2222
......
4141
4242
4343
44
44
4545
4646
4747
48
48
4949
5050
5151
......
162162
163163
164164
165
165
166166
167167
168168
/*
*gui.h
*
* gui.h
*
*
*Created by Jasmin Fazlic on 18.12.08.
*Copyright 2008/09 Jasmin Fazlic All rights reserved.
*Copyright 2008/09 iNDi All rights reserved.
* Created by Jasmin Fazlic on 18.12.08.
* Copyright 2008/09 Jasmin Fazlic All rights reserved.
* Copyright 2008/09 iNDi All rights reserved.
*
*/
#ifndef __BOOT2_GUI_H
#define __BOOT2_GUI_H
#include "boot.h"
#include "bootstruct.h"
#include "graphics.h"
#include "graphic_utils.h"
#include "picopng.h"
#ifndef __BOOT2_GUI_H
#define __BOOT2_GUI_H
#define CHARACTERS_COUNT223
#define BOOT_NORMAL0
enum {
kBackspaceKey= 0x08,
kTabKey= 0x09,
kReturnKey= 0x0d, // '\n', //Azi: r926
kReturnKey= '\r',
kEscapeKey= 0x1b,
kUpArrowkey= 0x4800,
kDownArrowkey= 0x5000,
kASCIIKeyMask= 0x7f, //Azi: getchar()***
kASCIIKeyMask= 0x7f,
kF2Key= 0x3c00, //Azi:autoresolution
kF5Key= 0x3f00,
kF10Key= 0x4400
void showGraphicBootPrompt();
void clearGraphicBootPrompt();
void updateGraphicBootPrompt(int key);
void updateGraphicBootPrompt();
void updateVRAM();
branches/azimutz/trunkAutoResolution/i386/boot2/ramdisk.c
290290
291291
292292
293
293
294294
295295
296296
......
303303
304304
305305
306
306
307307
308308
309309
setCursorPosition(0, 0, 1);
showInfoRAMDisk();
printf("\n\nPress any key to continue.\n");
getc(); //Azi: getchar();
getchar();
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");
getc(); //Azi: getchar();
getchar();
setActiveDisplayPage(0);
}
}
branches/azimutz/trunkAutoResolution/i386/boot2/options.c
158158
159159
160160
161
161
162162
163163
164164
......
174174
175175
176176
177
178
177
179178
180179
181180
......
186185
187186
188187
189
188
190189
191190
192191
......
208207
209208
210209
211
212
210
213211
214212
215213
216214
217
215
218216
219217
220218
......
222220
223221
224222
225
223
226224
227225
228226
229
230
231
227
228
232229
233230
234231
......
242239
243240
244241
245
242
246243
247244
248245
246
247
249248
250249
251250
252251
253252
254253
255
256
254
255
257256
258257
259258
260259
261
262
263
264
265
266
267
260
261
262
263
264
265
268266
269267
270268
271269
272270
273
274
275
276
277
278
271
272
273
274
279275
280
276
281277
282278
283279
......
350346
351347
352348
353
349
354350
355351
356352
......
387383
388384
389385
390
386
391387
392388
393389
......
704700
705701
706702
707
703
708704
709705
710706
......
872868
873869
874870
875
871
876872
877873
878874
......
913909
914910
915911
916
912
917913
918914
919915
920916
921917
922
918
923919
924920
925921
......
950946
951947
952948
953
949
954950
955951
956952
957953
958954
959
955
960956
961957
962958
......
10971093
10981094
10991095
1100
1096
11011097
11021098
11031099
......
11401136
11411137
11421138
1139
11431140
11441141
11451142
......
14481445
14491446
14501447
1451
1448
14521449
14531450
14541451
......
14911488
14921489
14931490
1494
1491
14951492
14961493
14971494
......
15111508
15121509
15131510
1514
1511
15151512
15161513
15171514
......
15581555
15591556
15601557
1561
1558
15621559
15631560
15641561
......
16091606
16101607
16111608
1612
1609
16131610
16141611
16151612
}
}
if( bootArgs->Video.v_display == GRAPHICS_MODE )
if( bootArgs->Video.v_display != VGA_TEXT_MODE )
{
drawProgressBar( gui.screen.pixmap, 100, gui.progressbar.pos , ( multi * 100 / multi_buff ) );
gui.redraw = true;
//==========================================================================
//char gBootArgs[BOOT_STRING_LEN];
static char gBootArgs[BOOT_STRING_LEN];
char gBootArgs[BOOT_STRING_LEN];
static char * gBootArgsPtr = gBootArgs;
static char * gBootArgsEnd = gBootArgs + BOOT_STRING_LEN - 1;
static char booterCommand[BOOT_STRING_LEN];
gBootArgsPtr = gBootArgs;
memset(gBootArgs, '\0', BOOT_STRING_LEN);
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
clearGraphicBootPrompt();
}
}
extern char bootPrompt[];
extern char bootRescanPrompt[];
if ( bootArgs->Video.v_display == VGA_TEXT_MODE ) {
//Azi: getchar/prompt stuff
if( bootArgs->Video.v_display == VGA_TEXT_MODE ) {
changeCursor( 0, row, kCursorTypeUnderline, 0 );
clearScreenRows( row, kScreenLastRow );
}
clearBootArgs();
//clearBootArgs();
if (visible) {
if (bootArgs->Video.v_display == VGA_TEXT_MODE) {
printf( bootRescanPrompt );
} else {
printf( bootPrompt );
// printf( gBootArgs );
printf( gBootArgs );
}
}
} else {
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
clearGraphicBootPrompt();
// End
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
//clearGraphicBootPrompt();
} else {
printf("Press Enter to start up the foreign OS. ");
}
key &= kASCIIKeyMask;
switch ( key )
{
{
case kBackspaceKey:
if ( gBootArgsPtr > gBootArgs )
{
*--gBootArgsPtr = '\0';
int x, y, t;
getCursorPositionAndType( &x, &y, &t );
if ( x == 0 && y )
{
x = 80; y--;
}
if (x)
x--;
if (x) x--;
if( bootArgs->Video.v_display == VGA_TEXT_MODE )
{
setCursorPosition( x, y, 0 );
putca(' ', 0x07, 1);
//Azi: getchar/prompt stuff
} else
updateGraphicBootPrompt(kBackspaceKey);
*gBootArgsPtr-- = '\0';
}
}
else
{
updateGraphicBootPrompt();
}
}
break;
default:
if ( key >= ' ' && gBootArgsPtr < gBootArgsEnd)
{
if( bootArgs->Video.v_display == VGA_TEXT_MODE )
putchar(key); // echo to screen
else
updateGraphicBootPrompt(key);
*gBootArgsPtr++ = key;
// end
*gBootArgsPtr++ = key;
if( bootArgs->Video.v_display != VGA_TEXT_MODE ) updateGraphicBootPrompt();
else if ( key >= ' ' && key < 0x7f) putchar(key);
}
break;
}
}
// Draw the visible items.
if( bootArgs->Video.v_display == GRAPHICS_MODE )
if( bootArgs->Video.v_display != VGA_TEXT_MODE )
drawDeviceList(gMenuStart, gMenuEnd, gMenuSelection);
if ( gMenuItems == NULL )
return 0;
if( bootArgs->Video.v_display == GRAPHICS_MODE )
if( bootArgs->Video.v_display != VGA_TEXT_MODE )
{
int res;
}
// ensure we're in graphics mode if gui is setup
if (gui.initialised && bootArgs->Video.v_display == VGA_TEXT_MODE)
if (firstRun && gui.initialised && bootArgs->Video.v_display == VGA_TEXT_MODE)
{
setVideoMode(GRAPHICS_MODE, 0);
}
}
}
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
// redraw the background buffer
gui.logo.draw = true;
drawBackground();
showBootPrompt( nextRow, showPrompt );
do {
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
// redraw background
memcpy( gui.backbuffer->pixels, gui.screen.pixmap->pixels, gui.backbuffer->width * gui.backbuffer->height * 4 );
// reset cursor co-ords
gui.debug.cursor = pos( gui.screen.width - 160 , 10 );
}
key = getc(); //Azi: getchar();
key = getchar();
updateMenu( key, (void **) &menuBVR );
newShowPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot);
* TODO: this needs to be refactored.
*/
if (strcmp( booterCommand, "video" ) == 0) {
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
showInfoBox(getVBEInfoString(), getVBEModeInfoString());
} else {
printVBEModeInfo();
}
} else if ( strcmp( booterCommand, "memory" ) == 0) {
if (bootArgs->Video.v_display == GRAPHICS_MODE ) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE ) {
showInfoBox("Memory Map", getMemoryInfoString());
} else {
printMemoryInfo();
// Switch between text & graphic interfaces
// Only Permitted if started in graphics interface
if (useGUI) {
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
setVideoMode(VGA_TEXT_MODE, 0);
setCursorPosition(0, 0, 0);
//useGUI = true;
updateVRAM();
updateGraphicBootPrompt();
}
}
key = 0;
intline_offset;
intc;
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
showInfoBox( "Press q to quit\n",buf );
return;
}
printf("[Type %s%sq to quit viewer]", (line_offset > 0) ? "p for previous page, " : "", (*bp != '\1') ? "space for next page, " : "");
}
c = getc(); //Azi: getchar();
c = getchar();
if (c == 'q' || c == 'Q') {
break;
}
void showHelp(void)
{
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
if (bootArgs->Video.v_display != VGA_TEXT_MODE) {
showInfoBox("Help. Press q to quit.\n", (char *)BootHelp_txt);
} else {
showTextBuffer((char *)BootHelp_txt, BootHelp_txt_len);
printf("Typical boot devices are 80 (First HD), 81 (Second HD)\n");
printf("Enter two-digit hexadecimal boot device [%02x]: ", bootdevice);
do {
key = getc(); //Azi: getchar();
key = getchar();
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 (getc() == kReturnKey) { //Azi: getchar();
if (getchar() == kReturnKey) {
return true;
} else {
return false;
branches/azimutz/trunkAutoResolution/i386/modules/HelloWorld/HelloWorld.cpp
3535
3636
3737
38
38
3939
4040
4141
delete obj2;
printf("Hello world from ExecKernel hook. Binary located at 0x%X\n", binary);
getc(); //Azi: getchar(); ??
getchar();
}
void HelloWorld_start()
branches/azimutz/trunkAutoResolution/i386/libsa/libsa.h
9393
9494
9595
96
96
9797
9898
9999
extern int strncmp(const char * s1, const char * s2, size_t n);
extern char * strcpy(char * s1, const char * s2);
extern char * strncpy(char * s1, const char * s2, size_t n);
extern size_t strlcpy(char * s1, const char * s2, size_t n); //Azi: ?? check!
extern size_t strlcpy(char * s1, const char * s2, size_t n);
extern char * strstr(const char *in, const char *str);
extern int atoi(const char * str);
extern int ptol(const char * str);
branches/azimutz/trunkAutoResolution/i386/libsa/string.c
166166
167167
168168
169
169
170170
171171
172172
}
size_t
strlcpy(char * s1, const char * s2, size_t n) //Azi: libsa.h
strlcpy(char * s1, const char * s2, size_t n)
{
while (n && (*s1++ = *s2++))
n--;
branches/azimutz/trunkAutoResolution/i386/util/fdisk/misc.c
142142
143143
144144
145
145
146146
147
147
148148
149149
150150
printf("%s [%c] ", str, default_answer ? 'y' : 'n');
fflush(stdout);
first = ch = getchar(); //Azi: what about these ?
first = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar(); //Azi: not messing them :P
ch = getchar();
if (ch == EOF || first == EOF)
errx(1, "eof");
branches/azimutz/trunkAutoResolution/package/smbios.plist
44
55
66
7
7
88
99
1010
......
2020
2121
2222
23
23
2424
2525
2626
2727
2828
29
29
3030
3131
3232
3333
3434
35
35
3636
3737
3838
3939
4040
41
41
4242
4343
4444
......
4646
4747
4848
49
50
51
52
53
54
55
56
57
58
59
60
61
<dict>
<key>SMbiosversion</key>
<string>MP31.88Z.00C1.B00.0802091544</string>
<key>SMmanufacter</key>
<key>SMmanufacturer</key>
<string>Apple Inc.</string>
<key>SMproductname</key>
<string>MacPro3,1</string>
<string>19</string>
<key>SMmemspeed</key>
<string>800</string>
<key>SMmemmanufacter_1</key>
<key>SMmemmanufacturer_1</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_1</key>
<string>0x00001020</string>
<key>SMmempart_1</key>
<string>0x48594D503131325336344350362D59352020</string>
<key>SMmemmanufacter_2</key>
<key>SMmemmanufacturer_2</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_2</key>
<string>0x00003021</string>
<key>SMmempart_2</key>
<string>0x48594D503131325336344350362D59352020</string>
<key>SMmemmanufacter_3</key>
<key>SMmemmanufacturer_3</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_3</key>
<string>0x00003021</string>
<key>SMmempart_3</key>
<string>0x48594D503131325336344350362D59352020</string>
<key>SMmemmanufacter_4</key>
<key>SMmemmanufacturer_4</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_4</key>
<string>0x00003021</string>
<string>0x48594D503131325336344350362D59352020</string>
</dict>
</plist>
<!--
missing on the example above:
SMbiosvendor
SMbiosdate
SMfamily
SMboardmanufacturer
SMboardproduct
SMmemdevloc
SMmembankloc
SMcputype
SMbusspeed
-->
branches/azimutz/trunkAutoResolution/CHANGES
44
55
66
7
78
89
910
number of bytes for boot2.
- Added new ATi/AMD Graphics Card Enabler.
- Added new SMBIOS patcher.
Includes changes to "manufacter" keys, from SM*manufacter to SM*manufacturer.
- Added module system.
- Added automatic P-States & C-States generation for native power management.
- Added Booter Log Dump Tool

Archive Download the corresponding diff file

Revision: 1039