diff options
author | Helge Deller <deller@gmx.de> | 2024-01-15 10:00:57 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-01-15 10:00:57 +0100 |
commit | 2bce3fc3fa5b05d36e470571b971506586ab454e (patch) | |
tree | f64c83ecc569ba1ac10bc8c611552a5f1c2b76f9 | |
parent | 3c9d75d763f53d8c00ebc5f050696ed36bde11a0 (diff) | |
download | seabios-hppa-2bce3fc3fa5b05d36e470571b971506586ab454e.zip seabios-hppa-2bce3fc3fa5b05d36e470571b971506586ab454e.tar.gz seabios-hppa-2bce3fc3fa5b05d36e470571b971506586ab454e.tar.bz2 |
boot: Fix loading of 64-bit kernel from boot device
-rw-r--r-- | src/boot.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -507,7 +507,7 @@ boot_init(void) struct bootentry_s { int type; union { - u32 data; + void *data; struct segoff_s vector; struct drive_s *drive; }; @@ -526,7 +526,7 @@ static struct hlist_head BootList VARVERIFY32INIT; #define IPL_TYPE_HALT 0xf0 static void -bootentry_add(int type, int prio, u32 data, const char *desc) +bootentry_add(int type, int prio, void *data, const char *desc) { if (! CONFIG_BOOT) return; @@ -539,7 +539,7 @@ bootentry_add(int type, int prio, u32 data, const char *desc) be->priority = prio; be->data = data; be->description = desc ?: "?"; - dprintf(3, "Registering bootable: %s (type:%d prio:%d data:%x)\n" + dprintf(3, "Registering bootable: %s (type:%d prio:%d data:%p)\n" , be->description, type, prio, data); // Add entry in sorted order. @@ -573,7 +573,7 @@ void boot_add_bev(u16 seg, u16 bev, u16 desc, int prio) { bootentry_add(IPL_TYPE_BEV, defPrio(prio, DefaultBEVPrio) - , SEGOFF(seg, bev).segoff + , (void *)SEGOFF(seg, bev).segoff , desc ? MAKE_FLATPTR(seg, desc) : "Unknown"); DefaultBEVPrio = DEFAULT_PRIO; } @@ -583,7 +583,7 @@ void boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio) { bootentry_add(IPL_TYPE_BCV, defPrio(prio, DefaultHDPrio) - , SEGOFF(seg, ip).segoff + , (void *)SEGOFF(seg, ip).segoff , desc ? MAKE_FLATPTR(seg, desc) : "Legacy option rom"); } @@ -591,14 +591,14 @@ void boot_add_floppy(struct drive_s *drive, const char *desc, int prio) { bootentry_add(IPL_TYPE_FLOPPY, defPrio(prio, DefaultFloppyPrio) - , (u32)drive, desc); + , drive, desc); } void boot_add_hd(struct drive_s *drive, const char *desc, int prio) { bootentry_add(IPL_TYPE_HARDDISK, defPrio(prio, DefaultHDPrio) - , (u32)drive, desc); + , drive, desc); } void @@ -615,14 +615,14 @@ boot_add_cd(struct drive_s *drive, const char *desc, int prio) } } bootentry_add(IPL_TYPE_CDROM, defPrio(prio, DefaultCDPrio) - , (u32)drive, desc); + , drive, desc); } // Add a CBFS payload entry void boot_add_cbfs(void *data, const char *desc, int prio) { - bootentry_add(IPL_TYPE_CBFS, defPrio(prio, DEFAULT_PRIO), (u32)data, desc); + bootentry_add(IPL_TYPE_CBFS, defPrio(prio, DEFAULT_PRIO), data, desc); } @@ -869,7 +869,7 @@ static int BEVCount; static int HaveHDBoot, HaveFDBoot; static void -add_bev(int type, u32 vector) +add_bev(int type, void *vector) { if (type == IPL_TYPE_HARDDISK && HaveHDBoot++) return; @@ -879,7 +879,7 @@ add_bev(int type, u32 vector) return; struct bev_s *bev = &BEV[BEVCount++]; bev->type = type; - bev->vector = vector; + bev->vector = (uintptr_t) vector; } // Prepare for boot - show menu and run bcvs. |