source: trunk/BOOTCODE/VERSION.INC@ 50

Last change on this file since 50 was 50, checked in by Ben Rietbroek, 12 years ago

Removed 'Force BIOS-LBA Usage' entry from AiR-BOOT SETUP [2012-05-15]

This commit eliminates the severe bug that previous commits warned
about in their commit-message. The cause of the bug is not handling
CHS values when modifying LVM-information. Thus, when LBA-access was
disabled, the CHS-access method was used with improper values. This
resulted in a CHS address of (0,0,1), which is the MBR, and then
erroneously writing the modified LVM-record to it.

While a freshly installed AiR-BOOT of v1.07 or higher defaults to having
LBA enabled, this is not the case for v1.06. Since AiR-BOOT merges the
previous configuration, any upgrade from v1.06 with LBA set to disabled
would propagate the setting to the new version. Modifying
LVM-information from the AiR-BOOT SETUP, like changing the label or
fiddling with drive-letter assignments, would then trigger the bug and
write the LVM-record to the MBR. Users fiddling with the SETUP could
also disable LBA-access and trigger the bug.

This commit removes the 'Force BIOS-LBA Usage' option from the
AiR-BOOT SETUP, preventing users to disable LBA. Also, when AiR-BOOT
starts, it now always enables LBA-addressing, so CHS-addressing is not
used anymore. Furthermore, the Installer is modified to always enable
LBA-addressing in the AiR-BOOT configuration it writes to disk.
This ensures that older versions, which do not implicitly enable LBA on
starting, will find LBA as enabled.

On today's systems there is no need to use CHS-addressing anymore.
In fact, it does more harm than good because the CHS values do not
represent true physical geometry anymore. Instead, the drive and
the BIOS do translations that can cause unpredictable results when
moving the drive between systems. This is particularly true for USB
mass storage devices.

Therefore, CHS-addressing will be removed from AiR-BOOT.
This will free-up badly needed code space and create some room in the
internal partition tables that can be put to other use.

Info

o Bug Description

Trashing the Master Boot Record.

o Cause

Not handling CHS values while modifying LVM-information.

o Effect

Writing the modified LVM-record to the MBR when modifying LVM
information from the AiR-BOOT SETUP.
(like the partition-label or drive-letter assignments)

o Measures

  • Remove 'Force BIOS-LBA Usage' from AiR-BOOT SETUP
  • Always enable LBA when AiR-BOOT starts
  • Always set LBA enabled when writing on-disk AiR-BOOT configuration

o Affected AiR-BOOT versions

*All* v1.0.8 pre-releases up and including commit [2012-05-13].

File size: 1.6 KB
Line 
1;
2; AiR-BOOT Version Information.
3;
4
5;
6; First we define the numeric (BCD) AiR-BOOT version information.
7; This is used to derive ASCII and other representations.
8;
9
10; AiR-BOOT version conform WarpIN format with implicit 0 as fourth number.
11; Note that the config-version is managed manually.
12AB_MAJOR_VERSION EQU 1
13AB_MIDDLE_VERSION EQU 0
14AB_MINOR_VERSION EQU 8
15
16; The Year, Month and Day in BCD so we can easily extract nibbles.
17AB_YEAR EQU 2012h
18AB_MONTH EQU 05h
19AB_DAY EQU 14h
20
21; The Hours, Minutes and Seconds, again in BCD for easy manipulation.
22AB_HOURS EQU 22h
23AB_MINUTES EQU 21h
24AB_SECONDS EQU 00h
25
26; The AiR-BOOT signature uses big-endian so we shuffle some bits around.
27AB_SIG_VERSION EQU (((AB_MIDDLE_VERSION SHL 4) OR AB_MINOR_VERSION) SHL 8) OR AB_MAJOR_VERSION
28AB_SIG_YEAR EQU ((AB_YEAR SHR 8) OR (AB_YEAR SHL 8) AND 0FFFFh)
29AB_SIG_DATE EQU (AB_MONTH SHL 8) OR AB_DAY
30
31
32;
33; This macro inserts the AiR-BOOT signature at the place where it is invoked.
34;
35InsertAirbootSignature MACRO lang
36 db 'AiRBOOT'
37 dw AB_SIG_DATE
38 dw AB_SIG_YEAR
39 dw AB_SIG_VERSION
40 ; Wasm can only process the reference to 'lang' in pass 2 because it comes
41 ; from an included file which it has not processed yet at pass 1.
42 IFDEF WASM
43 IF2
44 db lang
45 ENDIF
46 ; The other assemblers process 'lang' correctly in pass 1.
47 ELSE
48 db lang
49 ENDIF
50ENDM
Note: See TracBrowser for help on using the repository browser.