aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware/rombios
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-07-06 16:51:54 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-07-06 16:51:54 +0100
commit9e3ba38157b3c423d17b6ca1a67916f7ccd336ce (patch)
tree54f9cbef9b74dff5bf08ecab885c3df000215479 /tools/firmware/rombios
parent5bcc7775a7b488d59cc885c5dee9694e89eb53eb (diff)
downloadxen-9e3ba38157b3c423d17b6ca1a67916f7ccd336ce.tar.gz
xen-9e3ba38157b3c423d17b6ca1a67916f7ccd336ce.tar.bz2
xen-9e3ba38157b3c423d17b6ca1a67916f7ccd336ce.zip
rombios: fix implicit assumption that DS == SS
by passing boot device info by value, not by reference. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'tools/firmware/rombios')
-rw-r--r--tools/firmware/rombios/rombios.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c
index 1c05d99e75..a73572399d 100644
--- a/tools/firmware/rombios/rombios.c
+++ b/tools/firmware/rombios/rombios.c
@@ -2195,21 +2195,19 @@ interactive_bootkey()
//--------------------------------------------------------------------------
void
-print_boot_device(e)
- ipl_entry_t *e;
+print_boot_device(type, desc)
+ Bit16u type; Bit32u desc;
{
- Bit16u type;
char description[33];
Bit16u ss = get_SS();
- type = e->type;
/* NIC appears as type 0x80 */
if (type == IPL_TYPE_BEV) type = 0x4;
if (type == 0 || type > 0x4) BX_PANIC("Bad drive type\n");
printf("Booting from %s", drivetypes[type]);
/* print product string if BEV */
- if (type == 4 && e->description != 0) {
+ if (type == 4 && desc != 0) {
/* first 32 bytes are significant */
- memcpyb(ss, &description, (Bit16u)(e->description >> 16), (Bit16u)(e->description & 0xffff), 32);
+ memcpyb(ss, &description, (Bit16u)(desc >> 16), (Bit16u)(desc & 0xffff), 32);
/* terminate string */
description[32] = 0;
printf(" [%S]", ss, description);
@@ -8284,7 +8282,7 @@ ASM_END
/* Do the loading, and set up vector as a far pointer to the boot
* address, and bootdrv as the boot drive */
- print_boot_device(&e);
+ print_boot_device(e.type, e.description);
switch(e.type) {
case IPL_TYPE_FLOPPY: /* FDD */