Eliminate use of pointers in coreboot table

Because pointers can be 32bit or 64bit big,
using them in the coreboot table requires the
OS and the firmware to operate in the same mode
which is not always the case. Hence, use 64bit
for all pointers stored in the coreboot table.
Guess we'll have to fix this up once we port to
the first 128bit machines.

Change-Id: I46fc1dad530e5230986f7aa5740595428ede4f93
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/3115
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Stefan Reinauer 2013-04-18 18:01:34 -07:00 committed by Ronald G. Minnich
parent 8d5bc9f772
commit 642b1db733
5 changed files with 9 additions and 9 deletions

View File

@ -188,7 +188,7 @@ struct cb_gpios {
struct cb_vdat { struct cb_vdat {
uint32_t tag; uint32_t tag;
uint32_t size; /* size of the entire entry */ uint32_t size; /* size of the entire entry */
void *vdat_addr; uint64_t vdat_addr;
uint32_t vdat_size; uint32_t vdat_size;
}; };
@ -198,7 +198,7 @@ struct cb_vdat {
struct cb_cbmem_tab { struct cb_cbmem_tab {
uint32_t tag; uint32_t tag;
uint32_t size; uint32_t size;
void *cbmem_tab; uint64_t cbmem_tab;
}; };
#define CB_TAG_VBNV 0x0019 #define CB_TAG_VBNV 0x0019
@ -213,7 +213,7 @@ struct cb_vbnv {
struct cb_vboot_handoff { struct cb_vboot_handoff {
uint32_t tag; uint32_t tag;
uint32_t size; uint32_t size;
void *vboot_handoff_addr; uint64_t vboot_handoff_addr;
uint32_t vboot_handoff_size; uint32_t vboot_handoff_size;
}; };

View File

@ -218,7 +218,7 @@ struct lb_vdat {
uint32_t tag; uint32_t tag;
uint32_t size; uint32_t size;
void *vdat_addr; uint64_t vdat_addr;
uint32_t vdat_size; uint32_t vdat_size;
}; };
@ -246,7 +246,7 @@ struct lb_vboot_handoff {
uint32_t tag; uint32_t tag;
uint32_t size; uint32_t size;
void *vboot_handoff_addr; uint64_t vboot_handoff_addr;
uint32_t vboot_handoff_size; uint32_t vboot_handoff_size;
}; };

View File

@ -232,7 +232,7 @@ static void lb_vboot_handoff(struct lb_header *header)
vbho = (struct lb_vboot_handoff *)lb_new_record(header); vbho = (struct lb_vboot_handoff *)lb_new_record(header);
vbho->tag = LB_TAB_VBOOT_HANDOFF; vbho->tag = LB_TAB_VBOOT_HANDOFF;
vbho->size = sizeof(*vbho); vbho->size = sizeof(*vbho);
vbho->vboot_handoff_addr = addr; vbho->vboot_handoff_addr = (intptr_t)addr;
vbho->vboot_handoff_size = size; vbho->vboot_handoff_size = size;
} }
#else #else

View File

@ -79,8 +79,8 @@ void chromeos_set_me_hash(u32 *hash, int len)
memcpy(me_hash_saved, hash, len*sizeof(u32)); memcpy(me_hash_saved, hash, len*sizeof(u32));
} }
void acpi_get_vdat_info(void **vdat_addr, uint32_t *vdat_size) void acpi_get_vdat_info(uint64_t *vdat_addr, uint32_t *vdat_size)
{ {
*vdat_addr = vboot_data; *vdat_addr = (intptr_t)vboot_data;
*vdat_size = sizeof(*vboot_data); *vdat_size = sizeof(*vboot_data);
} }

View File

@ -64,6 +64,6 @@ typedef struct {
extern chromeos_acpi_t *vboot_data; extern chromeos_acpi_t *vboot_data;
void chromeos_init_vboot(chromeos_acpi_t *chromeos); void chromeos_init_vboot(chromeos_acpi_t *chromeos);
void chromeos_set_me_hash(u32*, int); void chromeos_set_me_hash(u32*, int);
void acpi_get_vdat_info(void **vdat_addr, uint32_t *vdat_size); void acpi_get_vdat_info(uint64_t *vdat_addr, uint32_t *vdat_size);
#endif #endif