rombios: use explicit SS prefix for calculated on-stack array accesses.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 8 Jul 2010 08:52:01 +0000 (09:52 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 8 Jul 2010 08:52:01 +0000 (09:52 +0100)
The bcc compiler gets constant array offsets right but does all
calculated array offsets via DS.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
tools/firmware/rombios/rombios.c

index 4e0157c80f254c9618ca05581011280847624095..f3363e9f948fec2f89f696dfc7c60513e46669d9 100644 (file)
@@ -3735,10 +3735,10 @@ cdrom_boot()
   // Validity checks
   if(buffer[0]!=0)return 4;
   for(i=0;i<5;i++){
-    if(buffer[1+i]!=read_byte(0xf000,&isotag[i]))return 5;
+    if(read_byte(get_SS(),&buffer[1+i])!=read_byte(0xf000,&isotag[i]))return 5;
    }
   for(i=0;i<23;i++)
-    if(buffer[7+i]!=read_byte(0xf000,&eltorito[i]))return 6;
+    if(read_byte(get_SS(),&buffer[7+i])!=read_byte(0xf000,&eltorito[i]))return 6;
 
   // ok, now we calculate the Boot catalog address
   lba=buffer[0x4A]*0x1000000+buffer[0x49]*0x10000+buffer[0x48]*0x100+buffer[0x47];