MCPcopy Create free account
hub / github.com/coreboot/coreboot / main

Function main

util/vgabios/testbios.c:122–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121
122int main(int argc, char **argv)
123{
124 int ret;
125 char *absegname = NULL;
126 void *abseg = NULL;
127 int c, trace = 0;
128 unsigned char *cp;
129 char *filename;
130 ssize_t size = 0;
131 int base = 0;
132 int have_size = 0, have_base = 0, have_ip = 0, have_cs = 0;
133 int have_devfn = 0;
134 int parse_rom = 0;
135 //char *fsegname = 0;
136 //unsigned char *fsegptr;
137 unsigned short initialip = 0, initialcs = 0, devfn = 0;
138 //X86EMU_intrFuncs intFuncs[256];
139 int debugflag = 0;
140 struct device *dev;
141
142 //const char *optstring = "vh?b:i:c:s:tpd:";
143 const char *optstring = "vh?b:i:c:s:tpd:";
144 while (1) {
145 int option_index = 0;
146 static struct option long_options[] = {
147 {"verbose", 0, 0, 'v'},
148 {"help", 0, 0, 'h'},
149 {"trace", 0, 0, 't'},
150 {"base", 1, 0, 'b'},
151 //{"fseg", 1, 0, 'f'},
152 {"instructionpointer", 1, 0, 'i'},
153 {"codesegment", 1, 0, 'c'},
154 {"absegment", 1, 0, 'a'},
155 {"size", 1, 0, 's'},
156 {"parserom", 0, 0, 'p'},
157 {"device", 1, 0, 'd'},
158 {"debug", 1, 0, 'D'},
159 {0, 0, 0, 0}
160 };
161 c = getopt_long(argc, argv, optstring, long_options, &option_index);
162 if (c == -1)
163 break;
164 switch (c) {
165 case 'v':
166 verbose = 1;
167 break;
168 case 'h':
169 case '?':
170 usage(argv[0]);
171 return 0;
172 case 't':
173 trace = 1;
174 break;
175 //case 'b':
176 // base = strtol(optarg, 0, 0);
177 // have_base = 1;
178 // break;
179 case 'i':

Callers

nothing calls this directly

Calls 15

getopt_longFunction · 0.85
get_deviceFunction · 0.85
printfFunction · 0.85
mapitinFunction · 0.85
pci_initializeFunction · 0.85
X86EMU_setupIntrFuncsFunction · 0.85
wrbFunction · 0.85
X86EMU_execFunction · 0.85
biosemuFunction · 0.85
X86EMU_setMemBaseFunction · 0.85
X86EMU_setupPioFuncsFunction · 0.85
pci_exitFunction · 0.85

Tested by

no test coverage detected