Chameleon

Chameleon Commit Details

Date:2011-05-11 23:26:17 (12 years 10 months ago)
Author:Evan Lojewski
Commit:798
Parents: 797
Message:Fixed a possible issue with multibooting on boot files that are larger than 383.5kb
Changes:
M/trunk/i386/boot2/mboot.c
M/trunk/i386/libsa/memory.h
M/trunk/CHANGES

File differences

trunk/CHANGES
1
12
23
34
- Added the BOOT2_MAX_LENGTH constant in memory.h. This is now used in moot.c to relocate the correct number of bytes for boot2.
- Added module system.
- Added automatic P-States & C-States generation for native power management.
- Added Booter Log Dump Tool
trunk/i386/boot2/mboot.c
297297
298298
299299
300
300
301301
302
302
303303
304304
305305
// Get us in to low memory so we can run everything
// We cannot possibly be more than 383.5k and copying extra won't really hurt anything
// We cannot possibly be more than 447k and copying extra won't really hurt anything
// We use the address of the assembly entrypoint to get our starting location.
memcpy(&boot2_sym, (char*)&boot2_sym + OFFSET_1MEG, 0x5fe00 /* 383.5k */);
memcpy(&boot2_sym, (char*)&boot2_sym + OFFSET_1MEG, BOOT2_MAX_LENGTH /* 447k */);
// This is a little assembler routine that returns to us in the correct selector
// instead of the kernel selector we're running in now and at the correct
trunk/i386/libsa/memory.h
5757
5858
5959
60
61
6062
6163
6264
#define BOOT2_SEG 0x2000
#define BOOT2_OFS 0x0200 // 512 byte disk sector offset
#define BOOT2_MAX_LENGTH 0x6FE00 // Maximum size for boot2 is currentl 447kb
#define BIOS_ADDR 0x8000 // BIOS disk I/O buffer
#define BIOS_LEN 0x8000 // 32K - divisible by 512 and 2048

Archive Download the corresponding diff file

Revision: 798