1af28f636SEnrico Perla - Sun Microsystems /* 2af28f636SEnrico Perla - Sun Microsystems * CDDL HEADER START 3af28f636SEnrico Perla - Sun Microsystems * 4af28f636SEnrico Perla - Sun Microsystems * The contents of this file are subject to the terms of the 5af28f636SEnrico Perla - Sun Microsystems * Common Development and Distribution License (the "License"). 6af28f636SEnrico Perla - Sun Microsystems * You may not use this file except in compliance with the License. 7af28f636SEnrico Perla - Sun Microsystems * 8af28f636SEnrico Perla - Sun Microsystems * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9af28f636SEnrico Perla - Sun Microsystems * or http://www.opensolaris.org/os/licensing. 10af28f636SEnrico Perla - Sun Microsystems * See the License for the specific language governing permissions 11af28f636SEnrico Perla - Sun Microsystems * and limitations under the License. 12af28f636SEnrico Perla - Sun Microsystems * 13af28f636SEnrico Perla - Sun Microsystems * When distributing Covered Code, include this CDDL HEADER in each 14af28f636SEnrico Perla - Sun Microsystems * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15af28f636SEnrico Perla - Sun Microsystems * If applicable, add the following below this CDDL HEADER, with the 16af28f636SEnrico Perla - Sun Microsystems * fields enclosed by brackets "[]" replaced with your own identifying 17af28f636SEnrico Perla - Sun Microsystems * information: Portions Copyright [yyyy] [name of copyright owner] 18af28f636SEnrico Perla - Sun Microsystems * 19af28f636SEnrico Perla - Sun Microsystems * CDDL HEADER END 20af28f636SEnrico Perla - Sun Microsystems */ 21af28f636SEnrico Perla - Sun Microsystems /* 22af28f636SEnrico Perla - Sun Microsystems * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2314d44f22SHans Rosenfeld * Copyright 2012 Nexenta Systems, Inc. All rights reserved. 24af28f636SEnrico Perla - Sun Microsystems */ 25af28f636SEnrico Perla - Sun Microsystems 26af28f636SEnrico Perla - Sun Microsystems #ifndef _MBOOT_EXTRA_H 27af28f636SEnrico Perla - Sun Microsystems #define _MBOOT_EXTRA_H 28af28f636SEnrico Perla - Sun Microsystems 29af28f636SEnrico Perla - Sun Microsystems #ifdef __cplusplus 30af28f636SEnrico Perla - Sun Microsystems extern "C" { 31af28f636SEnrico Perla - Sun Microsystems #endif 32af28f636SEnrico Perla - Sun Microsystems 33af28f636SEnrico Perla - Sun Microsystems #include <stdarg.h> 34af28f636SEnrico Perla - Sun Microsystems #include <sys/types.h> 35af28f636SEnrico Perla - Sun Microsystems #include "bblk_einfo.h" 36af28f636SEnrico Perla - Sun Microsystems 37af28f636SEnrico Perla - Sun Microsystems /* multiboot header needs to be located in the first 32KB. */ 38*bd94aa56SToomas Soome #define MBOOT_SCAN_SIZE (32 * 1024) 39af28f636SEnrico Perla - Sun Microsystems 40af28f636SEnrico Perla - Sun Microsystems /* multiboot header AOUT_KLUDGE flag. */ 41af28f636SEnrico Perla - Sun Microsystems #define BB_MBOOT_AOUT_FLAG (0x00010000) 42af28f636SEnrico Perla - Sun Microsystems 43af28f636SEnrico Perla - Sun Microsystems /* Extra header preceeding the payloads at the end of the bootblock. */ 44af28f636SEnrico Perla - Sun Microsystems typedef struct _bb_extra_header { 45af28f636SEnrico Perla - Sun Microsystems uint32_t size; 46af28f636SEnrico Perla - Sun Microsystems uint32_t checksum; 47af28f636SEnrico Perla - Sun Microsystems } bb_header_ext_t; 48af28f636SEnrico Perla - Sun Microsystems 49af28f636SEnrico Perla - Sun Microsystems uint32_t compute_checksum(char *, uint32_t); 5014d44f22SHans Rosenfeld bblk_einfo_t *find_einfo(char *, uint32_t); 51af28f636SEnrico Perla - Sun Microsystems int find_multiboot(char *, uint32_t, uint32_t *); 52af28f636SEnrico Perla - Sun Microsystems void add_einfo(char *, char *, bblk_hs_t *, uint32_t); 53af28f636SEnrico Perla - Sun Microsystems int compare_bootblocks(char *, char *, char **); 54af28f636SEnrico Perla - Sun Microsystems 55af28f636SEnrico Perla - Sun Microsystems #ifdef __cplusplus 56af28f636SEnrico Perla - Sun Microsystems } 57af28f636SEnrico Perla - Sun Microsystems #endif 58af28f636SEnrico Perla - Sun Microsystems 59af28f636SEnrico Perla - Sun Microsystems #endif /* _MBOOT_EXTRA_H */ 60