1331722Seadler/* $NetBSD: cfe_ioctl.h,v 1.2 2003/02/07 17:52:08 cgd Exp $ */ 2331722Seadler 3183370Simp/*- 4331722Seadler * Copyright 2000, 2001 5183370Simp * Broadcom Corporation. All rights reserved. 6183370Simp * 7331722Seadler * This software is furnished under license and may be used and copied only 8331722Seadler * in accordance with the following terms and conditions. Subject to these 9331722Seadler * conditions, you may download, copy, install, use, modify and distribute 10331722Seadler * modified or unmodified copies of this software in source and/or binary 11331722Seadler * form. No title or ownership is transferred hereby. 12183370Simp * 13183370Simp * 1) Any source code used, modified or distributed must reproduce and 14183370Simp * retain this copyright notice and list of conditions as they appear in 15183370Simp * the source file. 16183370Simp * 17183370Simp * 2) No right is granted to use any trade name, trademark, or logo of 18183370Simp * Broadcom Corporation. The "Broadcom Corporation" name may not be 19183370Simp * used to endorse or promote products derived from this software 20183370Simp * without the prior written permission of Broadcom Corporation. 21183370Simp * 22183370Simp * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED 23183370Simp * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF 24183370Simp * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR 25183370Simp * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE 26183370Simp * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE 27183370Simp * LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28183370Simp * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29183370Simp * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30183370Simp * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31183370Simp * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32183370Simp * OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33183370Simp * 34183370Simp * $FreeBSD$ 35183370Simp */ 36183370Simp 37183370Simp/* ********************************************************************* 38183370Simp * Broadcom Common Firmware Environment (CFE) 39183370Simp * 40183370Simp * IOCTL definitions File: cfe_ioctl.h 41183370Simp * 42183370Simp * IOCTL function numbers and I/O data structures. 43183370Simp * 44331722Seadler * Author: Mitch Lichtenberg (mpl@broadcom.com) 45183370Simp * 46183370Simp ********************************************************************* */ 47183370Simp 48183370Simp 49183370Simp/* ********************************************************************* 50183370Simp * NVFAM and FLASH stuff 51183370Simp ********************************************************************* */ 52183370Simp 53183370Simp#define IOCTL_NVRAM_GETINFO 1 /* return nvram_info_t */ 54183370Simp#define IOCTL_NVRAM_ERASE 2 /* erase sector containing nvram_info_t area */ 55183370Simp#define IOCTL_FLASH_ERASE_SECTOR 3 /* erase an arbitrary sector */ 56331722Seadler#define IOCTL_FLASH_ERASE_ALL 4 /* Erase the entire flash */ 57183370Simp 58183370Simptypedef struct nvram_info_s { 59331722Seadler int nvram_offset; /* offset of environment area */ 60331722Seadler int nvram_size; /* size of environment area */ 61331722Seadler int nvram_eraseflg; /* true if we need to erase first */ 62183370Simp} nvram_info_t; 63183370Simp 64183370Simp/* ********************************************************************* 65183370Simp * Ethernet stuff 66183370Simp ********************************************************************* */ 67183370Simp 68331722Seadler#define IOCTL_ETHER_GETHWADDR 1 69183370Simp 70183370Simp/* ********************************************************************* 71183370Simp * Block device stuff 72183370Simp ********************************************************************* */ 73183370Simp 74331722Seadler#define IOCTL_BLOCK_GETBLOCKSIZE 1 75331722Seadler#define IOCTL_BLOCK_GETTOTALBLOCKS 2 76