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