1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 #include <zircon/types.h>
8 
9 // Enumeration of all different types of bad blocks.
10 typedef uint8_t bad_block_type_t;
11 #define kAmlogicUboot ((bad_block_type_t)0)
12 
13 typedef struct {
14     bad_block_type_t type;
15     union {
16         struct {
17             // First block in which BBT may be be found.
18             uint32_t table_start_block;
19             // Last block in which BBT may be be found. It is inclusive.
20             uint32_t table_end_block;
21         } aml;
22     };
23 } bad_block_config_t;
24