Chameleon

Chameleon Commit Details

Date:2011-06-23 23:53:37 (7 years 11 months ago)
Author:Azimutz
Commit:1037
Parents: 1036
Message:Small edits; some got lost between the rever/restore getc --> getchar, others from comparison with Chazi.
Changes:
M/trunk/i386/boot2/resume.c
M/trunk/i386/libsaio/cpu.c
M/trunk/i386/boot2/boot.h
M/trunk/i386/boot2/gui.h
M/trunk/i386/libsaio/cpu.h
M/trunk/i386/libsaio/saio_internal.h
M/trunk/i386/modules/HelloWorld/HelloWorld.cpp
M/trunk/i386/libsaio/biosfn.c

File differences

trunk/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;
trunk/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 *);
trunk/i386/libsaio/biosfn.c
675675
676676
677677
678
678
679679
680680
681681
print_drive_info(di);
printf("uses_ebios = 0x%x\n", dp->uses_ebios);
printf("result %d\n", ret);
printf("press a key->\n"); getchar();
pause();
#endif
if (ret == 0) {
trunk/i386/libsaio/saio_internal.h
4949
5050
5151
52
5352
5453
5554
......
8988
9089
9190
91
9292
9393
9494
95
9695
9796
9897
9998
99
100
100101
101102
102103
extern int ebiosEjectMedia(int biosdev);
extern void bios_putchar(int ch);
extern void putca(int ch, int attr, int repeat);
extern void pause();
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);
trunk/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");
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");
getchar ();
getchar();
return;
}
trunk/i386/boot2/boot.h
9898
9999
100100
101
102
101
102
103103
104104
105105
#define kUseNvidiaROM"UseNvidiaROM"/* nvidia.c */
#define kVBIOS"VBIOS"/* nvidia.c */
#define kdcfg0 "display_0"/* nvidia.c */
#define kdcfg1 "display_1"/* nvidia.c */
#define kdcfg0"display_0"/* nvidia.c */
#define kdcfg1"display_1"/* nvidia.c */
#define kEthernetBuiltIn"EthernetBuiltIn"/* pci_setup.c */
#define kGraphicsEnabler"GraphicsEnabler"/* pci_setup.c */
trunk/i386/boot2/gui.h
88
99
1010
11
12
13
1114
1215
1316
1417
1518
1619
17
18
19
2020
2121
22
22
2323
2424
2525
26
26
2727
2828
29
30
29
30
3131
32
33
34
32
33
34
3535
3636
3737
38
38
3939
4040
4141
4242
43
44
45
46
43
44
45
46
4747
4848
49
50
49
50
5151
5252
5353
*
*/
#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
#define BOOT_NORMAL0
#define BOOT_VERBOSE1
#define BOOT_IGNORECACHE2
#define BOOT_SINGLEUSER3
#define DO_NOT_BOOT4
#define DO_NOT_BOOT4
#define CLOSE_INFO_MENU5
#define INFOMENU_NATIVEBOOT_START 1
#define INFOMENU_NATIVEBOOT_END3
#define INFOMENU_NATIVEBOOT_START1
#define INFOMENU_NATIVEBOOT_END3
#define MENU_SHOW_MEMORY_INFO4
#define MENU_SHOW_VIDEO_INFO5
#define MENU_SHOW_HELP6
#define MENU_SHOW_MEMORY_INFO4
#define MENU_SHOW_VIDEO_INFO5
#define MENU_SHOW_HELP6
enum {
HorizontalLayout= 0,
VerticalLayout= 1,
VerticalLayout= 1
};
enum {
kBackspaceKey= 0x08,
kTabKey= 0x09,
kReturnKey= '\r',
kEscapeKey= 0x1b,
kUpArrowkey= 0x4800,
kTabKey= 0x09,
kReturnKey= '\r',
kEscapeKey= 0x1b,
kUpArrowkey= 0x4800,
kDownArrowkey= 0x5000,
kASCIIKeyMask= 0x7f,
kF5Key= 0x3f00,
kF10Key= 0x4400
kF5Key= 0x3f00,
kF10Key= 0x4400
};
/*
trunk/i386/modules/HelloWorld/HelloWorld.cpp
3636
3737
3838
39
40
41
4239
4340
4441
......
4643
4744
4845
49
5046
5147
5248
printf("Hello world from ExecKernel hook. Binary located at 0x%X\n", binary);
getchar();
//
}
void HelloWorld_start()
//printf("Hooking 'ExecKernel'\n");
register_hook_callback("ExecKernel", &helloWorld);
register_hook_callback("Kernel Start", &helloWorld);
}
void HW::printHello()

Archive Download the corresponding diff file

Revision: 1037