x86/bzimage: change the types from char * to void *

This allows to also change the types of image_base and image_start in the Dom0
builder from char * to void *.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2017-02-24 15:47:36 +01:00
1 parent 5427134eae
commit 7cb7fd9436
3 files changed
+9 -8

No files matched your search

+5 -4
View File
@@ -9,9 +9,9 @@
#include <xen/libelf.h>
#include <asm/bzimage.h>
static __init unsigned long output_length(char *image, unsigned long image_len)
static __init unsigned long output_length(void *image, unsigned long image_len)
{
return *(uint32_t *)&image[image_len - 4];
return *(uint32_t *)(image + image_len - 4);
}
struct __packed setup_header {
@@ -71,7 +71,7 @@ static __init int bzimage_check(struct setup_header *hdr, unsigned long len)
static unsigned long __initdata orig_image_len;
unsigned long __init bzimage_headroom(char *image_start,
unsigned long __init bzimage_headroom(void *image_start,
unsigned long image_length)
{
struct setup_header *hdr = (struct setup_header *)image_start;
@@ -104,7 +104,8 @@ unsigned long __init bzimage_headroom(char *image_start,
return headroom;
}
int __init bzimage_parse(char *image_base, char **image_start, unsigned long *image_len)
int __init bzimage_parse(void *image_base, void **image_start,
unsigned long *image_len)
{
struct setup_header *hdr = (struct setup_header *)(*image_start);
int err = bzimage_check(hdr, *image_len);
+2 -2
View File
@@ -1034,9 +1034,9 @@ static int __init construct_dom0_pv(
start_info_t *si;
struct vcpu *v = d->vcpu[0];
unsigned long long value;
char *image_base = bootstrap_map(image);
void *image_base = bootstrap_map(image);
unsigned long image_len = image->mod_end;
char *image_start = image_base + image_headroom;
void *image_start = image_base + image_headroom;
unsigned long initrd_len = initrd ? initrd->mod_end : 0;
l4_pgentry_t *l4tab = NULL, *l4start = NULL;
l3_pgentry_t *l3tab = NULL, *l3start = NULL;
+2 -2
View File
@@ -3,9 +3,9 @@
#include <xen/init.h>
unsigned long bzimage_headroom(char *image_start, unsigned long image_length);
unsigned long bzimage_headroom(void *image_start, unsigned long image_length);
int bzimage_parse(char *image_base, char **image_start,
int bzimage_parse(void *image_base, void **image_start,
unsigned long *image_len);
#endif /* __X86_BZIMAGE_H__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.