1. 05 Jul, 2021 3 commits
    • Sandrine Bailleux's avatar
      refactor(measured boot): revisit error handling (2/3) · 0c83207a
      Sandrine Bailleux authored
      
      
      - In add_event2():
      
        Turn the first error condition checking whether there is room for an
        extra event2 data structure into an assertion. The platform layer is
        responsible for choosing an appropriate event log buffer size based
        on the number of measurements it expects. If this assertion fires,
        the platform macro EVENT_LOG_SIZE should be adjusted and the
        firmware recompiled.
      
        Call this assumption out in the function documentation.
      
        Also remove the second error condition check, which is a subset of
        the first one and thus is redundant.
      
        As a result of these changes, add_event2() can no longer fail. Thus,
        change its return type from int to void.
      
        Also, the 'size_of_event' local variable is now unused in release
        builds so remove it and move its value into the assertion.
      
      Change-Id: I113fc141de59708b20435a0c7126255561ab7786
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      0c83207a
    • Sandrine Bailleux's avatar
      refactor(measured boot): revisit error handling (1/3) · ddb07a56
      Sandrine Bailleux authored
      
      
       - In event_log_init():
      
         Throughout the function, we are incrementing a pointer by some fixed
         amounts of bytes (corresponding to the size of some data structure or
         to some constant number of bytes), there is no variable-size
         increments in the picture. Thus it seems pointless to verify that the
         pointer has indeed been incremented by this fixed amount of bytes
         afterwards.
      
         For this reason, remove these checks altogether. As a result, the
         start_ptr local variable is now unused so remove it as well.
      
      Change-Id: I612e2278cd3a63d1417427e45d81e285503f5efe
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      ddb07a56
    • Sandrine Bailleux's avatar
      style(measured boot): fix incorrect indentation · ef65c9c6
      Sandrine Bailleux authored
      
      
      Change-Id: I5b84a28ed254a7c7bb95c18fa999592a4e3f6d90
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      ef65c9c6
  2. 01 Jul, 2021 1 commit
    • Sandrine Bailleux's avatar
      refactor(measured boot): remove weak definition of plat_get_measured_boot_data() · c04cb15c
      Sandrine Bailleux authored
      
      
      Weak definitions are confusing and should be avoided if possible.
      Thus, turn plat_get_measured_boot_data() into a strong definition that
      platforms must provide (if they need measured boot).
      
      We could have moved the old weak implementation under plat/common as a
      sane, default implementation that platforms may pull in if it suits
      them. However, this implementation right now simply measures BL2,
      which is not enough to get a complete measured boot flow, so this
      patch just removes it.
      
      This change only affects the Arm FVP platform, as no other upstream
      platform implements measured boot at the moment.
      
      Change-Id: If8680a39ae0ef1044ee981315439d5e0c8461229
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      c04cb15c
  3. 28 Sep, 2020 1 commit
  4. 21 Jul, 2020 1 commit