mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-06 03:20:41 +09:00
x86: lib: Fix types and casts for 64-bit compilation
Fix various compiler warnings in the x86 library code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
beb4d65e92
commit
113e75592a
@ -157,7 +157,7 @@ static void setup_realmode_idt(void)
|
|||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
idts[i].cs = 0;
|
idts[i].cs = 0;
|
||||||
idts[i].offset = 0x1000 + (i * __idt_handler_size);
|
idts[i].offset = 0x1000 + (i * __idt_handler_size);
|
||||||
write_idt_stub((void *)((u32)idts[i].offset), i);
|
write_idt_stub((void *)((ulong)idts[i].offset), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -227,7 +227,7 @@ static void vbe_set_graphics(int vesa_mode, struct vbe_mode_info *mode_info)
|
|||||||
mode_info->video_mode = (1 << 14) | vesa_mode;
|
mode_info->video_mode = (1 << 14) | vesa_mode;
|
||||||
vbe_get_mode_info(mode_info);
|
vbe_get_mode_info(mode_info);
|
||||||
|
|
||||||
framebuffer = (unsigned char *)mode_info->vesa.phys_base_ptr;
|
framebuffer = (unsigned char *)(ulong)mode_info->vesa.phys_base_ptr;
|
||||||
debug("VBE: resolution: %dx%d@%d\n",
|
debug("VBE: resolution: %dx%d@%d\n",
|
||||||
le16_to_cpu(mode_info->vesa.x_resolution),
|
le16_to_cpu(mode_info->vesa.x_resolution),
|
||||||
le16_to_cpu(mode_info->vesa.y_resolution),
|
le16_to_cpu(mode_info->vesa.y_resolution),
|
||||||
|
@ -104,7 +104,7 @@ static int ich6_pinctrl_cfg_pin(s32 gpiobase, s32 iobase, int pin_node)
|
|||||||
|
|
||||||
/* if iobase is present, let's configure the pad */
|
/* if iobase is present, let's configure the pad */
|
||||||
if (iobase != -1) {
|
if (iobase != -1) {
|
||||||
int iobase_addr;
|
ulong iobase_addr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The offset for the same pin for the IOBASE and GPIOBASE are
|
* The offset for the same pin for the IOBASE and GPIOBASE are
|
||||||
|
@ -114,14 +114,14 @@ u32 copy_pirq_routing_table(u32 addr, struct irq_routing_table *rt)
|
|||||||
addr = ALIGN(addr, 16);
|
addr = ALIGN(addr, 16);
|
||||||
|
|
||||||
debug("Copying Interrupt Routing Table to 0x%x\n", addr);
|
debug("Copying Interrupt Routing Table to 0x%x\n", addr);
|
||||||
memcpy((void *)addr, rt, rt->size);
|
memcpy((void *)(uintptr_t)addr, rt, rt->size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We do the sanity check here against the copied table after memcpy,
|
* We do the sanity check here against the copied table after memcpy,
|
||||||
* as something might go wrong after the memcpy, which is normally
|
* as something might go wrong after the memcpy, which is normally
|
||||||
* due to the F segment decode is not turned on to systeam RAM.
|
* due to the F segment decode is not turned on to systeam RAM.
|
||||||
*/
|
*/
|
||||||
rom_rt = (struct irq_routing_table *)addr;
|
rom_rt = (struct irq_routing_table *)(uintptr_t)addr;
|
||||||
if (rom_rt->signature != PIRQ_SIGNATURE ||
|
if (rom_rt->signature != PIRQ_SIGNATURE ||
|
||||||
rom_rt->version != PIRQ_VERSION || rom_rt->size % 16) {
|
rom_rt->version != PIRQ_VERSION || rom_rt->size % 16) {
|
||||||
printf("Interrupt Routing Table not valid\n");
|
printf("Interrupt Routing Table not valid\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user