Chameleon

Chameleon Commit Details

Date:2010-08-18 14:25:25 (13 years 8 months ago)
Author:Azimutz
Commit:385
Parents: 384
Message:More sanity checks, some comments and typo hunting.
Changes:
M/branches/azimutz/Chazileon/i386/libsaio/vbe.h
M/branches/azimutz/Chazileon/i386/boot2/graphics.c
M/branches/azimutz/Chazileon/i386/boot2/boot.c
M/branches/azimutz/Chazileon/i386/boot2/gui.c
M/branches/azimutz/Chazileon/i386/boot2/graphics.h
M/branches/azimutz/Chazileon/TODO
M/branches/azimutz/Chazileon/i386/boot2/boot.h
M/branches/azimutz/Chazileon/i386/boot2/gui.h
M/branches/azimutz/Chazileon/i386/boot2/ramdisk.c
M/branches/azimutz/Chazileon/i386/boot2/options.c

File differences

branches/azimutz/Chazileon/TODO
22
33
44
5
5
66
77
88
......
1919
2020
2121
22
22
2323
2424
2525
26
26
2727
2828
2929
====================================
- Integrate Prasys current work on options and quick shortcut modified version of 18seven
- Add autodetection of efistring algorythm to enabke graphics enabler to beanbled by default while not conflicting whith other efi string overriden content
- Add auto detection of efistring algorithm to enable graphics enabler to be enabled by default while not conflicting with other efi string overriden content
(original idea of Galaxy)
- Add a more sophisticated acpi loading mechanism to enable loading custom acpi tables when dsdtdrop=y
Now for each acpi file found, we should compare the name with an existing acpi table found in the system that
we would normally load and replace this usual injection by the content of the file.
Once DropDSDT=y is set, no other acpi table than dsdt is loaded, then it is the responsability of user
Once DropDSDT=y is set, no other acpi table than dsdt is loaded, then it is the responsibility of user
to provide any other acpi table.
- Add a new module capable of writing proprietary Chameleon data to ioreg:
Using the DT__xxx() API, we will creat e a set of functions to write
Using the DT__xxx() API, we will create a set of functions to write
to log info, chameleon boot info to be retrieved by helper applications...
the only public function for log info purpose of this module would be:
logMessageToIOREG(...); // var args printf style format
branches/azimutz/Chazileon/i386/libsaio/vbe.h
127127
128128
129129
130
130
131131
132132
133133
......
143143
144144
145145
146
146
147147
148148
149149
* Per-mode info, returned in function 4f02.
*/
typedef struct {
unsigned short ModeAttributes;
unsigned short ModeAttributes; //Azi:debuginfo
unsigned char WinAAttributes;
unsigned char WinBAttributes;
unsigned short WinGranularity;
unsigned char NumberOfPlanes;
unsigned char BitsPerPixel;
unsigned char NumberOfBanks;
unsigned char MemoryModel;
unsigned char MemoryModel; //Azi:debuginfo
unsigned char BankSize;
unsigned char NumberOfImagePages;
unsigned char Reserved;
branches/azimutz/Chazileon/i386/boot2/graphics.c
370370
371371
372372
373
373
374374
375
375
376376
377377
378378
......
475475
476476
477477
478
478
479479
480480
481481
......
530530
531531
532532
533
533
534
534535
535
536
536
537
537538
539
538540
539541
540542
unsigned char bitsPerPixel,
unsigned short refreshRate )
{
bool debugInfo = false; //Azi:displayinfo
bool debugInfo = false; //Azi:debuginfo
extern bool showBootBanner; //||
VBEModeInfoBlock minfo;
VBEModeInfoBlock minfo; //||also need this on gui.c
unsigned short mode;
unsigned short vesaVersion;
int err = errFuncNotSupported;
bootArgs->Video.v_rowBytes = minfo.BytesPerScanline;
bootArgs->Video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr);
getBoolForKey(kDebugInfoKey, &debugInfo, &bootInfo->bootConfig); //Azi:displayinfo - gui.c, drawDeviceList.
getBoolForKey(kDebugInfoKey, &debugInfo, &bootInfo->bootConfig); //Azi:debuginfo - gui.c, drawDeviceList.
#if AUTORES_DEBUG
gui.screen.mm = minfo.MemoryModel;
return 0;
}
int loadPngImage(const char *filename, uint16_t *width, uint16_t *height, uint8_t **imageData) //Azi:style
int loadPngImage(const char *filename, uint16_t *width, uint16_t *height,
uint8_t **imageData)
{
int pngSize, pngFile = 0, error = 0;
uint8_t *pngData = NULL;
uint8_t *pngData = NULL;
int pngFile = 0, pngSize;
PNG_info_t *info;
int error = 0;
pngFile = open_bvdev("bt(0,0)", filename, 0);
if (pngFile == -1) {
branches/azimutz/Chazileon/i386/boot2/boot.c
6868
6969
7070
71
71
7272
7373
7474
......
415415
416416
417417
418
418
419419
420420
421
421
422422
423423
424424
bool gOverrideKernel;
static char gBootKernelCacheFile[512];
static char gCacheNameAdler[64 + 256];
//char *gPlatformName = gCacheNameAdler; Azi: not in use
//char *gPlatformName = gCacheNameAdler; disabled
char gRootDevice[512];
char gMKextName[512];
//char gMacOSVersion[8]; //Azi:sysversion - TODO: check why doesn't work here.
if ( bootArgs->Video.v_display == GRAPHICS_MODE )
{
drawBackground(); // order matters!!
gui.devicelist.draw = false; // Needed when verbose "flips" the screen.
gui.devicelist.draw = false; // Needed when the verbose "flips" the screen.
gui.bootprompt.draw = false; // ?
gui.menu.draw = false; // ?
gui.infobox.draw = false; // We can't boot with this drawn; most probably it's not needed!?
gui.infobox.draw = false; // Enter doesn't work with this drawn; most probably it's not needed!?
gui.logo.draw = false;
updateVRAM();
}
branches/azimutz/Chazileon/i386/boot2/graphics.h
1414
1515
1616
17
1817
1918
2019
#include "vbe.h" //Azi:autoresolution
#ifndef __BOOT_GRAPHICS_H
#define __BOOT_GRAPHICS_H
branches/azimutz/Chazileon/i386/boot2/boot.h
199199
200200
201201
202
202
203203
204204
205205
extern char bootBanner[];
extern char bootPrompt[];
extern bool gOverrideKernel;
//extern char *gPlatformName; //Azi: not in use
//extern char *gPlatformName; disabled
extern char gMKextName[];
extern char gRootDevice[];
extern bool gEnableCDROMRescan;
branches/azimutz/Chazileon/i386/boot2/gui.c
846846
847847
848848
849
849
850850
851851
852852
......
908908
909909
910910
911
911
912912
913913
914914
915
915916
916917
917918
void drawDeviceList (int start, int end, int selection)
{
inti;
booldebugInfo = false; //Azi:displayinfo
booldebugInfo = false; //Azi:debuginfo
extern boolshowBootBanner;
position_tp, p_prev, p_next;
//Azi: making this info more accessible. TODO: remove the stuff on graphics.c!
getBoolForKey(kDebugInfoKey, &debugInfo, &bootInfo->bootConfig);
#ifdef AUTORES_DEBUG //Azi:autoresolution
#ifdef AUTORES_DEBUG //Azi:autoresolution - debuginfo
debugInfo = true;
#endif
//Azi:debuginfo: need to #include vbe.h and also "VBEModeInfoBlock minfo;"
if (debugInfo && showBootBanner)
{
gui.debug.cursor = pos( 10, 100);
branches/azimutz/Chazileon/i386/boot2/gui.h
106106
107107
108108
109
109
110110
111111
112112
113113
114
114
115115
116116
117117
......
138138
139139
140140
141
141
142142
143143
144144
uint16_thsyncend;
uint16_tvsyncstart;
uint16_tvsyncend;
uint8_tmm; // Azi:autoresolution - displayinfo
uint8_tmm; // Azi:autoresolution - debuginfo
uint16_tattr;
} window_t;
/*
* gui structure
* gui structure - Azi:--- take gui.screen.widht as example: gui+gui_t+window_t ??
*/
typedef struct
{
} gui_t;
gui_t gui;// gui structure
gui_t gui;// gui structure - Azi:---
font_t font_small;
font_t font_console;
branches/azimutz/Chazileon/i386/boot2/ramdisk.c
1717
1818
1919
20
2120
2221
2322
......
7574
7675
7776
78
79
77
8078
8179
8280
bool gRAMDiskBTAliased = false;
char gRAMDiskFile[512];
// Notify OS X that a ramdisk has been setup. XNU will attach this to /dev/md0
void md0Ramdisk()
{
Node* node = DT__FindNode("/chosen/memory-map", false);
if(node != NULL)
{
DT__AddProperty(node, "RAMDisk", sizeof(RAMDiskParam), (void*)&ramdiskPtr);
DT__AddProperty(node, "RAMDisk", sizeof(RAMDiskParam), (void*)&ramdiskPtr);
}
else
{
branches/azimutz/Chazileon/i386/boot2/options.c
3434
3535
3636
37
37
3838
3939
40
41
4240
4341
4442
......
4644
4745
4846
47
4948
5049
5150
......
115114
116115
117116
118
119
117
120118
121119
122120
#include "autoresolution.h" //Azi:autoresolution - "was" included on boot.h, which is everywere!! -> gui.h -> graphics.h
bool showBootBanner = true;
bool showBootBanner = true; //Azi:debuginfo
static bool shouldboot = false;
char gMacOSVersion[8]; //Azi:sysversion
extern int multiboot_timeout;
extern int multiboot_timeout_set;
//extern intmenucount;
extern intgDeviceCount;
chargMacOSVersion[8]; //Azi:sysversion
intselectIndex = 0;
MenuItem * menuItems = NULL;
} else {
position_t p = pos( gui.screen.width / 2 + 1 , ( gui.devicelist.pos.y + 3 ) +
( ( gui.devicelist.height - gui.devicelist.iconspacing ) / 2 ) );
position_t p = pos( gui.screen.width / 2 + 1 , ( gui.devicelist.pos.y + 3 ) + ( ( gui.devicelist.height - gui.devicelist.iconspacing ) / 2 ) );
char dummy[80];
getBootVolumeDescription( gBootVolume, dummy, 80, true );

Archive Download the corresponding diff file

Revision: 385