]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix pmbr issues > 2TB
authorEmrion <kmachine@free.fr>
Tue, 13 Jul 2021 20:37:59 +0000 (14:37 -0600)
committerWarner Losh <imp@FreeBSD.org>
Wed, 21 Jul 2021 16:16:31 +0000 (10:16 -0600)
commit3cd395b3b9d2ab70d589d27203904238f138442f
treef7fbaecc28cdbabde879a0502454837fabed9479
parent82e3f2709ce2c38c4ed6d386c97550eb700af6e7
Fix pmbr issues > 2TB

These issues have low impact because they require precise circumstances
to trigger one of them. The disk must be > 2 TiB in size and either:
- The primary GPT header is dammaged.
- The freebsd-boot partiton is located farther than the first 2 TiB of
  the disc and one of its sectors takes place at a lba value that makes
  the higher 32 bits of this very value change.
Errors and corrections folow:
- decl and incl don't affect CF, so replace with subl/addl $1
- repe uses %cx, so move size to it with movw
- moving a 64-bit value with %cx of 2 (should be 4) so addresses
  > 2TB will work.

PR: 233180
Reviewed by: imp@ (applied patch using description in bug)
Differential Revision: https://reviews.freebsd.org/D31100

(cherry picked from commit 0ca9f1d4a3b772036309fb1c14262ec77c674c5d)
stand/i386/pmbr/pmbr.s