• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef MBR_H
8 #define MBR_H
9 
10 #define MBR_OFFSET			0
11 
12 #define MBR_PRIMARY_ENTRY_OFFSET	0x1be
13 #define MBR_PRIMARY_ENTRY_SIZE		0x10
14 #define MBR_PRIMARY_ENTRY_NUMBER	4
15 #define MBR_CHS_ADDRESS_LEN		3
16 
17 #define MBR_SIGNATURE_FIRST		0x55
18 #define MBR_SIGNATURE_SECOND		0xAA
19 
20 typedef struct mbr_entry {
21 	unsigned char		status;
22 	unsigned char		first_sector[MBR_CHS_ADDRESS_LEN];
23 	unsigned char		type;
24 	unsigned char		last_sector[MBR_CHS_ADDRESS_LEN];
25 	unsigned int		first_lba;
26 	unsigned int		sector_nums;
27 } mbr_entry_t;
28 
29 #endif /* MBR_H */
30