Chameleon

Chameleon Commit Details

Date:2014-10-21 16:59:53 (5 years 11 months ago)
Author:ErmaC
Commit:2423
Parents: 2422
Message:Update align directives to 2^(old_align)
Changes:
M/trunk/i386/boot2/drivers.c
M/trunk/i386/boot2/boot.c
M/trunk/i386/include/mach/i386/asm.h
M/trunk/i386/boot2/boot2.s
M/trunk/i386/include/architecture/i386/asm_help.h
M/trunk/i386/boot2/boot.h
M/trunk/CHANGES
M/trunk/i386/libsaio/bios.s

File differences

trunk/i386/libsaio/bios.s
8080
8181
8282
83
83
8484
85
86
8587
86
87
8888
89
89
9090
91
91
9292
93
94
9395
94
95
9696
97
97
9898
9999
100100
bits of code and data within the first 63.5k and modify the loaders to
be able to load more than 63.5k.
*/
.align 2
.align 4
save_eax: .space 4
.align 4
save_edx: .space 4
.align 2
save_edx: .space 4
.align 1
save_es: .space 2
.align 1
.align 2
save_flag: .space 2
.align 2
.align 4
new_eax: .space 4
.align 4
new_edx: .space 4
.align 2
new_edx: .space 4
.align 1
new_es: .space 2
.align 1
.align 2
new_ds: .space 2
.section __INIT,__text // turbo - This code must reside within the first segment
trunk/i386/include/architecture/i386/asm_help.h
4545
4646
4747
48
48
4949
5050
5151
#ifdef__ASSEMBLER__
#define ALIGN\
.align2, 0x90
.align4, 0x90
#defineROUND_TO_STACK(len)\
(((len) + STACK_INCR - 1) / STACK_INCR * STACK_INCR)
trunk/i386/include/mach/i386/asm.h
107107
108108
109109
110
110
111111
112112
113113
/* There is another definition of ALIGN for .c sources */
#ifdef ASSEMBLER
#define ALIGN 4,0x90
#define ALIGN 16,0x90
#endif /* ASSEMBLER */
#ifndef FALIGN
trunk/i386/boot2/drivers.c
530530
531531
532532
533
534
535
536
537
538
533539
534540
535541
......
904910
905911
906912
907
913
914
908915
909916
910917
break;
}
if (!module) // cparm
{
ret = -1;
break;
} // Should never happen but it will make the compiler happy
// Allocate memory for the driver path and the plist.
module->executablePath = tmpExecutablePath;
}
// MinusZwei
if (uncompressed_size != size) {
if (uncompressed_size != size)
{
error("ERROR: size mismatch from lzss (found: %x, expected: %x).\n", size, uncompressed_size);
return -1;
}
trunk/i386/boot2/boot.c
718718
719719
720720
721
721
722
722723
723724
724725
printf("Can't find %s\n", bootFile);
sleep(1);
if (gBootFileType == kNetworkDeviceType) {
if (gBootFileType == kNetworkDeviceType)
{
// Return control back to PXE. Don't unload PXE base code.
gUnloadPXEOnExit = false;
break;
trunk/i386/boot2/boot2.s
153153
154154
155155
156
156
157157
158158
159159
......
176176
177177
178178
179
179
180180
181181
182182
......
276276
277277
278278
279
279
280280
281281
282282
......
325325
326326
327327
328
328
329329
330330
331331
......
338338
339339
340340
341
341
342342
343343
344344
# cannot do that and have GRUB find it because GRUB only searches the first
# 8k of the binary. Since __TEXT,__const follows __TEXT,__text (the code
# section) and since the code is well over 8k long, it doesn't work.
.align 2, 0x90 # Make sure we're on a 4-byte boundary. Required by Multiboot.
.align 4, 0x90 # Make sure we're on a 4-byte boundary. Required by Multiboot.
_multiboot_header:
# magic (NOTE: this shows up as 02b0 ad1b in a hex dump)
.long MULTIBOOT_HEADER_MAGIC
nop
nop
nop
.align 3, 0x90 # Align to 8 byte boundary which should be enough nops
.align 8, 0x90 # Align to 8 byte boundary which should be enough nops
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_multiboot_entry:
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# _continue_at_low_address does some trickery to get the caller running from the low address with the right selector
.globl _continue_at_low_address
.align 2, 0x90
.align 4, 0x90
_continue_at_low_address:
# Our stack frame has been set up with the return address on top
# First, fix that to be 1 MB lower
# We aren't using it right now so it's in an if 0 block.
#if 0
.globl _cause_crash
.align 2, 0x90
.align 4, 0x90
_cause_crash:
# Cause a crash, there is no GDT selector f0
jmp $0xf0,$0
# See the comments above as to why we have OFFSET_1MEG.
//.data
.section __INIT,__data// turbo
.align 2, 0x90
.align 4, 0x90
_Gdtr_high:
.word GDTLIMIT
.long vtop(_Gdt + OFFSET_1MEG)
trunk/i386/boot2/boot.h
8888
8989
9090
91
91
9292
9393
9494
#define kHidePartition"Hide Partition"/* disk.c */
#define kRenamePartition"Rename Partition"/* disk.c */
#define kSMBIOSKey"SMBIOS"/* fake_efi.c */
#define kSystemID"SystemId"/* fake_efi.c */
//#define kSystemID"SystemId"/* fake_efi.c */
#define kSystemType"SystemType"/* fake_efi.c */
#define kUseNvidiaROM"UseNvidiaROM"/* nvidia.c */
#define kVBIOS"VBIOS"/* nvidia.c && ati.c */
trunk/CHANGES
1
12
23
34
- meklort : Update align directives to 2^(old_align)
- Ermac : Bump svn to 2.3
- ErmaC : Update efi Header
- cparm : buffer BPS

Archive Download the corresponding diff file

Revision: 2423