Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/i386/boot2/kernel_patcher.h

Source at commit 406 created 13 years 10 months ago.
By azimutz, Consolidating this position: while testing the new theme and boot-log function, i realized that when it comes to verbose boot, using the -v flag on Boot.plist (or typed at boot prompt) and using the Menu (Boot Verbose), doesn't produce the exact same output; using the Menu displays all the messages, while typing -v causes some of the first messages to disappear. So, moving this to an early stage isn't anymore a question of what is printed to screen or not! Tests also showed another diff: when using -v flag typed, the Boot Banner is cleared and messages start to print right away, while using Boot Verbose on the Menu, keeps the Banner, prints the first 2 or 3 messages right below it and the rest are only printed, when this code runs and does it's thing. Moving the code to this position fixes this glitch.
1/*
2 * Copyright (c) 2009 Evan Lojewski. All rights reserved.
3 *
4 */
5
6#include <mach-o/loader.h>
7#include <mach-o/nlist.h>
8
9#ifndef __BOOT2_KERNEL_PATCHER_H
10#define __BOOT2_KERNEL_PATCHER_H
11
12
13#define CPUID_MODEL_YONAH14
14#define CPUID_MODEL_MEROM15
15#define CPUID_MODEL_PENRYN23
16#define CPUID_MODEL_NEHALEM26
17#define CPUID_MODEL_ATOM28
18#define CPUID_MODEL_FIELDS30/* Lynnfield, Clarksfield, Jasper */
19#define CPUID_MODEL_DALES31/* Havendale, Auburndale */
20#define CPUID_MODEL_NEHALEM_EX46
21
22
23void patch_kernel(void* kernelData);
24
25#define KERNEL_641
26#define KERNEL_322
27
28int locate_symbols(void* kernelData);
29
30void patch_kernel_32(void* kernelData);
31void patch_kernel_64(void* kernelData);
32
33
34
35void patch_cpuid_set_info(void* kernelData, UInt32 impersonateFamily, UInt8 inpersonateModel);
36void patch_pmCPUExitHaltToOff(void* kernelData);
37void patch_lapic_init(void* kernelData);
38void patch_commpage_stuff_routine(void* kernelData);
39#endif /* !__BOOT2_KERNEL_PATCHER_H */
40

Archive Download this file

Revision: 406