Chameleon

Chameleon Commit Details

Date:2015-03-23 13:14:11 (9 years 1 month ago)
Author:ErmaC
Commit:2643
Parents: 2642
Message:Revert changes for multiboot args.
Changes:
M/trunk/i386/boot2/mboot.c
M/trunk/i386/libsaio/sys.c

File differences

trunk/i386/libsaio/sys.c
7272
7373
7474
75
75
76
77
78
79
7680
7781
7882
......
9991003
10001004
10011005
1006
1007
1008
1009
1010
1011
1012
10021013
10031014
10041015
static unsigned char kFSUUIDNamespaceSHA1[] = {0xB3,0xE2,0x0F,0x39,0xF2,0x92,0x11,0xD6,0x97,0xA4,0x00,0x30,0x65,0x43,0xEC,0xAC};
#endif
#if DEBUG
#ifndef DEBUG_SYS
#define DEBUG_SYS 0
#endif
#if DEBUG_SYS
#define DBG(x...)printf(x)
#else
#define DBG(x...)msglog(x)
}
}
#if 0
DBG("multiboot_partition_set = %d\n", multiboot_partition_set);
DBG("multiboot_partition = %d\n", multiboot_partition);
DBG("multiboot_skip_partition_set = %d\n", multiboot_skip_partition_set);
DBG("multiboot_skip_partition = %d\n", multiboot_skip_partition);
#endif
/*
* Checking "Default Partition" key in system configuration - use format: hd(x,y), the volume UUID or label -
* to override the default selection.
trunk/i386/boot2/mboot.c
1515
1616
1717
18
19
2018
2119
2220
......
6361
6462
6563
66
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
6787
6888
6989
......
325345
326346
327347
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352348
353349
354350
int multiboot_skip_partition=0;
int multiboot_skip_partition_set=0;
void boot(int biosdev);
// Global multiboot info, if using multiboot.
struct multiboot_info *gMI;
// would be on the stack which would possibly be using way too much stack.
void multiboot_to_boot(int multiboot_magic, struct multiboot_info *mi_orig)
{
hi_multiboot(multiboot_magic, mi_orig);
uint32_t bootdevice = hi_multiboot(multiboot_magic, mi_orig);
if(bootdevice != BAD_BOOT_DEVICE)
{
// boot only returns to do a chain load.
for(;;)
{ // NOTE: boot only uses the last byte (the drive number)
common_boot(bootdevice);
if(chainbootflag)
chainLoad();
else
waitThenReload();
}
}
// Avoid returning to high-memory address which isn't valid in the segment
// we are now in.
// Calling sleep() ensures the user ought to be able to use Ctrl+Alt+Del
// because the BIOS will have interrupts on.
for(;;)
sleep(10);
// NOTE: *IF* we needed to return we'd have to fix up our return address to
// be in low memory using the same trick as below.
// However, there doesn't seem to be any point in returning to assembly
// particularly when the remaining code merely halts the processor.
}
void chainLoad()
// That is unless it's inlined in which case it does not matter.
uint32_t bootdevice = multiboot(multiboot_magic, mi_p);
if(bootdevice != BAD_BOOT_DEVICE)
{
// boot only returns to do a chain load.
for(;;)
{ // NOTE: boot only uses the last byte (the drive number)
boot(bootdevice);
if(chainbootflag)
chainLoad();
else
waitThenReload();
}
}
// Avoid returning to high-memory address which isn't valid in the segment
// we are now in.
// Calling sleep() ensures the user ought to be able to use Ctrl+Alt+Del
// because the BIOS will have interrupts on.
for(;;)
sleep(10);
// NOTE: *IF* we needed to return we'd have to fix up our return address to
// be in low memory using the same trick as below.
// However, there doesn't seem to be any point in returning to assembly
// particularly when the remaining code merely halts the processor.
// We're about to exit and temporaryBootArgs will no longer be valid
bootArgs = NULL;
return bootdevice;

Archive Download the corresponding diff file

Revision: 2643