Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Maxime Ripard's avatar
    b349abbf
    gpt: Fix the protective MBR partition size · b349abbf
    Maxime Ripard authored
    
    According to the UEFI Spec (Table 16, section 5.2.3 of the version 2.4 Errata
    B), the protective MBR partition record size must be set to the size of the
    disk minus one, in LBAs.
    
    However, the current code was setting the size as the total number of LBAs on
    the disk, resulting in an off-by-one error.
    
    This confused the AM335x ROM code, and will probably confuse other tools as
    well.
    
    Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
    b349abbf
    History
    gpt: Fix the protective MBR partition size
    Maxime Ripard authored
    
    According to the UEFI Spec (Table 16, section 5.2.3 of the version 2.4 Errata
    B), the protective MBR partition record size must be set to the size of the
    disk minus one, in LBAs.
    
    However, the current code was setting the size as the total number of LBAs on
    the disk, resulting in an off-by-one error.
    
    This confused the AM335x ROM code, and will probably confuse other tools as
    well.
    
    Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>