Chameleon

Chameleon Commit Details

Date:2015-03-15 10:34:45 (9 years 1 month ago)
Author:ErmaC
Commit:2633
Parents: 2632
Message:Merge latest Zenit432's patch from his branch
Changes:
M/trunk/i386/libsaio/console.c
M/trunk/i386/boot2/boot.c
M/trunk/i386/libsa/libsa.h
M/trunk/i386/modules/AcpiCodec/acpi_codec.c
M/trunk/i386/libsaio/nvidia.c
M/trunk/i386/util/dyldsymboltool.c
M/trunk/CHANGES
M/trunk/i386/libsaio/ati.c
M/trunk/i386/libsaio/pci_root.c
M/trunk/i386/libsaio/biosfn.c
M/trunk/i386/libsaio/hfs.c
M/trunk/i386/boot2/drivers.c
M/trunk/i386/libsaio/acpi_patcher.c
M/trunk/i386/libsaio/spd.c
M/trunk/i386/libsaio/cpu.c
M/trunk/i386/config/symbol.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/libsaio/disk.c
M/trunk/i386/modules/Resolution/915resolution.c
M/trunk/i386/libsaio/saio_internal.h
M/trunk/i386/boot2/gui.h
M/trunk/i386/boot2/ramdisk.c
M/trunk/i386/boot2/options.c
M/trunk/i386/libsaio/xml.c
M/trunk/i386/libsaio/asm.s

File differences

trunk/i386/libsaio/xml.c
4141
4242
4343
44
44
4545
4646
4747
......
4949
5050
5151
52
52
5353
5454
5555
if(tmp->id == id)
{
tmp->string = malloc(strlen(string)+1);
snprintf(tmp->string, strlen(string)+1,"%s", string);
strncpy(tmp->string, string, strlen(string)+1);
return;
}
tmp = tmp->next;
string_ref *new_ref = malloc(sizeof(string_ref));
new_ref->string = malloc(strlen(string)+1);
snprintf(new_ref->string, (strlen(string)+1)* sizeof(char),"%s", string);
strncpy(new_ref->string, string, (strlen(string)+1)* sizeof(char));
new_ref->id = id;
new_ref->next = ref_strings;
ref_strings = new_ref;
trunk/i386/libsaio/asm.s
303303
304304
305305
306
307
308
309
310
311306
312307
313308
314309
315
310
311
316312
313
314
317315
318316
319317
movzwl %sp, %esp
movzwl %bp, %ebp
// Modify caller's return address on the stack
// from linear address to segment offset.
popl %eax
// Reenable maskable interrupts.
sti
jmp *%ax
// Modify caller's return address on the stack
// from linear address to segment offset.
ret $2
.code32
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
trunk/i386/libsaio/console.c
130130
131131
132132
133
133
134134
135135
136136
cursor = msgbuf;
msglog("%s\n", "Chameleon " I386BOOT_CHAMELEONVERSION " (svn-r" I386BOOT_CHAMELEONREVISION ")" " [" I386BOOT_BUILDDATE "]");
getRTCdatetime();
verbose("Logging started: %04d/%02d/%02d, %02d:%02d:%02d\n", datetime.year, datetime.mon, datetime.day, datetime.hour, datetime.mins, datetime.secs);
msglog("Logging started: %04d/%02d/%02d, %02d:%02d:%02d\n", datetime.year, datetime.mon, datetime.day, datetime.hour, datetime.mins, datetime.secs);
}
int msglog(const char * fmt, ...)
trunk/i386/libsaio/hfs.c
568568
569569
570570
571
571
572572
573573
574574
......
727727
728728
729729
730
730
731731
732732
733733
if (offset > fileLength)
{
printf("ReadFile(HFS%c): Offset is too large.\n", gIsHFSPlus ? "+" : "");
printf("ReadFile(HFS%s): Offset is too large.\n", gIsHFSPlus ? "+" : "");
return -1;
}
if ((SWAP_BE32(hfsPlusFile->userInfo.fdType) == kHardLinkFileType) && (SWAP_BE32(hfsPlusFile->userInfo.fdCreator) == kHFSPlusCreator))
{
sprintf(gLinkTemp, "%s/%s%ld", HFSPLUSMETADATAFOLDER, HFS_INODE_PREFIX, SWAP_BE32(hfsPlusFile->bsdInfo.special.iNodeNum));
sprintf(gLinkTemp, "%s/%s%d", HFSPLUSMETADATAFOLDER, HFS_INODE_PREFIX, SWAP_BE32(hfsPlusFile->bsdInfo.special.iNodeNum));
result = ResolvePathToCatalogEntry(gLinkTemp, flags, entry, kHFSRootFolderID, &tmpDirIndex);
}
}
trunk/i386/libsaio/acpi_patcher.c
104104
105105
106106
107
107
108108
109109
110110
......
390390
391391
392392
393
393
394394
395395
396396
397
397
398398
399399
400400
......
428428
429429
430430
431
431
432
433
434
435
436
437
438
432439
433440
434441
......
513520
514521
515522
516
523
517524
518525
519526
......
630637
631638
632639
633
640
634641
635642
636643
// Try finding 'filename' in the usual places
// Start searching any potential location for ACPI Table
snprintf(dirSpec, sizeof(dirSpec), "%s", filename);
strncpy(dirSpec, filename, sizeof(dirSpec) );
fd = open(dirSpec, 0);
if (fd < 0)
{
/* Try using the file specified with the DSDT option */
if (getValueForKey(kDSDT, &filename, &len, &bootInfo->chameleonConfig))
{
snprintf(dirSpec, sizeof(dirSpec), filename);
strncpy(dirSpec, filename, sizeof(dirSpec) );
}
else
{
sprintf(dirSpec, "DSDT.aml");
strcpy(dirSpec, "DSDT.aml");
//verbose("dirSpec, DSDT.aml");
}
{
char filename[512];
sprintf(filename, i > 0 ? "SSDT-%d.aml" : "SSDT.aml", i);
if (i > 0)
{
sprintf(filename, "SSDT-%d.aml", i);
}
else
{
strcpy(filename, "SSDT.aml");
}
if ( (new_ssdt[ssdt_count] = loadACPITable(filename)) )
{
if (tableSign(table, "DSDT"))
{
DBG("DSDT found\n");
verbose("Custom DSDT table was found\n");
DBG("Custom DSDT table was found\n");
if(new_dsdt)
{
rsdt_entries[i-dropoffset]=(uint32_t)new_dsdt;
if (drop_ssdt && tableSign(table, "SSDT"))
{
DBG("dropped (OEM)\n");
DBG("OEM SSDT tables was dropped\n");
dropoffset++;
continue;
}
trunk/i386/libsaio/spd.c
246246
247247
248248
249
249
250250
251251
252252
}
else
{
sprintf(asciiSerial, "0000000000000000");
strcpy(asciiSerial, "0000000000000000");
}
return strdup(asciiSerial);
trunk/i386/libsaio/pci_root.c
9494
9595
9696
97
97
9898
9999
100100
101
101
102102
103103
104104
// Try using the file specified with the DSDT option
if (getValueForKey(kDSDT, &dsdt_filename, &len, &bootInfo->chameleonConfig))
{
snprintf(dsdt_dirSpec, sizeof(dsdt_dirSpec), dsdt_filename);
strncpy(dsdt_dirSpec, dsdt_filename, sizeof(dsdt_dirSpec) );
}
else
{
sprintf(dsdt_dirSpec, "DSDT.aml");
strcpy(dsdt_dirSpec, "DSDT.aml");
}
int fd = search_and_get_acpi_fd(dsdt_dirSpec, &dsdt_filename);
trunk/i386/libsaio/nvidia.c
22842284
22852285
22862286
2287
2287
22882288
22892289
22902290
}
}
snprintf(biosVersion, sizeof(biosVersion), "%s", (nvBiosOveride > 0) ? nvFilename : version_str);
strncpy(biosVersion, (nvBiosOveride > 0) ? nvFilename : version_str, sizeof(biosVersion) );
snprintf(kNVCAP, sizeof(kNVCAP), "NVCAP_%04x", nvda_dev->device_id);
if (getValueForKey(kNVCAP, &value, &len, &bootInfo->chameleonConfig) && len == NVCAP_LEN * 2)
trunk/i386/libsaio/ati.c
21622162
21632163
21642164
2165
2165
21662166
21672167
21682168
......
21712171
21722172
21732173
2174
2174
21752175
21762176
21772177
......
23932393
23942394
23952395
2396
2396
23972397
23982398
23992399
24002400
24012401
24022402
2403
2403
24042404
24052405
24062406
if (from_pci)
{
rom_addr = (option_rom_header_t *)(pci_config_read32(card->pci_dev->dev.addr, PCI_ROM_ADDRESS) & ~0x7ff);
verbose(" @0x%x\n", rom_addr);
verbose(" @0x%x\n", (unsigned) rom_addr);
}
else
{
if (!validate_rom(rom_addr, card->pci_dev))
{
verbose("There is no ROM @0x%x\n", rom_addr);
verbose("There is no ROM @0x%x\n", (unsigned) rom_addr);
return false;
}
card->rom_size = rom_addr->rom_size * 512;
return false;
}
verbose("Found ATI card! Device ID:[%04X:%04X] Subsystem ID:[%08X] - Radeon [%04X:%08X] %s\n",
pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id, card->info->device_id, card->info->subsys_id, card->info->model_name);
pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id.subsys_id, card->info->device_id, card->info->subsys_id, card->info->model_name);
card->fb= (uint8_t *)(pci_config_read32(pci_dev->dev.addr, PCI_BASE_ADDRESS_0) & ~0x0f);
card->mmio= (uint8_t *)(pci_config_read32(pci_dev->dev.addr, PCI_BASE_ADDRESS_2) & ~0x0f);
card->io= (uint8_t *)(pci_config_read32(pci_dev->dev.addr, PCI_BASE_ADDRESS_4) & ~0x03);
verbose("Framebuffer @0x%08X MMIO @0x%08XI/O Port @0x%08X ROM Addr @0x%08X\n",
card->fb, card->mmio, card->io, pci_config_read32(pci_dev->dev.addr, PCI_ROM_ADDRESS));
(unsigned) card->fb, (unsigned) card->mmio, (unsigned) card->io, pci_config_read32(pci_dev->dev.addr, PCI_ROM_ADDRESS));
card->posted = radeon_card_posted();
verbose("ATI card %s, ", card->posted ? "POSTed" : "non-POSTed");
trunk/i386/libsaio/cpu.c
261261
262262
263263
264
264265
265266
266267
......
512513
513514
514515
516
517
518
515519
516520
517521
......
806810
807811
808812
813
814
809815
810816
811817
uint8_tcurrcoef= 0;
uint8_tmaxdiv= 0;
uint8_tmaxcoef= 0;
uint8_tpic0_mask;
const char*newratio;
charstr[128];
p->CPU.Features |= CPU_FEATURE_HTT;
}
pic0_mask = inb(0x21U);
outb(0x21U, 0xFFU); // mask PIC0 interrupts for duration of timing tests
tscFrequency = measure_tsc_frequency();
DBG("cpu freq classic = 0x%016llx\n", tscFrequency);
// if usual method failed
#endif
outb(0x21U, pic0_mask); // restore PIC0 interrupts
p->CPU.MaxCoef = maxcoef;
p->CPU.MaxDiv = maxdiv;
p->CPU.CurrCoef = currcoef;
trunk/i386/libsaio/disk.c
742742
743743
744744
745
745
746746
747747
748748
......
15371537
15381538
15391539
1540
1540
15411541
15421542
15431543
......
23602360
23612361
23622362
2363
2363
23642364
23652365
23662366
//==============================================================================
BVRef newAPMBVRef( int biosdev, int partno, unsigned int blkoff,
static BVRef newAPMBVRef( int biosdev, int partno, unsigned int blkoff,
const DPME * part,
FSInit initFunc, FSLoadFile loadFunc,
FSReadFile readFunc,
{
char stringuuid[100];
efi_guid_unparse_upper((EFI_GUID*)gptMap->ent_type, stringuuid);
verbose("Reading GPT partition %d, type %s\n", gptID, stringuuid);
verbose("Reading GPT partition %d, type %s\n", (unsigned) gptID, stringuuid);
// Getting fdisk like partition type.
fsType = probeFileSystem(biosdev, gptMap->ent_lba_start);
}
// Set the devices label
snprintf(bvr->label, sizeof(bvr->label), p);
strncpy(bvr->label, p, sizeof(bvr->label) );
}
trunk/i386/libsaio/biosfn.c
10181018
10191019
10201020
1021
1022
1023
1024
1021
10251022
1026
1023
1024
10271025
1028
1029
1030
1026
1027
1028
1029
10311030
10321031
10331032
void sleep(int n)
{
// FIXME: doesn't handle midnight wraparound
unsigned int endtime = (time18() + 18*n);
#ifdef __i386__
while (time18() < endtime)
while (n >= 2048)
{
__asm__ volatile ("rep; nop");
delay(2048000000);
n -= 2048;
}
#else
while (time18() < endtime);
#endif
if (n > 0)
{
delay(n * 1000000);
}
}
trunk/i386/libsaio/fake_efi.c
477477
478478
479479
480
480
481481
482482
483483
......
723723
724724
725725
726
726727
727728
728729
......
738739
739740
740741
741
742
743
742
743
744744
745
746
747
748745
749746
750747
......
753750
754751
755752
756
753
757754
758755
759756
760757
761
758
762759
763760
764761
......
776773
777774
778775
776
777
778
779
780
779781
780782
781783
......
784786
785787
786788
787
788
789
789
790
791
790792
791
793
792794
793
794
795
796
795
796
797
798
797799
798
800
799801
800802
801803
......
825827
826828
827829
828
830
829831
830832
831833
}
*len = strlen(src);
dst = (EFI_CHAR16*) malloc( ((*len)+1) * 2 );
dst = (EFI_CHAR16 *) malloc( ((*len)+1) * 2 );
for (; i < (*len); i++)
{
dst[i] = src[i];
length = strlen(bootInfo->bootFile);
DT__AddProperty(chosenNode, "boot-file", length + 1, bootInfo->bootFile);
//DT__AddProperty(chosenNode, "boot-device-path", bootDPsize, gBootDP);
//DT__AddProperty(chosenNode, "boot-file-path", bootFPsize, gBootFP);
//
UInt8 index = 0;
EFI_UINT16 PMTimerValue = 0;
EFI_UINT32 randomValue, tempValue, cpuTick;
EFI_UINT32 ecx, esi, edi = 0;
EFI_UINT32 rcx, rdx, rsi, rdi;
EFI_UINT32 randomValue = 0, cpuTick = 0;
EFI_UINT32 ecx = 0, edx = 0, esi = 0, edi = 0;
randomValue = tempValue = ecx = esi = edi = 0;// xor%ecx,%ecx
cpuTick = rcx = rdx = rsi = rdi = 0;
// LEAF_1 - Feature Information (Function 01h).
if (Platform.CPU.CPUID[CPUID_1][2] & 0x40000000)// Checking ecx:bit-30
{
//
EFI_UINT32 seedBuffer[16] = {0};
//
// Main loop to get 16 qwords (four bytes each).
// Main loop to get 16 dwords (four bytes each).
//
for (index = 0; index < 16; index++)// 0x17e12:
{
randomValue = computeRand();// callq0x18e20
cpuTick = getCPUTick();// callq0x121a7
cpuTick = (EFI_UINT32) getCPUTick();// callq0x121a7
randomValue = (randomValue ^ cpuTick);// xor%rdi,%rax
seedBuffer[index] = randomValue;// mov%rax,(%r15,%rsi,8)
}// jb0x17e12
//
do// 0x17e55:
{
//
// FIXME: PM Timer is usually @ 0x408, but its position is relocatable
// via PCI-to-ISA bridge. The location is reported in ACPI FADT,
// PM Timer Block address - zenith432
//
PMTimerValue = inw(0x408);// in(%dx),%ax
esi = PMTimerValue;// movzwl%ax,%esi
continue;// jb0x17e55(retry)
}
cpuTick = getCPUTick();// callq0x121a7
//printf("value: 0x%llx\n", getCPUTick());
rcx = (cpuTick >> 8);// mov%rax,%rcx
cpuTick = (EFI_UINT32) getCPUTick();// callq0x121a7
//printf("value: 0x%x\n", getCPUTick());
ecx = (cpuTick >> 8);// mov%rax,%rcx
// shr$0x8,%rcx
rdx = (cpuTick >> 10);// mov%rax,%rdx
edx = (cpuTick >> 0x10);// mov%rax,%rdx
// shr$0x10,%rdx
rdi = rsi;// mov%rsi,%rdi
rdi = (rdi ^ cpuTick);// xor%rax,%rdi
rdi = (rdi ^ rcx);// xor%rcx,%rdi
rdi = (rdi ^ rdx);// xor%rdx,%rdi
edi = esi;// mov%rsi,%rdi
edi = (edi ^ cpuTick);// xor%rax,%rdi
edi = (edi ^ ecx);// xor%rcx,%rdi
edi = (edi ^ edx);// xor%rdx,%rdi
seedBuffer[index] = (rdi & 0xff);// mov%dil,(%r15,%r12,1)
seedBuffer[index] = (edi & 0xff);// mov%dil,(%r15,%r12,1)
edi = (edi & 0x2f);// and$0x2f,%edi
edi = (edi + esi);// add%esi,%edi
if (getValueForKey(kSMBIOSKey, &override_pathname, &len, &bootInfo->chameleonConfig) && len > 0)
{
// Specify a path to a file, e.g. SMBIOS=/Extra/macProXY.plist
sprintf(dirSpecSMBIOS, override_pathname);
strcpy(dirSpecSMBIOS, override_pathname);
err = loadConfigFile(dirSpecSMBIOS, &bootInfo->smbiosConfig);
}
else
trunk/i386/libsaio/saio_internal.h
3333
3434
3535
36
36
3737
3838
3939
......
9595
9696
9797
98
99
98
99
100100
101101
102102
extern voidhalt(void) __attribute__((noreturn));
extern voidstartprog(unsigned int address, void *arg) __attribute__((noreturn));
extern voidloader(UInt32 code, UInt32 cmdptr);
extern uint64_tcomputeRand(void);
extern uint32_tcomputeRand(void);
/* bios.s */
extern void bios(biosBuf_t *bb);
extern int getchar(void);
extern int printf(const char *format, ...);
extern int error(const char *format, ...);
extern int verbose(const char *format, ...);
extern void stop(const char *format, ...) __attribute__ ((noreturn));
extern int verbose(const char *format, ...) __attribute__((format(printf,1,2)));
extern void stop(const char *format, ...) __attribute__ ((noreturn, format(printf,1,2)));
//Azi: replace getc/getchar with ? console.c
extern void pause();
extern uint64_t getRTCdatetime();
trunk/i386/boot2/drivers.c
212212
213213
214214
215
215
216216
217217
218218
......
355355
356356
357357
358
358
359359
360360
361361
......
525525
526526
527527
528
528
529529
530530
531531
......
715715
716716
717717
718
718
719719
720720
721721
|| (gRAMDiskVolume && gRAMDiskBTAliased) )
{
// Next try a specfic OS version folder ie 10.5
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion[0]);
if (FileLoadDrivers(dirSpecExtra, 0) != 0) {
// Next we'll try the base
strlcpy(dirSpecExtra, "bt(0,0)/Extra/", sizeof(dirSpecExtra));
// Make sure this is a kext.
length = strlen(name);
if (strncmp(name + length - 5, ".kext", 5))
if (strncmp(name + length - 5, ".kext", sizeof(".kext") ))
{
continue;
}
}
else
{
snprintf(gFileSpec, 4096, "%s", dirSpec);
strncpy(gFileSpec, dirSpec, 4096);
}
bundlePathLength = strlen(gFileSpec) + 1;
driver->bundlePathLength = module->bundlePathLength;
// Save the plist, module and bundle.
strlcpy(driver->plistAddr, module->plistAddr,driver->plistLength);
strlcpy(driver->plistAddr, module->plistAddr, driver->plistLength);
if (length != 0)
{
memcpy(driver->executableAddr, executableAddr, length);
trunk/i386/boot2/boot.c
345345
346346
347347
348
348
349349
350350
351351
if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat))
{
snprintf(kernelCachePath, sizeof(kernelCachePath), "/com.apple.recovery.boot/kernelcache", kernelCacheFile);
strncpy(kernelCachePath, "/com.apple.recovery.boot/kernelcache", sizeof(kernelCachePath) );
ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime);
if ((flags & kFileTypeMask) != kFileTypeFlat)
trunk/i386/boot2/gui.h
143143
144144
145145
146
147
146
147
148148
149149
150150
void showInfoBox(char *title, char *text);
int dprintf( window_t * window, const char * fmt, ...);
int gprintf( window_t * window, const char * fmt, ...);
int dprintf( window_t * window, const char * fmt, ...) __attribute__((format(printf,2,3)));
int gprintf( window_t * window, const char * fmt, ...) __attribute__((format(printf,2,3)));
int vprf(const char * fmt, va_list ap);
int drawInfoMenu();
trunk/i386/boot2/ramdisk.c
2929
3030
3131
32
32
3333
3434
3535
......
4747
4848
4949
50
50
5151
5252
5353
5454
55
55
5656
5757
5858
&bootInfo->chameleonConfig))
{
// Use user specified md0 file
snprintf(filename, sizeof(filename), "%s", override_filename);
strncpy(filename, override_filename, sizeof(filename) );
fh = open(filename, 0);
if(fh < 0)
if(fh < 0)
{
sprintf(filename, "rd(0,0)/Extra/Postboot.img");
strcpy(filename, "rd(0,0)/Extra/Postboot.img");
fh = open(filename, 0);
if(fh < 0)
{
sprintf(filename, "/Extra/Postboot.img");// Check /Extra if not in rd(0,0)
strcpy(filename, "/Extra/Postboot.img");// Check /Extra if not in rd(0,0)
fh = open(filename, 0);
}
}
trunk/i386/boot2/options.c
752752
753753
754754
755
756
755
756
757757
758
759
760
758
759
760
761761
762762
763763
(i < bootInfo->memoryMapCount) && (bufflen < 1024); /* prevent buffer overflow */
i++) {
bufflen += snprintf(buff+bufflen, 1024-bufflen, "Base 0x%08x%08x, ",
(unsigned long)(mp->base >> 32),
(unsigned long)(mp->base));
(unsigned)(mp->base >> 32),
(unsigned)(mp->base));
bufflen += snprintf(buff+bufflen, 1024-bufflen, "length 0x%08x%08x, type %d\n",
(unsigned long)(mp->length >> 32),
(unsigned long)(mp->length),
mp->type);
(unsigned)(mp->length >> 32),
(unsigned)(mp->length),
(int) mp->type);
mp++;
}
return buff;
trunk/i386/config/symbol.c
180180
181181
182182
183
183184
185
184186
187
185188
189
186190
187191
188192
return;
}
if (sym->type == S_INT)
{
sprintf(str, "%d", val2);
}
else
{
sprintf(str, "0x%x", val2);
}
sym->curr.val = strdup(str);
}
trunk/i386/modules/Resolution/915resolution.c
296296
297297
298298
299
299
300300
301301
302302
303303
304304
305
305
306306
307307
308308
......
922922
923923
924924
925
925
926926
927927
928928
if (map->chipset == CT_UNKNOWN)
{
verbose(" Unknown chipset type: %08x.\n", map->chipset_id);
verbose(" Unknown chipset type: %08x.\n", (unsigned) map->chipset_id);
//verbose("915resolution only works with Intel 800/900 series graphic chipsets.\n");
//verbose("Chipset Id: %x\n", map->chipset_id);
close_vbios(map);
return 0;
} else {
verbose(" Detected chipset/proc id (DRAM controller): %08x\n", map->chipset_id);
verbose(" Detected chipset/proc id (DRAM controller): %08x\n", (unsigned) map->chipset_id);
}
/*if (mode.pixel_clock && (mode.h_active == x) && (mode.v_active == y) && !force) {*/
if (!getMode(&mode))
{
verbose("\n Edid detailed timing descriptor found: %dx%d\n vbios mode %d patched!\n", mode.h_active, mode.v_active, i);
verbose("\n Edid detailed timing descriptor found: %dx%d\n vbios mode %d patched!\n", mode.h_active, mode.v_active, (int) i);
mode_timing[i].usH_Total = mode.h_active + mode.h_blanking;
mode_timing[i].usH_Active = mode.h_active;
mode_timing[i].usH_SyncStart = mode.h_active + mode.h_sync_offset;
trunk/i386/modules/AcpiCodec/acpi_codec.c
635635
636636
637637
638
638
639639
640640
641641
......
41674167
41684168
41694169
4170
4170
41714171
41724172
41734173
......
47604760
47614761
47624762
4763
4763
47644764
47654765
47664766
......
47704770
47714771
47724772
4773
4773
47744774
47754775
47764776
......
47794779
47804780
47814781
4782
4782
47834783
47844784
47854785
if (GetChecksum(header, header->Length) == 0)
{
DBG("Found valid AML file : %s ", filename);
verbose("[ %s ] read and stored at: %x", acpi_file, tableAddr);
verbose("[ %s ] read and stored at: 0x%x", acpi_file, (unsigned) tableAddr);
printf("\n");
return tableAddr;
}
memcpy(fadt_mod, fadt, fadt->Header.Length);
fadt_mod->Header.Length = 0x74;
fadt_mod->Header.Revision = 0x01;
verbose("Warning: ACPI FADT length was < 0x74 which is the minimum for the ACPI FADT V1 specification, \n", fadt->Header.Revision );
verbose("Warning: ACPI FADT length was < 0x74 which is the minimum for the ACPI FADT V1 specification, \n" /*, fadt->Header.Revision */ );
verbose(" trying to convert it to Version 1. \n");
}
ret = GetFileInfo("rd(0,0)/Extra/", "Acpi", &flags, &time);
if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeDirectory))
{
sprintf(dirspec, "rd(0,0)/Extra/Acpi/");
strcpy(dirspec, "rd(0,0)/Extra/Acpi/");
acpidir_found = true;
}
ret = GetFileInfo("/Extra/", "Acpi", &flags, &time);
if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeDirectory))
{
sprintf(dirspec, "/Extra/Acpi/");
strcpy(dirspec, "/Extra/Acpi/");
acpidir_found = true;
}
ret = GetFileInfo("bt(0,0)/Extra/", "Acpi", &flags, &time);
if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeDirectory))
{
sprintf(dirspec, "bt(0,0)/Extra/Acpi/");
strcpy(dirspec, "bt(0,0)/Extra/Acpi/");
acpidir_found = true;
}
trunk/i386/libsa/libsa.h
137137
138138
139139
140
141
140
141
142142
143143
144144
/*
* printf.c
*/
extern int sprintf(char *s, const char *format, ...);
extern int snprintf(char *s, size_t size, const char *format, ...);
extern int sprintf(char *s, const char *format, ...) __attribute__((format(printf,2,3)));
extern int snprintf(char *s, size_t size, const char *format, ...) __attribute__((format(printf,3,4)));
extern int slvprintf(char *buffer, int len, const char *fmt, va_list arg);
/*
trunk/i386/util/dyldsymboltool.c
144144
145145
146146
147
147
148148
149149
150150
//dylib.dylib_info.cmdsize += offset;
//dylib.header.sizeofcmds += offset;
sprintf(dylib.module_name, "%s", DYLIB_NAME);
strcpy(dylib.module_name, DYLIB_NAME);
/* Load Commands - Symtable */
dylib.symtab.cmd = LC_SYMTAB;
trunk/CHANGES
1
2
3
4
15
26
37
- Zenith432 : Protect timing code in scan_cpu() from interrupts, use bios for sleep()
- Zenith432 : Fix setupChosenNode, Tweak asm.s
- Zenith432 : Change identity snprintf to strncpy + misc printf issues
- cparm : Implement strlcat()
- Zenith432 : Sanitize 16-bit assembly
- Zenith432 : Fix bug in malloc_init, use bios for enableA20()
- meklort : Slightly improve decive selection name - add os version.

Archive Download the corresponding diff file

Revision: 2633