Chameleon

Chameleon Commit Details

Date:2017-03-24 20:11:22 (3 years 2 months ago)
Author:ErmaC
Commit:2858
Parents: 2857
Message:Set macro definition (config.h)
Changes:
M/trunk/i386/libsaio/gma.c
M/trunk/i386/boot2/boot.c
M/trunk/i386/libsaio/bootstruct.c
M/trunk/i386/libsaio/dram_controllers.c
M/trunk/i386/libsaio/nvidia.c
M/trunk/i386/boot2/modules.c
M/trunk/i386/libsaio/bootstruct.h
M/trunk/i386/libsaio/load.c
M/trunk/i386/libsaio/acpi_patcher.c
M/branches/ErmaC/Enoch/i386/boot2/config.h
M/trunk/i386/libsaio/bootargs.h
M/trunk/i386/libsaio/state_generator.c
M/trunk/i386/boot2/gui.c
M/trunk/i386/libsaio/usb.c
M/trunk/i386/libsaio/device_inject.c
M/trunk/i386/libsaio/hda.c
M/trunk/i386/libsaio/smbios.c
M/trunk/i386/boot2/appleboot.h
M/trunk/i386/boot2/options.c
M/branches/ErmaC/Enoch/i386/libsaio/smbios_getters.c
M/trunk/i386/libsaio/xml.c
M/trunk/i386/libsaio/hpet.c
M/trunk/i386/libsaio/xml.h
M/trunk/i386/libsaio/exfat.c
M/trunk/i386/boot2/config.h
M/trunk/i386/libsaio/ati.c
M/trunk/i386/libsaio/pci_root.c
M/trunk/i386/libsaio/biosfn.c
M/trunk/i386/boot2/drivers.c
M/trunk/i386/libsaio/saio_types.h
M/trunk/i386/libsaio/spd.c
M/trunk/i386/libsaio/cpu.c
M/trunk/i386/libsaio/smbios_getters.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/config/lxdialog/dialog.h
M/trunk/i386/libsaio/pci_setup.c
M/trunk/i386/config/lxdialog/check-lxdialog.sh
M/trunk/i386/libsaio/smbios_decode.c

File differences

trunk/i386/libsaio/xml.c
2222
2323
2424
25
2526
2627
2728
2829
2930
30
31
32
33
3431
3532
3633
......
912909
913910
914911
915
912
916913
917914
918915
* @APPLE_LICENSE_HEADER_END@
*/
#include "config.h"
#include "bootstruct.h"
#include "libsaio.h"
#include "sl.h"
#include "xml.h"
#ifndef DEBUG_XML
#define DEBUG_XML 0
#endif
#if DEBUG_XML
#define DBG(x...)printf(x)
#else
//==========================================================================
// ParseTagData
static long ParseTagData( char *buffer, TagPtr *tag )
static long ParseTagData( char *buffer, TagPtr *tag)
{
intactuallen = 0;
longlength = 0;
trunk/i386/libsaio/xml.h
115115
116116
117117
118
119118
// ParseTag*
long ParseTagBoolean( char *buffer, TagPtr *tag, long type );
#endif /* __LIBSAIO_XML_H */
trunk/i386/libsaio/exfat.c
3535
3636
3737
38
3839
3940
4041
......
4243
4344
4445
45
46
47
4846
4947
50
51
48
49
5250
53
54
51
52
5553
5654
5755
* from similar ntfs.c funcs as fallback (if not NTFS, maybe it's EXFAT).
*/
#include "config.h"
#include "libsaio.h"
#include "sl.h"
#pragma mark Preprocessor Definitions
#pragma mark -
#ifndef DEBUG_EXFAT
#define DEBUG_EXFAT 0
#endif
#if DEBUG_EXFAT
#define DBG(x...)printf(x)
#define PAUSE()getchar()
#define DBG(x...)printf(x)
#define PAUSE()getchar()
#else
#define DBG(x...)
#define PAUSE()
#define DBG(x...)
#define PAUSE()
#endif
#defineEXFAT_BBID&gExfatID[0]
trunk/i386/libsaio/bootstruct.c
2626
2727
2828
29
2930
3031
3132
3233
33
34
35
36
3734
3835
3936
* All rights reserved.
*/
#include "config.h"
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#ifndef DEBUG_BOOTSTRUCT
#define DEBUG_BOOTSTRUCT 0
#endif
#if DEBUG_BOOTSTRUCT
#define DBG(x...)printf(x)
#else
trunk/i386/libsaio/bootstruct.h
135135
136136
137137
138
139138
139
140140
141141
142142
config_file_t smbiosConfig;// smbios.plist
config_file_t helperConfig;// boot helper partition's boot.plist
config_file_t ramdiskConfig;// RAMDisk.plist
config_file_t kernelConfig;// kernel.plist
bool memDetect;
} PrivateBootInfo_t;
trunk/i386/libsaio/acpi_patcher.c
33
44
55
6
67
78
89
......
1516
1617
1718
18
19
20
21
2219
2320
2421
* 2010 mojodojo, 2012 slice
*/
#include "config.h"
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#include "aml_generator.h"
#include "state_generator.h"
#ifndef DEBUG_ACPI
#define DEBUG_ACPI 0
#endif
#if DEBUG_ACPI==2
#define DBG(x...) {printf(x); sleep(1);}
#elif DEBUG_ACPI==1
trunk/i386/libsaio/bootargs.h
140140
141141
142142
143
144
145
146
147
148
149
150
143
144
145
146
147
148
149
150
151151
152152
153153
......
155155
156156
157157
158
159
158
159
160160
161161
162162
/* Rootless configuration flags */
// http://www.idelta.info/archives/kext-to-check-sip-rootless-status-on-el-capitan/
#define CSR_ALLOW_UNTRUSTED_KEXTS(1 << 0) /* Allow untrusted kexts */
#define CSR_ALLOW_UNRESTRICTED_FS(1 << 1) /* Allow unrestricted file system. */
#define CSR_ALLOW_TASK_FOR_PID(1 << 2) /* Allow test_for_pid() */
#define CSR_ALLOW_KERNEL_DEBUGGER(1 << 3)
#define CSR_ALLOW_APPLE_INTERNAL(1 << 4)
#define CSR_ALLOW_UNRESTRICTED_DTRACE(1 << 5) /* Allow unrestricted dtrace */
#define CSR_ALLOW_UNRESTRICTED_NVRAM(1 << 6) /* Allow unrestricted NVRAM */
#define CSR_ALLOW_DEVICE_CONFIGURATION(1 << 7) /* Allow device configuration */
#define CSR_ALLOW_UNTRUSTED_KEXTS(1 << 0) /* Allow untrusted kexts */
#define CSR_ALLOW_UNRESTRICTED_FS(1 << 1) /* Allow unrestricted file system. */
#define CSR_ALLOW_TASK_FOR_PID(1 << 2) /* Allow test_for_pid() */
#define CSR_ALLOW_KERNEL_DEBUGGER(1 << 3)
#define CSR_ALLOW_APPLE_INTERNAL(1 << 4)
#define CSR_ALLOW_UNRESTRICTED_DTRACE(1 << 5) /* Allow unrestricted dtrace */
#define CSR_ALLOW_UNRESTRICTED_NVRAM(1 << 6) /* Allow unrestricted NVRAM */
#define CSR_ALLOW_DEVICE_CONFIGURATION(1 << 7) /* Allow device configuration */
#define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \
CSR_ALLOW_UNRESTRICTED_FS | \
CSR_ALLOW_KERNEL_DEBUGGER | \
CSR_ALLOW_APPLE_INTERNAL | \
CSR_ALLOW_UNRESTRICTED_DTRACE | \
CSR_ALLOW_UNRESTRICTED_NVRAM | \
CSR_ALLOW_DEVICE_CONFIGURATION)
CSR_ALLOW_UNRESTRICTED_NVRAM | \
CSR_ALLOW_DEVICE_CONFIGURATION)
typedef struct boot_args
{
trunk/i386/libsaio/spd.c
66
77
88
9
910
1011
1112
......
1516
1617
1718
18
19
20
21
2219
2320
2421
* System profiler fix and other fixes by Mozodojo.
*/
#include "config.h"
#include "libsaio.h"
#include "pci.h"
#include "platform.h"
#include "bootstruct.h"
#include "memvendors.h"
#ifndef DEBUG_SPD
#define DEBUG_SPD 0
#endif
#if DEBUG_SPD
#define DBG(x...)printf(x)
#else
trunk/i386/libsaio/gma.c
3333
3434
3535
36
3637
3738
3839
......
4445
4546
4647
47
48
49
50
51
52
53
54
5548
5649
5750
......
443436
444437
445438
446
439
447440
448441
449442
- http://www.insanelymac.com/forum/topic/288241-intel-hd4000-inject-aaplig-platform-id/
*/
#include "config.h"
#include "libsa.h"
#include "saio_internal.h"
#include "bootstruct.h"
#include "vbe.h"
#include "graphics.h"
#ifndef DEBUG_GMA
#define DEBUG_GMA 0
#endif
#ifndef REPLACE_DEVICE_ID
#define REPLACE_DEVICE_ID 0
#endif
#if DEBUG_GMA
#define DBG(x...)printf(x)
#else
{GMA_SKYLAKE_ULX_GT1,HD_GRAPHICS },/* 190E */
{GMA_SKYLAKE_ULX_GT2,HD_GRAPHICS_515 },/* 191E */
{GMA_SKYLAKE_DT_GT2,HD_GRAPHICS_530 },/* 1912 */
{GMA_SKYLAKE_1921,HD_GRAPHICS_520 },/* 1921 */
{GMA_SKYLAKE_1921,HD_GRAPHICS_520 },/* 1921 */
{GMA_SKYLAKE_ULT_GT3_E,IRIS_540 },/* 1926 */
{GMA_SKYLAKE_ULT_GT3,HD_GRAPHICS_535 },/* 1923 */
{GMA_SKYLAKE_ULT_GT3_28W,HD_GRAPHICS_550 },/* 1927 */
trunk/i386/libsaio/pci_root.c
22
33
44
5
56
67
78
89
9
10
11
12
1310
14
11
1512
16
13
1714
1815
1916
* Copyright 2009 netkas
*/
#include "config.h"
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#ifndef DEBUG_PCIROOT
#define DEBUG_PCIROOT 1
#endif
#if DEBUG_PCIROOT
#define DBG(x...) printf(x)
#define DBG(x...) printf(x)
#else
#define DBG(x...)
#define DBG(x...)
#endif
static int rootuid = 10; //value means function wasnt ran yet
trunk/i386/libsaio/usb.c
77
88
99
10
1011
1112
1213
1314
1415
15
16
17
18
1916
2017
2118
*
*/
#include "config.h"
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#include "pci.h"
#ifndef DEBUG_USB
#define DEBUG_USB 0
#endif
#if DEBUG_USB
#define DBG(x...)printf(x)
#else
trunk/i386/libsaio/device_inject.c
55
66
77
8
89
910
1011
......
1314
1415
1516
16
17
18
19
2017
2118
2219
......
170167
171168
172169
173
170
174171
175
172
176173
177174
178175
179176
180
177
181178
182179
183
180
184181
185
182
186183
187184
188185
189186
190187
191188
192
189
193190
194191
195192
196
193
197194
198195
199196
*Cleaned and merged by iNDi
*/
#include "config.h"
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#include "device_inject.h"
#include "convert.h"
#ifndef DEBUG_INJECT
#define DEBUG_INJECT 0
#endif
#if DEBUG_INJECT
#define DBG(x...)printf(x)
#else
free(device);
return NULL;
}
device->numentries = 0x00;
device->acpi_dev_path.length= 0x0c;
device->acpi_dev_path.type= 0x02;
device->acpi_dev_path.subtype= 0x01;
device->acpi_dev_path._HID= 0xd041030a; // 0x0a0341d0
device->num_pci_devpaths = numpaths;
device->length = 24 + (6*numpaths);
inti;
for(i = 0; i < numpaths; i++)
{
device->pci_dev_path[i].length = 0x06;
device->pci_dev_path[i].type = 0x01;
device->pci_dev_path[i].subtype = 0x01;
}
device->path_end.length = 0x04;
device->path_end.type = 0x7f;
device->path_end.subtype = 0xff;
device->string = string;
device->data = NULL;
trunk/i386/libsaio/hda.c
6060
6161
6262
63
6364
6465
6566
......
7576
7677
7778
78
79
80
81
8279
8380
8481
8582
8683
8784
88
89
90
91
9285
9386
9487
*
******************************************************************************/
#include "config.h"
#include "boot.h"
#include "bootstruct.h"
#include "cpu.h"
#define HEADER __FILE__ " [" TOSTRING(__LINE__) "]: "
#ifndef DEBUG_HDA
#define DEBUG_HDA 0
#endif
#if DEBUG_HDA
#define DBG(x...) verbose(x)
#else
#define DBG(x...)
#endif
#ifndef DEBUG_CODEC
#define DEBUG_CODEC 0
#endif
#if DEBUG_CODEC
#define CDBG(x...) verbose(x)
#else
trunk/i386/libsaio/dram_controllers.c
1313
1414
1515
16
1617
1718
1819
1920
2021
2122
22
23
24
25
2623
2724
2825
* http://www.canardpc.com - http://www.memtest.org
*/
#include "config.h"
#include "libsaio.h"
#include "bootstruct.h"
#include "pci.h"
#include "platform.h"
#include "dram_controllers.h"
#ifndef DEBUG_DRAM
#define DEBUG_DRAM 0
#endif
#if DEBUG_DRAM
#define DBG(x...) printf(x)
#else
trunk/i386/libsaio/nvidia.c
4747
4848
4949
50
5051
5152
5253
......
5657
5758
5859
59
60
61
62
6360
6461
6562
......
172169
173170
174171
175
172
176173
177174
178175
*SOFTWARE.
*/
#include "config.h"
#include "boot.h"
#include "bootstruct.h"
#include "pci.h"
#include "nvidia.h"
#include "nvidia_helper.h"
#ifndef DEBUG_NVIDIA
#define DEBUG_NVIDIA 0
#endif
#if DEBUG_NVIDIA
#define DBG(x...)printf(x)
#else
};
static nvidia_pci_info_t nvidia_card_generic[] = {
// 0000 - 0040
// 0000 - 0040
{ 0x10DE0000,"Unknown" },
// 0040 - 004F
/*
trunk/i386/libsaio/ati.c
55
66
77
8
89
9
10
11
1210
1311
1412
*
*/
#include "config.h"
#include "ati.h"
#ifndef DEBUG_ATI
#define DEBUG_ATI 0
#endif
#if DEBUG_ATI
#define DBG(x...)printf(x)
trunk/i386/libsaio/load.c
3737
3838
3939
40
4041
4142
4243
#define DBG(x...)msglog(x)
#endif
// Private functions.
static long DecodeSegment(long cmdBase, unsigned int*load_addr, unsigned int *load_size);
static long DecodeUnixThread(long cmdBase, unsigned int *entry);
static long DecodeSymbolTable(long cmdBase);
trunk/i386/libsaio/cpu.c
44
55
66
7
78
89
910
1011
1112
1213
13
14
15
16
1714
1815
1916
......
284281
285282
286283
287
284
288285
289286
290287
......
408405
409406
410407
411
408
412409
413
410
411
412
414413
415
414
416415
417416
418417
......
469468
470469
471470
471
472472
473473
474474
* Bronya: 2015 Improve AMD support, cleanup and bugfix
*/
#include "config.h"
#include "libsaio.h"
#include "platform.h"
#include "cpu.h"
#include "bootstruct.h"
#include "boot.h"
#ifndef DEBUG_CPU
#define DEBUG_CPU 0
#endif
#if DEBUG_CPU
#define DBG(x...)printf(x)
#else
*
* -- zenith432, May 22nd, 2016
*/
void* memcpy_interruptible(void* dst, const void* src, size_t len)
void *memcpy_interruptible(void *dst, const void *src, size_t len)
{
uint64_t tscFreq, lastTsc;
uint32_t eflags, threshold;
* The BrandString 48 bytes (max), guaranteed to
* be NULL terminated.
*/
do_cpuid(0x80000002, reg);
do_cpuid(0x80000002, reg); // Processor Brand String
memcpy(&str[0], (char *)reg, 16);
do_cpuid(0x80000003, reg);
do_cpuid(0x80000003, reg); // Processor Brand String
memcpy(&str[16], (char *)reg, 16);
do_cpuid(0x80000004, reg);
do_cpuid(0x80000004, reg); // Processor Brand String
memcpy(&str[32], (char *)reg, 16);
for (s = str; *s != '\0'; s++)
{
break;
}
}
void scan_cpu(PlatformInfo_t *p)
{
verbose("[ CPU INFO ]\n");
trunk/i386/libsaio/pci_setup.c
1
12
23
34
......
45
56
67
7
8
9
10
118
129
1310
#include "config.h"
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#include "pci.h"
#include "modules.h"
#ifndef DEBUG_PCI_SETUP
#define DEBUG_PCI_SETUP 0
#endif
#if DEBUG_PCI_SETUP
#define DBG(x...)printf(x)
#else
trunk/i386/libsaio/smbios.c
55
66
77
8
8
99
1010
1111
1212
1313
1414
15
16
17
18
1915
20
16
2117
22
18
2319
2420
2521
*
*/
#include "config.h"
#include "boot.h"
#include "bootstruct.h"
#include "smbios_getters.h"
// Bungo
#include "convert.h"
#ifndef DEBUG_SMBIOS
#define DEBUG_SMBIOS 0
#endif
#if DEBUG_SMBIOS
#define DBG(x...)printf(x)
#define DBG(x...)printf(x)
#else
#define DBG(x...)msglog(x)
#define DBG(x...)msglog(x)
#endif
#define SMBPlist&bootInfo->smbiosConfig
trunk/i386/libsaio/smbios_decode.c
55
66
77
8
89
910
1011
1112
1213
1314
14
15
16
17
1815
19
16
2017
21
18
2219
2320
2421
*
*/
#include "config.h"
#include "libsaio.h"
#include "smbios.h"
// Bungo:
#include "boot.h"
#include "bootstruct.h"
#ifndef DEBUG_SMBIOS
#define DEBUG_SMBIOS 0
#endif
#if DEBUG_SMBIOS
#define DBG(x...)printf(x)
#define DBG(x...)printf(x)
#else
#define DBG(x...)msglog(x)
#define DBG(x...)msglog(x)
#endif
extern char *getSMBStringForField(SMBStructHeader *structHeader, uint8_t field);
trunk/i386/libsaio/hpet.c
66
77
88
9
910
1011
1112
1213
13
14
15
16
1714
1815
1916
* High Precision Event Timer (HPET)
*/
#include "config.h"
#include "libsaio.h"
#include "pci.h"
#include "hpet.h"
#ifndef DEBUG_HPET
#define DEBUG_HPET 0
#endif
#if DEBUG_HPET
#define DBG(x...) printf(x)
#else
trunk/i386/libsaio/biosfn.c
4040
4141
4242
43
4344
4445
4546
4647
47
48
49
50
5148
5249
5350
- Added ebiosEjectMedia
*/
#include "config.h"
#include "bootstruct.h"
#include "libsaio.h"
#ifndef MEMRANGE
#define MEMRANGE 0
#endif
#if MEMRANGE
#define DBG(x...)printf(x)
#else
trunk/i386/libsaio/saio_types.h
6060
6161
6262
63
63
6464
6565
6666
typedef struct Tag
{
longtype;
char *string;
char*string;
longoffset;
struct Tag *tag;
struct Tag *tagNext;
trunk/i386/libsaio/state_generator.c
99
1010
1111
12
1213
1314
1415
......
2122
2223
2324
24
25
26
27
2825
2926
3027
31
28
3229
33
30
3431
3532
3633
*
*/
#include "config.h"
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#include "aml_generator.h"
#include "state_generator.h"
#ifndef DEBUG_STATE
#define DEBUG_STATE 0
#endif
#if DEBUG_STATE==2
#define DBG(x...) {printf(x); sleep(1);}
#elif DEBUG_STATE==1
#define DBG(x...) printf(x)
#define DBG(x...) printf(x)
#else
#define DBG(x...) msglog(x)
#define DBG(x...) msglog(x)
#endif
uint8_t acpi_cpu_count= 0;
trunk/i386/libsaio/fake_efi.c
22
33
44
5
6
57
68
79
......
1921
2022
2123
22
23
24
25
26
27
28
29
3024
3125
3226
/*
* Copyright 2007 David F. Elliott. All rights reserved.
*/
#include "config.h"
#include "saio_types.h"
#include "libsaio.h"
#include "boot.h"
#include "sl.h"
#include "vers.h"
#ifndef DEBUG_EFI
#define DEBUG_EFI 0
#endif
#ifndef RANDOMSEED
#define RANDOMSEED 0
#endif
#if DEBUG_EFI
#define DBG(x...)printf(x)
#else
trunk/i386/libsaio/smbios_getters.c
55
66
77
8
89
910
1011
11
12
13
14
1512
1613
1714
*
*/
#include "config.h"
#include "smbios_getters.h"
#include "bootstruct.h"
#ifndef DEBUG_SMBIOS
#define DEBUG_SMBIOS 0
#endif
#if DEBUG_SMBIOS
#define DBG(x...)printf(x)
#else
trunk/i386/boot2/config.h
99
1010
1111
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
1288
#ifndef config_h
#define config_h
////////////////////////////////// boot.c
#define DEBUG_BOOT2 0
#define DEBUG_INTERRUPTS 0
////////////////////////////////// hpet.c
#define DEBUG_HPET 0
////////////////////////////////// modules.c
#define CONFIG_MODULE_DEBUG 0
////////////////////////////////// acpi_patcher.c 0 - 1 - 2
#define DEBUG_ACPI 0
////////////////////////////////// ati.c
#define DEBUG_ATI 0
////////////////////////////////// nvidia.c
#define DEBUG_NVIDIA 0
////////////////////////////////// gma.c
#define DEBUG_GMA 0
#define REPLACE_DEVICE_ID 0
////////////////////////////////// usb.c
#define DEBUG_USB 0
////////////////////////////////// gui.c
#define DEBUG_GUI 0
////////////////////////////////// pci_root.c
#define DEBUG_PCIROOT 1
////////////////////////////////// pci_setup.c
#define DEBUG_PCI_SETUP 0
////////////////////////////////// smbios.c
////////////////////////////////// smbios_decode.c
////////////////////////////////// smbios_getters.c
#define DEBUG_SMBIOS 0
////////////////////////////////// spd.c
#define DEBUG_SPD 0
////////////////////////////////// state_generator.c
#define DEBUG_STATE 0
////////////////////////////////// biosfn.c
#define MEMRANGE 1
////////////////////////////////// bootstruct.c
#define DEBUG_BOOTSTRUCT 0
////////////////////////////////// cpu.c
#define DEBUG_CPU 0
////////////////////////////////// device_inject.c
#define DEBUG_INJECT 0
////////////////////////////////// dram_controllers.c
#define DEBUG_DRAM 0
////////////////////////////////// exfat.c
#define DEBUG_EXFAT 0
////////////////////////////////// fake_efi.c
#define DEBUG_EFI 0
#define RANDOMSEED 0
////////////////////////////////// hda.c
#define DEBUG_HDA 0
#define DEBUG_CODEC 0
////////////////////////////////// xml.c
#define DEBUG_XML 0
#endif /* config_h */
trunk/i386/boot2/drivers.c
4646
4747
4848
49
50
5149
5250
5351
......
226224
227225
228226
227
229228
230229
231230
......
259258
260259
261260
262
261
263262
264263
265264
......
496495
497496
498497
499
500
501
502
503
504
505
498
499
500
501
502
503
504
506505
507506
508507
......
686685
687686
688687
689
690
691
692
693
694
695688
696689
697690
......
11381131
11391132
11401133
1141
1134
11421135
11431136
11441137
......
11511144
11521145
11531146
1154
1147
11551148
11561149
11571150
......
11651158
11661159
11671160
1168
1161
11691162
11701163
11711164
#define DBG(x...)msglog(x)
#endif
// extern char gMacOSVersion[8];
struct Module {
struct Module *nextModule;
long willLoad;
}
}
}
if(!gHaveKernelCache)
{
// Don't load main driver (from /System/Library/Extentions) if gHaveKernelCache is set.
}
else
{
verbose("Attempting to loading drivers from standard repositories:\n");
verbose("Attempting to load drivers from standard repositories:\n");
if ( (gMacOSVersion[3] == '9') || ((gMacOSVersion[3] == '1') && ((gMacOSVersion[4] == '0') || (gMacOSVersion[4] == '1') || (gMacOSVersion[4] == '2') ) )) // issue 352
{
// LoadDriverPList
long LoadDriverPList( char *dirSpec, char *name, long bundleType )
{
long length, executablePathLength, bundlePathLength;
ModulePtr module;
TagPtr personalities;
char * buffer = 0;
char * tmpExecutablePath = 0;
char * tmpBundlePath = 0;
long ret = -1;
longlength, executablePathLength, bundlePathLength;
ModulePtrmodule;
TagPtrpersonalities;
char*buffer = 0;
char*tmpExecutablePath = 0;
char*tmpBundlePath = 0;
longret = -1;
do{
// Save the driver path.
if ((length != -1) && executableAddr)
{
//driverModuleAddr = (void *)kLoadAddr;
//if (length != 0)
//{
//ThinFatFile(&driverModuleAddr, &length);
//}
// Make make in the image area.
execute_hook("LoadMatchedModules", module, &length, executableAddr, NULL);
default:kernelOSVer = 0xA0A0500; break; //Last known kernel
}
break;
case 15:
case 15: /* El Capitan */
switch (gDarwinMinor)
{
case 0: kernelOSVer = 0xA0B0000; break;
default:kernelOSVer = 0xA0B0600; break; //Last known kernel (add here updates)
}
break;
case 16:
case 16: /* Sierra */
switch (gDarwinMinor)
{
case 0: kernelOSVer = 0xA0C0000; break;
break;
default:
kernelOSVer = 0xA0C0400;
break;
break; //Last known kernel is Sierra 10.12.4
}
}
else
trunk/i386/boot2/boot.c
4545
4646
4747
48
4849
4950
5051
......
5657
5758
5859
59
60
61
6260
63
64
65
66
6761
6862
6963
......
770764
771765
772766
767
773768
769
774770
775771
776772
* Reworked again by Curtis Galloway (galloway@NeXT.com)
*/
#include "config.h"
#include "boot.h"
#include "bootstruct.h"
#include "fake_efi.h"
#include "modules.h"
#include "device_tree.h"
#ifndef DEBUG_BOOT2
#define DEBUG_BOOT2 0
#endif
#ifndef DEBUG_INTERRUPTS
#define DEBUG_INTERRUPTS 0
#endif
#if DEBUG_BOOT2
#define DBG(x...)printf(x)
#else
freeFilteredBVChain(bvChain);
if (gEnableCDROMRescan)
{
rescanBIOSDevice(gBIOSDev);
}
bvChain = newFilteredBVChain(0x80, 0xFF, allowBVFlags, denyBVFlags, &gDeviceCount);
setBootGlobals(bvChain);
trunk/i386/boot2/modules.c
22
33
44
5
6
57
68
79
......
1214
1315
1416
15
16
17
1817
19
2018
21
22
19
20
2321
24
25
22
23
2624
2725
2826
* Copyright 2010-2015 Evan Lojewski. All rights reserved.
*
*/
#include "config.h"
#include "boot.h"
#include "bootstruct.h"
#include "modules.h"
#include <string.h>
#ifdef CONFIG_MODULES
#ifndef CONFIG_MODULE_DEBUG
#define CONFIG_MODULE_DEBUG 0
#endif
#if CONFIG_MODULE_DEBUG
#define DBG(x...)printf(x)
#define DBGPAUSE()getchar()
#define DBG(x...)printf(x)
#define DBGPAUSE()getchar()
#else
#define DBG(x...)
#define DBGPAUSE()
#define DBG(x...)
#define DBGPAUSE()
#endif
static inline voidrebase_location(UInt32 *location, char *base, int type);
trunk/i386/boot2/gui.c
88
99
1010
11
1112
1213
1314
1415
1516
16
17
18
19
2017
2118
2219
*
*/
#include "config.h"
#include "gui.h"
#include "term.h"
#include "appleboot.h"
#include "vers.h"
#ifndef DEBUG_GUI
#define DEBUG_GUI 0
#endif
#if DEBUG_GUI
#define DBG(x...)printf(x)
#else
trunk/i386/boot2/appleboot.h
22
33
44
5
5
66
77
88
......
1010
1111
1212
13
13
1414
1515
1616
......
1818
1919
2020
21
21
2222
2323
2424
* Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
*
* Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
* Reserved. This file contains Original Code and/or Modifications of
* Original Code as defined in and that are subject to the Apple Public
* except in compliance with the License. Please obtain a copy of the
* License at http://www.apple.com/publicsource and read it before using
* this file.
*
*
* The Original Code and all software distributed under the License are
* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License.
*
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
trunk/i386/boot2/options.c
3333
3434
3535
36
36
3737
38
38
3939
4040
4141
#include "modules.h"
#if DEBUG
#define DBG(x...)printf(x)
#define DBG(x...)printf(x)
#else
#define DBG(x...)msglog(x)
#define DBG(x...)msglog(x)
#endif
chargMacOSVersion[OSVERSTRLEN];
trunk/i386/config/lxdialog/dialog.h
163163
164164
165165
166
166
167167
168168
169169
/* item list manipulation for lxdialog use */
#define MAXITEMSTR 200
struct dialog_item {
char str[MAXITEMSTR];/* promtp displayed */
char str[MAXITEMSTR];/* prompt displayed */
char tag;
void *data;/* pointer to menu item - used by menubox+checklist */
int selected;/* Set to 1 by dialog_*() function if selected. */
trunk/i386/config/lxdialog/check-lxdialog.sh
3838
3939
4040
41
41
4242
4343
4444
# Check if we can link to ncurses
check() {
$cc -xc - -o $tmp 2>/dev/null <<'EOF'
$cc -x c - -o $tmp 2>/dev/null <<'EOF'
#include CURSES_LOC
main() {}
EOF
branches/ErmaC/Enoch/i386/libsaio/smbios_getters.c
55
66
77
8
89
910
1011
11
12
13
14
1512
1613
1714
*
*/
#include "config.h"
#include "smbios_getters.h"
#include "bootstruct.h"
#ifndef DEBUG_SMBIOS
#define DEBUG_SMBIOS 0
#endif
#if DEBUG_SMBIOS
#define DBG(x...)printf(x)
#else
branches/ErmaC/Enoch/i386/boot2/config.h
4646
4747
4848
49
4950
5051
5152
////////////////////////////////// smbios.c
////////////////////////////////// smbios_decode.c
////////////////////////////////// smbios_getters.c
#define DEBUG_SMBIOS 0
////////////////////////////////// spd.c

Archive Download the corresponding diff file

Revision: 2858