Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 360513 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +19 lines)
Line  Link Here
0
-- a/stage2/bios.c
0
++ b/stage2/bios.c
Lines 60-66 Link Here
60
	unsigned short blocks;
60
	unsigned short blocks;
61
	unsigned long buffer;
61
	unsigned long buffer;
62
	unsigned long long block;
62
	unsigned long long block;
63
      } __attribute__ ((packed)) dap;
63
64
	/* This structure is passed in the stack. A buggy BIOS could write
65
	 * garbage data to the tail of the struct and hang the machine. So
66
	 * we need this protection. - Tinybit
67
	 */
68
	unsigned char dummy[16];
69
      } __attribute__ ((packed)) *dap;
70
71
      /* Even the above protection is not enough to avoid stupid actions by
72
       * buggy BIOSes. So we do it in the 0040:0000 segment. - Tinybit
73
       */
74
      dap = (struct disk_address_packet *)0x580;
64
75
65
      /* XXX: Don't check the geometry by default, because some buggy
76
      /* XXX: Don't check the geometry by default, because some buggy
66
	 BIOSes don't return the number of total sectors correctly,
77
	 BIOSes don't return the number of total sectors correctly,
Lines 72-86 Link Here
72
83
73
      /* FIXME: sizeof (DAP) must be 0x10. Should assert that the compiler
84
      /* FIXME: sizeof (DAP) must be 0x10. Should assert that the compiler
74
	 can't add any padding.  */
85
	 can't add any padding.  */
75
      dap.length = sizeof (dap);
86
      dap->length = 0x10;
76
      dap.block = sector;
87
      dap->block = sector;
77
      dap.blocks = nsec;
88
      dap->blocks = nsec;
78
      dap.reserved = 0;
89
      dap->reserved = 0;
79
      /* This is undocumented part. The address is formated in
90
      /* This is undocumented part. The address is formated in
80
	 SEGMENT:ADDRESS.  */
91
	 SEGMENT:ADDRESS.  */
81
      dap.buffer = segment << 16;
92
      dap->buffer = segment << 16;
82
      
93
      
83
      err = biosdisk_int13_extensions ((read + 0x42) << 8, drive, &dap);
94
      err = biosdisk_int13_extensions ((read + 0x42) << 8, drive, dap);
84
95
85
/* #undef NO_INT13_FALLBACK */
96
/* #undef NO_INT13_FALLBACK */
86
#ifndef NO_INT13_FALLBACK
97
#ifndef NO_INT13_FALLBACK

Return to bug 360513