xref: /rk3399_rockchip-uboot/include/zfs/sa_impl.h (revision 4d3c95f5ea7c737a21cd6b9c59435ee693b3f127)
1*4d3c95f5SJorgen Lundman /*
2*4d3c95f5SJorgen Lundman  *  GRUB  --  GRand Unified Bootloader
3*4d3c95f5SJorgen Lundman  *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
4*4d3c95f5SJorgen Lundman  *
5*4d3c95f5SJorgen Lundman  *  This program is free software; you can redistribute it and/or modify
6*4d3c95f5SJorgen Lundman  *  it under the terms of the GNU General Public License as published by
7*4d3c95f5SJorgen Lundman  *  the Free Software Foundation; either version 2 of the License, or
8*4d3c95f5SJorgen Lundman  *  (at your option) any later version.
9*4d3c95f5SJorgen Lundman  *
10*4d3c95f5SJorgen Lundman  *  This program is distributed in the hope that it will be useful,
11*4d3c95f5SJorgen Lundman  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12*4d3c95f5SJorgen Lundman  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*4d3c95f5SJorgen Lundman  *  GNU General Public License for more details.
14*4d3c95f5SJorgen Lundman  *
15*4d3c95f5SJorgen Lundman  *  You should have received a copy of the GNU General Public License
16*4d3c95f5SJorgen Lundman  *  along with this program; if not, write to the Free Software
17*4d3c95f5SJorgen Lundman  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*4d3c95f5SJorgen Lundman  */
19*4d3c95f5SJorgen Lundman /*
20*4d3c95f5SJorgen Lundman  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
21*4d3c95f5SJorgen Lundman  * Use is subject to license terms.
22*4d3c95f5SJorgen Lundman  */
23*4d3c95f5SJorgen Lundman #ifndef	_SYS_SA_IMPL_H
24*4d3c95f5SJorgen Lundman #define	_SYS_SA_IMPL_H
25*4d3c95f5SJorgen Lundman 
26*4d3c95f5SJorgen Lundman typedef struct sa_hdr_phys {
27*4d3c95f5SJorgen Lundman 	uint32_t sa_magic;
28*4d3c95f5SJorgen Lundman 	uint16_t sa_layout_info;
29*4d3c95f5SJorgen Lundman 	uint16_t sa_lengths[1];
30*4d3c95f5SJorgen Lundman } sa_hdr_phys_t;
31*4d3c95f5SJorgen Lundman 
32*4d3c95f5SJorgen Lundman #define	SA_HDR_SIZE(hdr)	BF32_GET_SB(hdr->sa_layout_info, 10, 16, 3, 0)
33*4d3c95f5SJorgen Lundman #define	SA_SIZE_OFFSET	0x8
34*4d3c95f5SJorgen Lundman 
35*4d3c95f5SJorgen Lundman #endif	/* _SYS_SA_IMPL_H */
36