merge mainline into crypto

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-23 20:34:26 +01:00
commit a2e77ce455
50 changed files with 931 additions and 788 deletions

View file

@ -33,7 +33,7 @@ grub_get_root_biosnumber_default (void)
return grub_strtoul (biosnum, 0, 0);
dev = grub_device_open (0);
if (dev && dev->disk && dev->disk->dev
if (dev && dev->disk && dev->disk->dev
&& dev->disk->dev->id == GRUB_DISK_DEVICE_BIOSDISK_ID)
ret = (int) dev->disk->id;

View file

@ -85,14 +85,14 @@ write_call_relocator_fw (void *ptr, void *src, grub_uint32_t dest,
grub_relocator32_forward_dest = dest;
grub_relocator32_forward_src = PTR_TO_UINT64 (src);
grub_relocator32_forward_size = size;
grub_relocator32_forward_eax = state.eax;
grub_relocator32_forward_ebx = state.ebx;
grub_relocator32_forward_ecx = state.ecx;
grub_relocator32_forward_edx = state.edx;
grub_relocator32_forward_eip = state.eip;
grub_relocator32_forward_esp = state.esp;
grub_memmove (ptr,
&grub_relocator32_forward_start,
RELOCATOR_SIZEOF (forward));

View file

@ -32,8 +32,8 @@
#else
#define RAX %eax
#define RCX %ecx
#define RDI %edi
#define RSI %esi
#define RDI %edi
#define RSI %esi
#endif
/* The code segment of the protected mode. */
@ -41,7 +41,7 @@
/* The data segment of the protected mode. */
#define DATA_SEGMENT 0x18
.p2align 4 /* force 16-byte alignment */
RELOCATOR_VARIABLE(start)
@ -92,7 +92,7 @@ RELOCATOR_VARIABLE(size)
#endif
mov RDI, RAX
#ifdef BACKWARD
add RCX, RSI
add RCX, RDI
@ -104,7 +104,7 @@ RELOCATOR_VARIABLE(size)
add $0x3, RCX
shr $2, RCX
#ifdef BACKWARD
/* Backward movsl is implicitly off-by-four. compensate that. */
sub $4, RSI
@ -213,7 +213,7 @@ RELOCATOR_VARIABLE (eip)
LOCAL(gdt):
/* NULL. */
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
/* Reserved. */
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@ -234,7 +234,7 @@ LOCAL(gdt_addr):
/* Filled by the code. */
.long 0
#endif
.p2align 4
LOCAL(jump_vector):
/* Jump location. Is filled by the code */

View file

@ -79,7 +79,7 @@ PREFIX (boot) (void *relocator, grub_uint32_t dest,
/* Very unlikely condition: Relocator may risk overwrite itself.
Just move it a bit up. */
if ((grub_addr_t) dest < (grub_addr_t) relocator
+ (RELOCATOR_SIZEOF (backward) + RELOCATOR_ALIGN)
+ (RELOCATOR_SIZEOF (backward) + RELOCATOR_ALIGN)
&& (grub_addr_t) dest + (RELOCATOR_SIZEOF (forward) + RELOCATOR_ALIGN)
> (grub_addr_t) relocator)
{
@ -105,7 +105,7 @@ PREFIX (boot) (void *relocator, grub_uint32_t dest,
"Backward relocator: code %p, source: %p, "
"destination: 0x%x, size: 0x%lx\n",
(char *) relocator - overhead,
(char *) relocator - overhead,
(char *) relocator - overhead,
(unsigned) dest - overhead,
(unsigned long) size + overhead);