Chameleon

Chameleon Commit Details

Date:2011-06-24 11:27:39 (8 years 4 months ago)
Author:Azimutz
Commit:1048
Parents: 1047
Message:Cleaning up the house; by "house" i mean my Chazi folder. As i mention on the previous repo commit, it's getting a mess merging stuff from the trunk to it so, i'll be dumping any useful stuff to the trunk (nothing beyond style, white space, typos, useful comments/reminders, etc...). and dumping useless stuff to the "trash". Tidy up boot0.s. Remove a dup from gui.c.
Changes:
M/trunk/i386/boot0/chain0.s
M/trunk/i386/boot0/boot0.s
M/trunk/i386/boot2/gui.c

File differences

trunk/i386/boot0/chain0.s
697697
698698
699699
700
700
times 510-($-$$) db 0
dw kBootSignature
;END
; END
trunk/i386/boot0/boot0.s
317317
318318
319319
320
321
320
321
322322
323
323
324324
325325
326
326
327327
328
329
328
329
330330
331331
332
332
333333
334334
335335
336336
337
337
338338
339
340
339
340
341341
342342
343
344
343
344
345345
346
346
347347
348348
349349
......
359359
360360
361361
362
362
363363
364364
365365
......
369369
370370
371371
372
372
373373
374374
375375
......
406406
407407
408408
409
409
410410
411411
412412
......
496496
497497
498498
499
500499
500
501501
502502
503503
.Pass1:
%if CONFIG_BOOT0_HFSFIRST
cmp BYTE [si + part.type], kPartTypeHFS; In pass 1 we're going to find a HFS+ partition
; equipped with boot1h in its boot record
; regardless if it's active or not.
; equipped with boot1h in its boot record
; regardless if it's active or not.
jne .continue
mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature.
movdh, 1 ; Argument for loadBootSector to check HFS+ partition signature.
%else
cmp BYTE [si + part.bootid], kPartActive; In pass 1 we are walking on the standard path
; by trying to hop on the active partition.
; by trying to hop on the active partition.
jne .continue
xor dh, dh ; Argument for loadBootSector to skip HFS+ partition
; signature check.
xor dh, dh ; Argument for loadBootSector to skip HFS+ partition
; signature check.
%endif
jmp .tryToBoot
jmp .tryToBoot
.Pass2:
%if CONFIG_BOOT0_HFSFIRST
cmp BYTE [si + part.bootid], kPartActive; In pass 2 we are walking on the standard path
; by trying to hop on the active partition.
; by trying to hop on the active partition.
jne .continue
xor dh, dh ; Argument for loadBootSector to skip HFS+ partition
; signature check.
xordh, dh ; Argument for loadBootSector to skip HFS+ partition
; signature check.
%else
cmp BYTE [si + part.type], kPartTypeHFS; In pass 2 we're going to find a HFS+ partition
; equipped with boot1h in its boot record
; regardless if it's active or not.
; equipped with boot1h in its boot record
; regardless if it's active or not.
jne .continue
mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature.
mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature.
%endif
DebugChar('*')
jmp SHORT initBootLoader
.continue:
add si, BYTE part_size; advance SI to next partition entry
add si, BYTE part_size ; advance SI to next partition entry
loop .loop ; loop through all partition entries
;
;
dec bl
jnz .switchPass2; didn't find Protective MBR before
call checkGPT
call checkGPT
.switchPass2:
;
;
checkGPT:
push bx
mov di, kLBA1Buffer; address of GUID Partition Table Header
cmp DWORD [di], kGPTSignatureLow; looking for 'EFI '
jne .exit; not found. Giving up.
.exit:
pop bx
ret; no more GUID partitions. Giving up.
;--------------------------------------------------------------------------
; loadBootSector - Load boot sector
;
trunk/i386/boot2/gui.c
3131
3232
3333
34
3534
36
3735
3836
3937
int lasttime = 0; // we need this for animating maybe
extern int gDeviceCount;
/*
* ATTENTION: the enum and the following array images[] MUST match !!!
*/

Archive Download the corresponding diff file

Revision: 1048