17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5986fd29aSsetje * Common Development and Distribution License (the "License"). 6986fd29aSsetje * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22d24234c2SJerry Gilliam * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 24*9cb0a1d4SPeter Tribble * Copyright 2019 Peter Tribble. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _BOOT_PLAT_H 287c478bd9Sstevel@tonic-gate #define _BOOT_PLAT_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #ifdef __cplusplus 317c478bd9Sstevel@tonic-gate extern "C" { 327c478bd9Sstevel@tonic-gate #endif 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate 35d24234c2SJerry Gilliam /* 36d24234c2SJerry Gilliam * boot platform defaults per architecture 37d24234c2SJerry Gilliam */ 38d24234c2SJerry Gilliam typedef struct bootplat_defaults { 39d24234c2SJerry Gilliam char *plat_defaults_name; 40d24234c2SJerry Gilliam char *plat_defaults_path; 41d24234c2SJerry Gilliam int plat_defaults_vac; 42d24234c2SJerry Gilliam } bootplat_defaults_t; 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate /* boot_plat.c */ 457c478bd9Sstevel@tonic-gate extern int verbosemode; 467c478bd9Sstevel@tonic-gate extern char filename[]; 477c478bd9Sstevel@tonic-gate extern char *const defname; 487c478bd9Sstevel@tonic-gate extern char *const defname64; 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate extern int bootprog(char *, char *, boolean_t); 517c478bd9Sstevel@tonic-gate extern char *choose_default_filename(char *, char *); 527c478bd9Sstevel@tonic-gate extern char *get_default_filename(void); 537c478bd9Sstevel@tonic-gate extern void post_mountroot(char *, char *); 547c478bd9Sstevel@tonic-gate extern void redirect_boot_path(char *, char *); 557c478bd9Sstevel@tonic-gate extern void set_client_bootargs(const char *, const char *); 567c478bd9Sstevel@tonic-gate extern boolean_t is_netdev(char *devpath); 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate /* bootops.c */ 607c478bd9Sstevel@tonic-gate extern struct bootops bootops; 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate extern void setup_bootops(void); 637c478bd9Sstevel@tonic-gate extern void update_memlist(char *, char *, struct memlist **); 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate /* 677c478bd9Sstevel@tonic-gate * bootprop.c. These variables will be exported to the standalone as boot 687c478bd9Sstevel@tonic-gate * properties. 697c478bd9Sstevel@tonic-gate */ 707c478bd9Sstevel@tonic-gate extern char *v2path, *kernname, *systype, *my_own_name; 717c478bd9Sstevel@tonic-gate extern char v2args_buf[]; 727c478bd9Sstevel@tonic-gate #define V2ARGS_BUF_SZ OBP_MAXPATHLEN 737c478bd9Sstevel@tonic-gate extern char *v2args; 747c478bd9Sstevel@tonic-gate extern char *mfg_name; 757c478bd9Sstevel@tonic-gate extern char *impl_arch_name; 767c478bd9Sstevel@tonic-gate extern char *bootp_response; 777c478bd9Sstevel@tonic-gate extern char *boot_message; 787c478bd9Sstevel@tonic-gate extern int cache_state; 797c478bd9Sstevel@tonic-gate extern uint64_t memlistextent; 807c478bd9Sstevel@tonic-gate extern char *netdev_path; 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate extern void set_default_filename(char *filename); 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate /* get.c */ 867c478bd9Sstevel@tonic-gate extern int cons_gets(char *, int); 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate /* machdep.c */ 907c478bd9Sstevel@tonic-gate extern int vac; 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate extern void fiximp(void); 937c478bd9Sstevel@tonic-gate extern void retain_nvram_page(); 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate /* memlist.c */ 977c478bd9Sstevel@tonic-gate extern void init_memlists(void); 987c478bd9Sstevel@tonic-gate extern struct memlist *fill_memlists(char *name, char *prop, 997c478bd9Sstevel@tonic-gate struct memlist *old); 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate 1027c478bd9Sstevel@tonic-gate /* srt0.c */ 1037c478bd9Sstevel@tonic-gate extern void _start(void *romp, ...); 1047c478bd9Sstevel@tonic-gate extern void exitto(int (*entrypoint)()); 1057c478bd9Sstevel@tonic-gate extern void exitto64(int (*entrypoint)(), void *bootvec); 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate /* standalloc.c */ 1097c478bd9Sstevel@tonic-gate extern caddr_t memlistpage; 1107c478bd9Sstevel@tonic-gate extern caddr_t scratchmemp; 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1157c478bd9Sstevel@tonic-gate } 1167c478bd9Sstevel@tonic-gate #endif 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate #endif /* _BOOT_PLAT_H */ 119