Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283537
b: refs/heads/master
c: 2d2da60
h: refs/heads/master
i:
  283535: 350a571
v: v3
  • Loading branch information
Maarten Lankhorst authored and H. Peter Anvin committed Dec 16, 2011
1 parent 47bd1ed commit fc65a2c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 291f36325f9f252bd76ef5f603995f37e453fc60
refs/heads/master: 2d2da60fb40a80cc59383121ccf763e0e0e8a42a
20 changes: 14 additions & 6 deletions trunk/arch/x86/boot/compressed/eboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,22 @@ static efi_status_t handle_ramdisks(efi_loaded_image_t *image,
u64 size;

size = initrds[j].size;
status = efi_call_phys3(fh->read, initrds[j].handle,
&size, addr);
if (status != EFI_SUCCESS)
goto free_initrd_total;
while (size) {
u64 chunksize;
if (size > EFI_READ_CHUNK_SIZE)
chunksize = EFI_READ_CHUNK_SIZE;
else
chunksize = size;
status = efi_call_phys3(fh->read,
initrds[j].handle,
&chunksize, addr);
if (status != EFI_SUCCESS)
goto free_initrd_total;
addr += chunksize;
size -= chunksize;
}

efi_call_phys1(fh->close, initrds[j].handle);

addr += size;
}

}
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/boot/compressed/eboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define DESC_TYPE_CODE_DATA (1 << 0)

#define EFI_PAGE_SIZE (1UL << EFI_PAGE_SHIFT)
#define EFI_READ_CHUNK_SIZE (1024 * 1024)

#define PIXEL_RGB_RESERVED_8BIT_PER_COLOR 0
#define PIXEL_BGR_RESERVED_8BIT_PER_COLOR 1
Expand Down

0 comments on commit fc65a2c

Please sign in to comment.