Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / hpcmips / stand / pbsdboot / pbsdboot.h
blob2e5b65979eb50e0b5e8b708e4e2ca142cf402468
1 /* $NetBSD: pbsdboot.h,v 1.11 2007/03/04 05:59:53 christos Exp $ */
3 /*-
4 * Copyright (c) 1999 Shin Takemura.
5 * All rights reserved.
7 * This software is part of the PocketBSD.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by the PocketBSD project
20 * and its contributors.
21 * 4. Neither the name of the project nor the names of its contributors
22 * may be used to endorse or promote products derived from this software
23 * without specific prior written permission.
25 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
38 #define STANDALONE_WINDOWS_SIDE
39 #include <stand.h>
40 #include <machine/bootinfo.h>
41 #include <machine/platid.h>
43 extern TCHAR szAppName[ ];
44 #define whoami szAppName
45 #define PREFNAME TEXT("pbsdboot.ini")
46 #define LOGNAME TEXT("pbsdboot.log")
47 #define PATHBUFLEN 200
51 * For some reason, we can't include Windows' header files.
52 * So we must declare here.
54 double wcstod(const wchar_t *, wchar_t **);
55 long wcstol(const wchar_t *, wchar_t **, int);
56 unsigned long wcstoul(const wchar_t *, wchar_t **, int);
57 BOOL VirtualCopy(LPVOID, LPVOID, DWORD, DWORD);
60 * structure declarations
62 struct map_s {
63 void *entry;
64 void *base;
65 int pagesize;
66 int leafsize;
67 int nleaves;
68 void *arg0;
69 void *arg1;
70 void *arg2;
71 void *arg3;
72 void **leaf[32];
75 struct preference_s {
76 int setting_idx;
77 int fb_type;
78 int fb_width, fb_height, fb_linebytes;
79 int boot_time;
80 long fb_addr;
81 unsigned long platid_cpu, platid_machine;
82 TCHAR setting_name[PATHBUFLEN];
83 TCHAR kernel_name[PATHBUFLEN];
84 TCHAR options[PATHBUFLEN];
85 BOOL check_last_chance;
86 BOOL load_debug_info;
87 BOOL serial_port;
88 BOOL reverse_video;
89 BOOL autoboot;
92 struct path_s {
93 TCHAR* name;
94 LANGID langid;
95 unsigned long flags;
96 #define PATH_SAVE 1
100 * Machine dependent information
102 struct system_info {
103 unsigned int si_dramstart;
104 unsigned int si_drammaxsize;
105 DWORD si_pagesize;
106 unsigned char *si_asmcode;
107 int si_asmcodelen;
108 int (*si_boot)(void *);
109 int si_intrvec;
111 extern struct system_info system_info;
113 extern struct preference_s pref;
114 extern TCHAR* where_pref_load_from;
117 * main.c
119 BOOL CheckCancel(int progress);
120 extern HWND hDlgMain;
123 * layout.c
125 int CreateMainWindow(HINSTANCE hInstance, HWND hWnd, LPCTSTR name, int cmdbar_height);
128 * vmem.c
130 int vmem_exec(void *entry, int argc, char *argv[], struct bootinfo *bi);
131 void *vmem_get(void *phys_addr, int *length);
132 int vmem_init(void *start, void *end);
133 void vmem_dump_map(void);
134 void *vtophysaddr(void *page);
135 void vmem_free(void);
136 void *vmem_alloc(void);
139 * elf.c
141 int getinfo(int fd, void **start, void **end);
142 int loadfile(int fd, void **entry);
145 * mips.c
147 int mips_boot(void *map);
150 * pbsdboot.c
152 int pbsdboot(TCHAR*, int argc, char *argv[], struct bootinfo *bi);
155 * print.c
157 int debug_printf(LPWSTR lpszFmt, ...);
158 int msg_printf(UINT type, LPWSTR caption, LPWSTR lpszFmt, ...);
159 int stat_printf(LPWSTR lpszFmt, ...);
160 int set_debug_log(TCHAR* path);
161 void close_debug_log(void);
164 #define MSG_ERROR (MB_OK | MB_ICONERROR)
165 #define MSG_INFO (MB_OK | MB_ICONINFORMATION)
168 * disptest.c
170 void hardware_test(void);
174 * preference.c
176 void pref_init(struct preference_s* pref);
177 void pref_dump(struct preference_s* pref);
178 int pref_read(TCHAR* filename, struct preference_s* pref);
179 int pref_load(struct path_s load_path[], int pathlen);
180 int pref_save(struct path_s load_path[], int pathlen);
181 int pref_write(TCHAR* filename, struct preference_s* buf);
185 * systeminfo.c
187 int set_system_info(platid_t* platid);
191 * palette.c
193 enum palette_status { PAL_ERROR, PAL_NOERROR, PAL_SUCCEEDED };
194 extern enum palette_status palette_succeeded;
195 void palette_init(HWND hWnd);
196 void palette_set(HWND hWnd);
197 void palette_check(HWND hWnd);
200 * vr41xx.c
202 void vr41xx_init(SYSTEM_INFO *info);
206 * tx39xx.c
208 void tx39xx_init(SYSTEM_INFO *info);