Chameleon

Chameleon Commit Details

Date:2012-07-08 22:28:10 (11 years 9 months ago)
Author:armel cadet-petit
Commit:2006
Parents: 2005
Message:Fixed a bug in boot arguments
Changes:
M/branches/cparm/i386/libsaio/bootstruct.h
M/branches/cparm/i386/modules/HibernateEnabler/graphic_utils.c
M/branches/cparm/i386/modules/GUI/gui.c
M/branches/cparm/i386/boot2/mboot.c
M/branches/cparm/i386/libsaio/bootXnu.h
M/branches/cparm/i386/boot2/boot.c
M/branches/cparm/i386/modules/GUI/graphic_utils.c
M/branches/cparm/i386/libsaio/bootstruct.c
M/branches/cparm/i386/libsa/printf.c
M/branches/cparm/CHANGES
M/branches/cparm/i386/libsaio/saio_internal.h

File differences

branches/cparm/CHANGES
1
2
3
14
25
36
- security fixes in printf.c
- Fixed a weird bug in boot arguments that could prevent 10.8 to boot
- security, stability, bugs fixes
- moved __doprnt to the xnu version
branches/cparm/i386/libsaio/bootstruct.c
3030
3131
3232
33
3433
35
3634
3735
3836
3937
40
41
42
43
38
39
4440
4541
4642
......
5854
5955
6056
61
57
6258
6359
6460
6561
6662
67
63
6864
6965
7066
......
147143
148144
149145
150
146
151147
152148
153149
154150
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211151
212152
213153
214
215
216
217
218
219
220
221
222
223
224
154
155
156
225157
226
158
159
160
227161
228162
229163
230164
231
232
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
233189
234190
235191
#include "bootstruct.h"
#include "platform.h"
boot_args_common *bootArgs = NULL;
/*==========================================================================
* structure of parameters passed to
* the kernel by the booter.
*/
boot_args_Legacy *bootArgsLegacy = NULL;
boot_args_107 *bootArgs107 = NULL;
boot_args_108 *bootArgs108 = NULL;
/* ... */
boot_args_legacy *bootArgsLegacy= NULL;
boot_args *bootArgs= NULL;
PrivateBootInfo_t *bootInfo = NULL;
unsigned long memoryMapCount = 0;
bootArgs = (boot_args_common *)malloc(sizeof(boot_args_common));
bootArgs = (boot_args *)malloc(sizeof(boot_args));
bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t));
if (bootArgs == NULL || bootInfo == NULL)
stop("Couldn't allocate boot info\n");
else
{
bzero(bootArgs, sizeof(boot_args_common));
bzero(bootArgs, sizeof(boot_args));
bzero(bootInfo, sizeof(PrivateBootInfo_t));
// Get system memory map. Also update the size of the
bootArgs->Video.v_baseAddr = Video->v_baseAddr;
return;
}
boot_args_common * getBootArgs(void)
boot_args * getBootArgs(void)
{
return bootArgs;
}
#define AllocateKernelMemoryForBootArgs(Ver) \
{ \
bootArgs##Ver = (boot_args_##Ver *)AllocateKernelMemory(sizeof(boot_args_##Ver));\
}
#define CopyCommonBootArgsHeader(Ver) \
{ \
bootArgs##Ver->Revision = bootArgs->Header.Revision ;\
bootArgs##Ver->Version = bootArgs->Header.Version ;\
}
// For 10.6, 10.5 and 10.4 please use :Legacy:, for 10.7 use :107:, for 10.8 use :108:
#define CopyCommonBootArgs(Ver) \
{ \
bcopy(bootArgs->CommandLine, bootArgs##Ver->CommandLine, BOOT_LINE_LENGTH);\
bootArgs##Ver->MemoryMap = bootArgs->MemoryMap ;\
bootArgs##Ver->MemoryMapSize = bootArgs->MemoryMapSize ;\
bootArgs##Ver->MemoryMapDescriptorSize = bootArgs->MemoryMapDescriptorSize ;\
bootArgs##Ver->MemoryMapDescriptorVersion = bootArgs->MemoryMapDescriptorVersion ;\
bootArgs##Ver->Video = bootArgs->Video ;\
bootArgs##Ver->deviceTreeP = bootArgs->deviceTreeP ;\
bootArgs##Ver->deviceTreeLength = bootArgs->deviceTreeLength ;\
bootArgs##Ver->kaddr = bootArgs->kaddr ;\
bootArgs##Ver->ksize = bootArgs->ksize ;\
bootArgs##Ver->efiRuntimeServicesPageStart = bootArgs->efiRuntimeServicesPageStart ;\
bootArgs##Ver->efiRuntimeServicesPageCount = bootArgs->efiRuntimeServicesPageCount ;\
bootArgs##Ver->efiSystemTable = bootArgs->efiSystemTable ;\
bootArgs##Ver->efiMode = bootArgs->efiMode ;\
bootArgs##Ver->performanceDataStart = bootArgs->performanceDataStart ;\
bootArgs##Ver->performanceDataSize = bootArgs->performanceDataSize ;\
bootArgs##Ver->efiRuntimeServicesVirtualPageStart = bootArgs->efiRuntimeServicesVirtualPageStart ;\
}
/*
* Darwin 10.7+ specific boot arguments
*
* for 10.7 use :107:, for 10.8 use :108:
*/
#define Copy107plusBootArgs(Ver) \
{ \
bootArgs##Ver->keyStoreDataStart = bootArgs->keyStoreDataStart ;\
bootArgs##Ver->keyStoreDataSize = bootArgs->keyStoreDataSize ;\
bootArgs##Ver->bootMemStart = bootArgs->bootMemStart ;\
bootArgs##Ver->bootMemSize = bootArgs->bootMemSize ;\
bootArgs##Ver->PhysicalMemorySize = bootArgs->PhysicalMemorySize ;\
bootArgs##Ver->FSBFrequency = bootArgs->FSBFrequency ;\
bootArgs##Ver->debugMode = bootArgs->debugMode ;\
}
#define init_boot_args(Ver) \
{ \
AllocateKernelMemoryForBootArgs(Ver);\
CopyCommonBootArgsHeader(Ver);\
CopyCommonBootArgs(Ver);\
}
/* Copy boot args after kernel and record address. */
void
reserveKern107BootStruct(void)
{
init_boot_args(107);
Copy107plusBootArgs(107);
}
void
reserveKern108BootStruct(void)
{
init_boot_args(108);
Copy107plusBootArgs(108);
reserveKernBootStruct(void)
{
void *oldAddr = bootArgs;
/* Darwin 10.8 specific boot arguments */
bootArgs = (boot_args *)AllocateKernelMemory(sizeof(boot_args));
bcopy(oldAddr, bootArgs, sizeof(boot_args));
}
void
reserveKernLegacyBootStruct(void)
{
init_boot_args(Legacy);
{
bootArgsLegacy = (boot_args_legacy *)AllocateKernelMemory(sizeof(boot_args_legacy));
bootArgsLegacy->Revision = bootArgs->Revision ;
bootArgsLegacy->Version = bootArgs->Version ;
bcopy(bootArgs->CommandLine, bootArgsLegacy->CommandLine, BOOT_LINE_LENGTH);
bootArgsLegacy->MemoryMap = bootArgs->MemoryMap ;
bootArgsLegacy->MemoryMapSize = bootArgs->MemoryMapSize ;
bootArgsLegacy->MemoryMapDescriptorSize = bootArgs->MemoryMapDescriptorSize ;
bootArgsLegacy->MemoryMapDescriptorVersion = bootArgs->MemoryMapDescriptorVersion ;
bootArgsLegacy->Video = bootArgs->Video ;
bootArgsLegacy->deviceTreeP = bootArgs->deviceTreeP ;
bootArgsLegacy->deviceTreeLength = bootArgs->deviceTreeLength ;
bootArgsLegacy->kaddr = bootArgs->kaddr ;
bootArgsLegacy->ksize = bootArgs->ksize ;
bootArgsLegacy->efiRuntimeServicesPageStart = bootArgs->efiRuntimeServicesPageStart ;
bootArgsLegacy->efiRuntimeServicesPageCount = bootArgs->efiRuntimeServicesPageCount ;
bootArgsLegacy->efiSystemTable = bootArgs->efiSystemTable ;
bootArgsLegacy->efiMode = bootArgs->efiMode ;
bootArgsLegacy->performanceDataStart = bootArgs->performanceDataStart ;
bootArgsLegacy->performanceDataSize = bootArgs->performanceDataSize ;
bootArgsLegacy->efiRuntimeServicesVirtualPageStart = bootArgs->efiRuntimeServicesVirtualPageStart ;
}
void
branches/cparm/i386/libsaio/bootstruct.h
3232
3333
3434
35
35
36
3637
37
38
39
40
41
42
43
4438
4539
4640
/*!
Kernel boot args global also used by booter for its own data.
*/
extern boot_args_common *bootArgs;
extern boot_args_legacy *bootArgsLegacy;
extern boot_args *bootArgs;
/*!
Boot args passed to the kernel.
*/
extern boot_args_Legacy *bootArgsLegacy;
extern boot_args_107 *bootArgs107;
extern boot_args_108 *bootArgs108;
#define VGA_TEXT_MODE 0
#if 0
branches/cparm/i386/libsaio/bootXnu.h
9191
9292
9393
94
95
96
97
98
99
100
101
102
103
104
10594
10695
10796
......
121110
122111
123112
124
113
125114
126115
127116
......
152141
153142
154143
155
144
156145
157
158
159
160
146
147
148
149
150
151
152
153
161154
162155
163
164
165
166
156
157
158
159
167160
168161
169162
170163
171
172
173
174
164
165
166
167
175168
176
169
177170
178171
179
172
180173
181174
182175
183
176
184177
185
186
178
179
187180
188181
189
182
190183
191184
192
193
185
186
194187
195188
196189
197190
198191
199192
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256193
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
194
297195
298
196
299197
300
301
302
303198
199
typedef struct Boot_VideoBoot_Video;
/* Struct describing an image passed in by the booter */
struct boot_icon_element {
unsigned int width;
unsigned int height;
int y_offset_from_center;
unsigned int data_size;
unsigned int __reserved1[4];
unsigned char data[0];
};
typedef struct boot_icon_element boot_icon_element;
/* Values for v_display */
#define GRAPHICS_MODE 1
#define kBootArgsEfiMode32 32
#define kBootArgsEfiMode64 64
typedef struct boot_args_Legacy {
typedef struct boot_args_legacy {
uint16_t Revision;/* Revision of boot_args structure */
uint16_t Version;/* Version of boot_args structure */
uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */
uint32_t __reserved3[2];
} boot_args_Legacy;
} boot_args_legacy;
typedef struct boot_args_107 {
uint16_t Revision;/* Revision of boot_args structure */
uint16_t Version;/* Version of boot_args structure */
/* Bitfields for boot_args->flags */
#define kBootArgsFlagRebootOnPanic (1 << 0)
#define kBootArgsFlagHiDPI (1 << 1)
typedef struct boot_args {
uint16_t Revision; /* Revision of boot_args structure */
uint16_t Version; /* Version of boot_args structure */
uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */
uint8_t debugMode; /* Bit field with behavior changes */
uint8_t __reserved1[2];
char CommandLine[BOOT_LINE_LENGTH];/* Passed in command line */
uint16_t flags;
char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */
uint32_t MemoryMap; /* Physical address of memory map */
uint32_t MemoryMapSize;
uint32_t MemoryMapDescriptorSize;
uint32_t MemoryMapDescriptorVersion;
Boot_VideoVideo;/* Video Information */
uint32_t deviceTreeP; /* Physical address of flattened device tree */
Boot_Video Video; /* Video Information */
uint32_t deviceTreeP; /* Physical address of flattened device tree */
uint32_t deviceTreeLength; /* Length of flattened tree */
uint32_t kaddr; /* Physical address of beginning of kernel text */
uint32_t ksize; /* Size of combined kernel text+data+efi */
uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */
uint32_t efiRuntimeServicesPageCount;
uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */
uint32_t efiSystemTable; /* physical address of system table in runtime area */
uint32_t __reserved2;
uint32_t kslide;
uint32_t performanceDataStart; /* physical address of log */
uint32_t performanceDataSize;
uint32_t keyStoreDataStart; /* physical address of key store data */
uint32_t keyStoreDataSize;
uint64_tbootMemStart;
uint64_tbootMemSize;
uint64_t bootMemStart;
uint64_t bootMemSize;
uint64_t PhysicalMemorySize;
uint64_t FSBFrequency;
uint64_t pciConfigSpaceBaseAddress;
uint32_t pciConfigSpaceStartBusNumber;
uint32_t pciConfigSpaceEndBusNumber;
uint32_t __reserved4[730];
} boot_args_107;
typedef struct boot_args_108 {
uint16_t Revision;/* Revision of boot_args structure */
uint16_t Version;/* Version of boot_args structure */
uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */
uint8_t debugMode; /* Bit field with behavior changes */
uint8_t __reserved1[2];
char CommandLine[BOOT_LINE_LENGTH];/* Passed in command line */
uint32_t MemoryMap; /* Physical address of memory map */
uint32_t MemoryMapSize;
uint32_t MemoryMapDescriptorSize;
uint32_t MemoryMapDescriptorVersion;
Boot_VideoVideo;/* Video Information */
uint32_t deviceTreeP; /* Physical address of flattened device tree */
uint32_t deviceTreeLength; /* Length of flattened tree */
uint32_t kaddr; /* Physical address of beginning of kernel text */
uint32_t ksize; /* Size of combined kernel text+data+efi */
uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */
uint32_t efiRuntimeServicesPageCount;
uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */
uint32_t efiSystemTable; /* physical address of system table in runtime area */
uint32_t __reserved2;
uint32_t performanceDataStart; /* physical address of log */
uint32_t performanceDataSize;
uint32_t keyStoreDataStart; /* physical address of key store data */
uint32_t keyStoreDataSize;
uint64_tbootMemStart;
uint64_tbootMemSize;
uint64_t PhysicalMemorySize;
uint64_t FSBFrequency;
uint64_t pciConfigSpaceBaseAddress;
uint32_t pciConfigSpaceStartBusNumber;
uint32_t pciConfigSpaceEndBusNumber;
uint32_t __reserved4[730];
} boot_args_108; // for now apparently the same package for 10.8 and 10.7
typedef struct boot_args_header {
uint16_t Revision;/* Revision of boot_args structure */
uint16_t Version;/* Version of boot_args structure */
} boot_args_header;
typedef struct boot_args_10x {
boot_args_header Header;
Boot_VideoVideo;/* Video Information */
uint32_t MemoryMap; /* Physical address of memory map */
uint32_t MemoryMapSize;
uint32_t MemoryMapDescriptorSize;
uint32_t MemoryMapDescriptorVersion;
uint8_t debugMode; /* Bit field with behavior changes */
uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */
uint32_t deviceTreeP; /* Physical address of flattened device tree */
uint32_t deviceTreeLength; /* Length of flattened tree */
char CommandLine[BOOT_LINE_LENGTH];/* Passed in command line */
uint32_t keyStoreDataStart; /* physical address of key store data */
uint32_t keyStoreDataSize;
uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */
uint32_t efiRuntimeServicesPageCount;
uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */
uint32_t efiSystemTable; /* physical address of system table in runtime area */
uint64_t FSBFrequency;
uint32_t performanceDataSize;
uint32_t performanceDataStart; /* physical address of log */
uint32_t kaddr; /* Physical address of beginning of kernel text */
uint32_t ksize; /* Size of combined kernel text+data+efi */
uint64_tbootMemStart;
uint64_tbootMemSize;
uint64_t PhysicalMemorySize;
uint64_t pciConfigSpaceBaseAddress;
uint32_t pciConfigSpaceStartBusNumber;
uint32_t pciConfigSpaceEndBusNumber;
} boot_args_10x;
} boot_args;
typedef struct boot_args_10x boot_args_common;
extern char assert_boot_args_size_is_4096[sizeof(boot_args) == 4096 ? 1 : -1];
extern char assert_boot_args_107_size_is_4096[sizeof(boot_args_107) == 4096 ? 1 : -1];
extern char assert_boot_args_108_size_is_4096[sizeof(boot_args_108) == 4096 ? 1 : -1];
#endif /* _PEXPERT_I386_BOOT_H */
branches/cparm/i386/libsaio/saio_internal.h
9292
9393
9494
95
96
95
9796
9897
9998
100
99
101100
102101
103102
extern void copyKernBootStruct(void);
extern void finalizeBootStruct(void);
extern void reserveKernLegacyBootStruct(void);
extern void reserveKern107BootStruct(void);
extern void reserveKern108BootStruct(void);
extern void reserveKernBootStruct(void);
extern void setBootArgsVideoMode(int mode);
extern void setBootArgsVideoStruct(Boot_Video*Video);
extern uint32_t getVideoMode(void);
extern boot_args_common * getBootArgs(void);
extern boot_args * getBootArgs(void);
/* cache.c */
branches/cparm/i386/boot2/boot.c
9090
9191
9292
93
9493
9594
9695
......
151150
152151
153152
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173153
174154
175155
......
182162
183163
184164
185
186
165
166
187167
188168
189169
190170
191171
192
193
172
173
194174
195175
196176
197
198
177
178
199179
200180
201181
......
208188
209189
210190
211
191
192
193
194
195
212196
213197
214198
......
306290
307291
308292
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
293
294
324295
325296
326297
......
331302
332303
333304
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
305
306
307
308
355309
356310
311
312
313
314
315
316
357317
358318
359319
static bool find_file_with_ext(const char* dir, const char *ext, const char * name_compare, size_t ext_size);
static bool found_extra_kext(void);
static void determineCpuArch(void);
static void init_pic(void);
void getKernelCachePath(void);
#ifdef NBP_SUPPORT
static bool gUnloadPXEOnExit = false;
malloc_init(0, 0, 0, malloc_error);
}
static void init_pic(void)
{
/* Remap IRQ's */
/*
outb(0x20, 0x11);
outb(0xA0, 0x11);
outb(0x21, 0x20);
outb(0xA1, 0x28);
outb(0x21, 0x04);
outb(0xA1, 0x02);
outb(0x21, 0x01);
outb(0xA1, 0x01);
*/
//outb(0x70, inb(0x70)|0x80); /* Disable NMI */
outb(0x21, 0xff); /* Maskout all interrupts Pic1 */
outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */
}
//==========================================================================
// execKernel - Load the kernel image (mach-o) and jump to its entry point.
if(((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3] <= '6')
{
bootArgs->Header.Version = kBootArgsVersion1;
bootArgs->Header.Revision = ((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3];
bootArgs->Version = kBootArgsVersion1;
bootArgs->Revision = ((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3];
}
else
{
#if kBootArgsVersion > 1
bootArgs->Header.Version = kBootArgsVersion;
bootArgs->Header.Revision = kBootArgsRevision;
bootArgs->Version = kBootArgsVersion;
bootArgs->Revision = kBootArgsRevision;
#else
if(((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3] >= '7')
{
bootArgs->Header.Version = 2;
bootArgs->Header.Revision = 0;
bootArgs->Version = 2;
bootArgs->Revision = 0;
}
#endif
}
(int *)&bootArgs->ksize );
if ( ret != 0 )
return ret;
return ret;
// Reserve space for boot args for 10.7 only (for 10.6 and earlier, we will convert (to legacy) the structure and reserve kernel memory for it later.)
if(((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3] >= '7')
reserveKernBootStruct();
// Load boot drivers from the specifed root path.
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL, NULL, NULL);// Notify modules that the kernel is about to be started
switch (((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3]) {
case '4':
case '5':
case '6':
reserveKernLegacyBootStruct();
break;
case '7':
reserveKern107BootStruct();
break;
case '8':
reserveKern108BootStruct();
break;
default:
break;
}
if (((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3] <= '6')
reserveKernLegacyBootStruct();
#if UNUSED
turnOffFloppy();
IMPS_LAPIC_WRITE(LAPIC_LVT1, LAPIC_ICR_DM_NMI);
#endif
switch (((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3]) {
case '4':
case '5':
case '6':
// Jump to kernel's entry point. There's no going back now. XXX LEGACY OS XXX
startprog( kernelEntry, bootArgsLegacy );
break;
case '7':
init_pic();
// Jump to kernel's entry point. There's no going back now. XXX LION XXX
startprog( kernelEntry, bootArgs107 );
break;
case '8':
init_pic();
// Jump to kernel's entry point. There's no going back now. XXX MOUNTAIN LION XXX
startprog( kernelEntry, bootArgs108 );
break;
default:
printf("Error: Unsupported Darwin version\n");
getc();
break;
if (((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3] <= '6') {
// Jump to kernel's entry point. There's no going back now. XXX LEGACY OS XXX
startprog( kernelEntry, bootArgsLegacy );
}
outb(0x21, 0xff); /* Maskout all interrupts Pic1 */
outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */
// Jump to kernel's entry point. There's no going back now. XXX LION XXX
startprog( kernelEntry, bootArgs );
// Should not be reached
return 0;
branches/cparm/i386/boot2/mboot.c
340340
341341
342342
343
344
343
344
345345
346346
347347
This is the same assumption that initKernBootStruct makes.
We could check the multiboot info I guess, but why bother?
*/
boot_args_common temporaryBootArgsData;
bzero(&temporaryBootArgsData, sizeof(boot_args_common));
boot_args temporaryBootArgsData;
bzero(&temporaryBootArgsData, sizeof(boot_args));
bootArgs = &temporaryBootArgsData;
bootArgs->Video.v_display = VGA_TEXT_MODE;
branches/cparm/i386/modules/GUI/gui.c
122122
123123
124124
125
125
126126
127127
128128
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#endif
#define VIDEO(x) (((boot_args_common*)getBootArgs())->Video.v_ ## x)
#define VIDEO(x) (((boot_args*)getBootArgs())->Video.v_ ## x)
#define vram VIDEO(baseAddr)
branches/cparm/i386/modules/GUI/graphic_utils.c
1111
1212
1313
14
14
1515
1616
1717
#include "gui.h"
#include "platform.h"
#define VIDEO(x) (((boot_args_common*)getBootArgs())->Video.v_ ## x)
#define VIDEO(x) (((boot_args*)getBootArgs())->Video.v_ ## x)
#define MIN(x, y) ((x) < (y) ? (x) : (y))
static unsigned long lookUpCLUTIndex( unsigned char index,
branches/cparm/i386/modules/HibernateEnabler/graphic_utils.c
1717
1818
1919
20
20
2121
2222
2323
((size_t) ( (char *)&((st *)(0))->m - (char *)0 ))
#endif
#define VIDEO(x) (((boot_args_common*)getBootArgs())->Video.v_ ## x)
#define VIDEO(x) (((boot_args*)getBootArgs())->Video.v_ ## x)
#define MIN(x, y) ((x) < (y) ? (x) : (y))
branches/cparm/i386/libsa/printf.c
549549
550550
551551
552
552
553553
554554
555555
}
}
while (++p != &buf[MAXBUF]) {
(*putc)(*p, arg);
if (putc) (*putc)(*p, arg);
nprinted++;
}

Archive Download the corresponding diff file

Revision: 2006