10a586ceaSMark Shellenbaum /*
2*170affddSMark Shellenbaum  *  GRUB  --  GRand Unified Bootloader
3*170affddSMark Shellenbaum  *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
40a586ceaSMark Shellenbaum  *
5*170affddSMark Shellenbaum  *  This program is free software; you can redistribute it and/or modify
6*170affddSMark Shellenbaum  *  it under the terms of the GNU General Public License as published by
7*170affddSMark Shellenbaum  *  the Free Software Foundation; either version 2 of the License, or
8*170affddSMark Shellenbaum  *  (at your option) any later version.
90a586ceaSMark Shellenbaum  *
10*170affddSMark Shellenbaum  *  This program is distributed in the hope that it will be useful,
11*170affddSMark Shellenbaum  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12*170affddSMark Shellenbaum  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*170affddSMark Shellenbaum  *  GNU General Public License for more details.
140a586ceaSMark Shellenbaum  *
15*170affddSMark Shellenbaum  *  You should have received a copy of the GNU General Public License
16*170affddSMark Shellenbaum  *  along with this program; if not, write to the Free Software
17*170affddSMark Shellenbaum  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
180a586ceaSMark Shellenbaum  */
190a586ceaSMark Shellenbaum /*
200a586ceaSMark Shellenbaum  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
210a586ceaSMark Shellenbaum  * Use is subject to license terms.
220a586ceaSMark Shellenbaum  */
230a586ceaSMark Shellenbaum #ifndef	_SYS_SA_IMPL_H
240a586ceaSMark Shellenbaum #define	_SYS_SA_IMPL_H
250a586ceaSMark Shellenbaum 
260a586ceaSMark Shellenbaum typedef struct sa_hdr_phys {
270a586ceaSMark Shellenbaum 	uint32_t sa_magic;
280a586ceaSMark Shellenbaum 	uint16_t sa_layout_info;
290a586ceaSMark Shellenbaum 	uint16_t sa_lengths[1];
300a586ceaSMark Shellenbaum } sa_hdr_phys_t;
310a586ceaSMark Shellenbaum 
320a586ceaSMark Shellenbaum #define	SA_HDR_SIZE(hdr)	BF32_GET_SB(hdr->sa_layout_info, 10, 16, 3, 0)
330a586ceaSMark Shellenbaum #define	SA_SIZE_OFFSET	0x8
340a586ceaSMark Shellenbaum 
350a586ceaSMark Shellenbaum #endif	/* _SYS_SA_IMPL_H */
36