]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/FlashMap/FlashMap.c
Fix capitalization
[mirror_edk2.git] / Tools / Source / TianoTools / FlashMap / FlashMap.c
1 /*++
2
3 Copyright (c) 2004-2005 Intel Corporation. All rights reserved
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
10 Intel Corporation.
11
12 Module Name:
13
14 FlashMap.c
15
16 Abstract:
17
18 Utility for flash management in the Intel Platform Innovation Framework
19 for EFI build environment.
20
21 --*/
22
23 #include <stdio.h>
24 #include <string.h>
25 #include <stdlib.h>
26 #include <ctype.h>
27
28 #include "Tiano.h"
29
30 #ifndef INT8
31 #define INT8 char
32 #endif
33
34 #include "EfiUtilityMsgs.h"
35 #include "Microcode.h"
36 #include "FlashDefFile.h"
37 #include "Symbols.h"
38
39 #define UTILITY_NAME "FlashMap"
40
41 typedef struct _STRING_LIST {
42 struct _STRING_LIST *Next;
43 char *Str;
44 } STRING_LIST;
45
46 //
47 // Keep our globals in one of these structures
48 //
49 static struct {
50 char *CIncludeFileName;
51 char *FlashDevice;
52 char *FlashDeviceImage;
53 char *MCIFileName;
54 char *MCOFileName;
55 char *ImageOutFileName;
56 char *DscFileName;
57 char *AsmIncludeFileName;
58 char *FlashDefinitionFileName;
59 char *StringReplaceInFileName;
60 char *StringReplaceOutFileName;
61 char *DiscoverFDImageName;
62 char MicrocodePadByteValue;
63 unsigned int MicrocodeAlignment;
64 STRING_LIST *MCIFileNames;
65 STRING_LIST *LastMCIFileNames;
66 unsigned int BaseAddress;
67 } mGlobals;
68
69 #define DEFAULT_MC_PAD_BYTE_VALUE 0xFF
70 #define DEFAULT_MC_ALIGNMENT 16
71
72 static
73 STATUS
74 ProcessCommandLine (
75 int argc,
76 char *argv[]
77 );
78
79 static
80 STATUS
81 MergeMicrocodeFiles (
82 char *OutFileName,
83 STRING_LIST *FileNames,
84 unsigned int Alignment,
85 char PadByteValue
86 );
87
88 static
89 void
90 Usage (
91 VOID
92 );
93
94 int
95 main (
96 int argc,
97 char *argv[]
98 )
99 /*++
100
101 Routine Description:
102 Parse the command line arguments and then call worker functions to do the work
103
104 Arguments:
105 argc - number of elements in argv
106 argv - array of command-line arguments
107
108 Returns:
109 STATUS_SUCCESS - no problems encountered while processing
110 STATUS_WARNING - warnings, but no errors, were encountered while processing
111 STATUS_ERROR - errors were encountered while processing
112
113 --*/
114 {
115 STATUS Status;
116
117 SetUtilityName (UTILITY_NAME);
118 Status = ProcessCommandLine (argc, argv);
119 if (Status != STATUS_SUCCESS) {
120 return Status;
121 }
122 //
123 // Check for discovery of an FD (command line option)
124 //
125 if (mGlobals.DiscoverFDImageName != NULL) {
126 Status = FDDiscover (mGlobals.DiscoverFDImageName, mGlobals.BaseAddress);
127 goto Done;
128 }
129 //
130 // If they're doing microcode file parsing, then do that
131 //
132 if (mGlobals.MCIFileName != NULL) {
133 MicrocodeConstructor ();
134 MicrocodeParseFile (mGlobals.MCIFileName, mGlobals.MCOFileName);
135 MicrocodeDestructor ();
136 }
137 //
138 // If they're doing microcode file merging, then do that now
139 //
140 if (mGlobals.MCIFileNames != NULL) {
141 MergeMicrocodeFiles (
142 mGlobals.MCOFileName,
143 mGlobals.MCIFileNames,
144 mGlobals.MicrocodeAlignment,
145 mGlobals.MicrocodePadByteValue
146 );
147 }
148 //
149 // If using a flash definition file, then process that and return
150 //
151 if (mGlobals.FlashDefinitionFileName != NULL) {
152 FDFConstructor ();
153 SymbolsConstructor ();
154 Status = FDFParseFile (mGlobals.FlashDefinitionFileName);
155 if (GetUtilityStatus () != STATUS_ERROR) {
156 //
157 // If they want us to do a string-replace on a file, then add the symbol definitions to
158 // the symbol table, and then do the string replace.
159 //
160 if (mGlobals.StringReplaceInFileName != NULL) {
161 Status = FDFCreateSymbols (mGlobals.FlashDevice);
162 Status = SymbolsFileStringsReplace (mGlobals.StringReplaceInFileName, mGlobals.StringReplaceOutFileName);
163 }
164 //
165 // If they want us to create a .h defines file or .c flashmap data file, then do so now
166 //
167 if (mGlobals.CIncludeFileName != NULL) {
168 Status = FDFCreateCIncludeFile (mGlobals.FlashDevice, mGlobals.CIncludeFileName);
169 }
170 if (mGlobals.AsmIncludeFileName != NULL) {
171 Status = FDFCreateAsmIncludeFile (mGlobals.FlashDevice, mGlobals.AsmIncludeFileName);
172 }
173 //
174 // If they want us to create an image, do that now
175 //
176 if (mGlobals.ImageOutFileName != NULL) {
177 Status = FDFCreateImage (mGlobals.FlashDevice, mGlobals.FlashDeviceImage, mGlobals.ImageOutFileName);
178 }
179 //
180 // If they want to create an output DSC file, do that now
181 //
182 if (mGlobals.DscFileName != NULL) {
183 Status = FDFCreateDscFile (mGlobals.FlashDevice, mGlobals.DscFileName);
184 }
185 }
186 SymbolsDestructor ();
187 FDFDestructor ();
188 }
189 Done:
190 //
191 // Free up memory
192 //
193 while (mGlobals.MCIFileNames != NULL) {
194 mGlobals.LastMCIFileNames = mGlobals.MCIFileNames->Next;
195 _free (mGlobals.MCIFileNames);
196 mGlobals.MCIFileNames = mGlobals.LastMCIFileNames;
197 }
198 return GetUtilityStatus ();
199 }
200
201 static
202 STATUS
203 MergeMicrocodeFiles (
204 char *OutFileName,
205 STRING_LIST *FileNames,
206 unsigned int Alignment,
207 char PadByteValue
208 )
209 /*++
210
211 Routine Description:
212
213 Merge binary microcode files into a single file, taking into consideration
214 the alignment and pad value.
215
216 Arguments:
217
218 OutFileName - name of the output file to create
219 FileNames - linked list of input microcode files to merge
220 Alignment - alignment for each microcode file in the output image
221 PadByteValue - value to use when padding to meet alignment requirements
222
223 Returns:
224
225 STATUS_SUCCESS - merge completed successfully or with acceptable warnings
226 STATUS_ERROR - merge failed, output file not created
227
228 --*/
229 {
230 long FileSize;
231 long TotalFileSize;
232 FILE *InFptr;
233 FILE *OutFptr;
234 char *Buffer;
235 STATUS Status;
236
237 //
238 // Open the output file
239 //
240 if ((OutFptr = fopen (OutFileName, "wb")) == NULL) {
241 Error (NULL, 0, 0, OutFileName, "failed to open output file for writing");
242 return STATUS_ERROR;
243 }
244 //
245 // Walk the list of files
246 //
247 Status = STATUS_ERROR;
248 Buffer = NULL;
249 InFptr = NULL;
250 TotalFileSize = 0;
251 while (FileNames != NULL) {
252 //
253 // Open the file, determine the size, then read it in and write
254 // it back out.
255 //
256 if ((InFptr = fopen (FileNames->Str, "rb")) == NULL) {
257 Error (NULL, 0, 0, FileNames->Str, "failed to open input file for reading");
258 goto Done;
259 }
260 fseek (InFptr, 0, SEEK_END);
261 FileSize = ftell (InFptr);
262 fseek (InFptr, 0, SEEK_SET);
263 if (FileSize != 0) {
264 Buffer = (char *) _malloc (FileSize);
265 if (Buffer == NULL) {
266 Error (NULL, 0, 0, "memory allocation failure", NULL);
267 goto Done;
268 }
269 if (fread (Buffer, FileSize, 1, InFptr) != 1) {
270 Error (NULL, 0, 0, FileNames->Str, "failed to read file contents");
271 goto Done;
272 }
273 //
274 // Align
275 //
276 if (Alignment != 0) {
277 while ((TotalFileSize % Alignment) != 0) {
278 if (fwrite (&PadByteValue, 1, 1, OutFptr) != 1) {
279 Error (NULL, 0, 0, OutFileName, "failed to write pad bytes to output file");
280 goto Done;
281 }
282 TotalFileSize++;
283 }
284 }
285 TotalFileSize += FileSize;
286 if (fwrite (Buffer, FileSize, 1, OutFptr) != 1) {
287 Error (NULL, 0, 0, OutFileName, "failed to write to output file");
288 goto Done;
289 }
290 _free (Buffer);
291 Buffer = NULL;
292 } else {
293 Warning (NULL, 0, 0, FileNames->Str, "0-size file encountered");
294 }
295 fclose (InFptr);
296 InFptr = NULL;
297 FileNames = FileNames->Next;
298 }
299 Status = STATUS_SUCCESS;
300 Done:
301 fclose (OutFptr);
302 if (InFptr != NULL) {
303 fclose (InFptr);
304 }
305 if (Buffer != NULL) {
306 _free (Buffer);
307 }
308 if (Status == STATUS_ERROR) {
309 remove (OutFileName);
310 }
311 return Status;
312 }
313
314 static
315 STATUS
316 ProcessCommandLine (
317 int argc,
318 char *argv[]
319 )
320 /*++
321
322 Routine Description:
323 Process the command line arguments
324
325 Arguments:
326 argc - Standard C entry point arguments
327 argv[] - Standard C entry point arguments
328
329 Returns:
330 STATUS_SUCCESS - no problems encountered while processing
331 STATUS_WARNING - warnings, but no errors, were encountered while processing
332 STATUS_ERROR - errors were encountered while processing
333
334 --*/
335 {
336 int ThingsToDo;
337 unsigned int Temp;
338 STRING_LIST *Str;
339 //
340 // Skip program name arg, process others
341 //
342 argc--;
343 argv++;
344 if (argc == 0) {
345 Usage ();
346 return STATUS_ERROR;
347 }
348 //
349 // Clear out our globals, then start walking the arguments
350 //
351 memset ((void *) &mGlobals, 0, sizeof (mGlobals));
352 mGlobals.MicrocodePadByteValue = DEFAULT_MC_PAD_BYTE_VALUE;
353 mGlobals.MicrocodeAlignment = DEFAULT_MC_ALIGNMENT;
354 ThingsToDo = 0;
355 while (argc > 0) {
356 if (strcmp (argv[0], "-?") == 0) {
357 Usage ();
358 return STATUS_ERROR;
359 } else if (strcmp (argv[0], "-hfile") == 0) {
360 //
361 // -hfile FileName
362 //
363 // Used to specify an output C #include file to create that contains
364 // #define statements for all the flashmap region offsets and sizes.
365 // Check for additional argument.
366 //
367 if (argc < 2) {
368 Error (NULL, 0, 0, argv[0], "option requires an output file name");
369 return STATUS_ERROR;
370 }
371 argc--;
372 argv++;
373 mGlobals.CIncludeFileName = argv[0];
374 ThingsToDo++;
375 } else if (strcmp (argv[0], "-flashdevice") == 0) {
376 //
377 // -flashdevice FLASH_DEVICE_NAME
378 //
379 // Used to select which flash device definition to operate on.
380 // Check for additional argument
381 //
382 if (argc < 2) {
383 Error (NULL, 0, 0, argv[0], "option requires a flash device name to use");
384 return STATUS_ERROR;
385 }
386 argc--;
387 argv++;
388 mGlobals.FlashDevice = argv[0];
389 } else if (strcmp (argv[0], "-mco") == 0) {
390 //
391 // -mco OutFileName
392 //
393 // Used to specify a microcode output binary file to create.
394 // Check for additional argument.
395 //
396 if (argc < 2) {
397 Error (NULL, 0, 0, (INT8 *) argv[0], (INT8 *) "option requires an output microcode file name to create");
398 return STATUS_ERROR;
399 }
400 argc--;
401 argv++;
402 mGlobals.MCOFileName = argv[0];
403 ThingsToDo++;
404 } else if (strcmp (argv[0], "-asmincfile") == 0) {
405 //
406 // -asmincfile FileName
407 //
408 // Used to specify the name of the output assembly include file that contains
409 // equates for the flash region addresses and sizes.
410 // Check for additional argument.
411 //
412 if (argc < 2) {
413 Error (NULL, 0, 0, argv[0], "option requires an output ASM include file name to create");
414 return STATUS_ERROR;
415 }
416 argc--;
417 argv++;
418 mGlobals.AsmIncludeFileName = argv[0];
419 ThingsToDo++;
420 } else if (strcmp (argv[0], "-mci") == 0) {
421 //
422 // -mci FileName
423 //
424 // Used to specify an input microcode text file to parse.
425 // Check for additional argument
426 //
427 if (argc < 2) {
428 Error (NULL, 0, 0, (INT8 *) argv[0], (INT8 *) "option requires an input microcode text file name to parse");
429 return STATUS_ERROR;
430 }
431 argc--;
432 argv++;
433 mGlobals.MCIFileName = argv[0];
434 } else if (strcmp (argv[0], "-flashdeviceimage") == 0) {
435 //
436 // -flashdeviceimage FlashDeviceImage
437 //
438 // Used to specify which flash device image definition from the input flash definition file
439 // to create.
440 // Check for additional argument.
441 //
442 if (argc < 2) {
443 Error (NULL, 0, 0, argv[0], "option requires the name of a flash definition image to use");
444 return STATUS_ERROR;
445 }
446 argc--;
447 argv++;
448 mGlobals.FlashDeviceImage = argv[0];
449 } else if (strcmp (argv[0], "-imageout") == 0) {
450 //
451 // -imageout FileName
452 //
453 // Used to specify the name of the output FD image file to create.
454 // Check for additional argument.
455 //
456 if (argc < 2) {
457 Error (NULL, 0, 0, argv[0], "option requires an output image filename to create");
458 return STATUS_ERROR;
459 }
460 argc--;
461 argv++;
462 mGlobals.ImageOutFileName = argv[0];
463 ThingsToDo++;
464 } else if (strcmp (argv[0], "-dsc") == 0) {
465 //
466 // -dsc FileName
467 //
468 // Used to specify the name of the output DSC file to create.
469 // Check for additional argument.
470 //
471 if (argc < 2) {
472 Error (NULL, 0, 0, argv[0], "option requires an output DSC filename to create");
473 return STATUS_ERROR;
474 }
475 argc--;
476 argv++;
477 mGlobals.DscFileName = argv[0];
478 ThingsToDo++;
479 } else if (strcmp (argv[0], "-fdf") == 0) {
480 //
481 // -fdf FileName
482 //
483 // Used to specify the name of the input flash definition file.
484 // Check for additional argument.
485 //
486 if (argc < 2) {
487 Error (NULL, 0, 0, argv[0], "option requires an input flash definition file name");
488 return STATUS_ERROR;
489 }
490 argc--;
491 argv++;
492 mGlobals.FlashDefinitionFileName = argv[0];
493 } else if (strcmp (argv[0], "-discover") == 0) {
494 //
495 // -discover FDFileName
496 //
497 // Debug functionality used to scan an existing FD image, trying to find
498 // firmware volumes at 64K boundaries.
499 // Check for additional argument.
500 //
501 if (argc < 2) {
502 Error (NULL, 0, 0, argv[0], "option requires an input FD image file name");
503 return STATUS_ERROR;
504 }
505 argc--;
506 argv++;
507 mGlobals.DiscoverFDImageName = argv[0];
508 ThingsToDo++;
509 } else if (strcmp (argv[0], "-baseaddr") == 0) {
510 //
511 // -baseaddr Addr
512 //
513 // Used to specify a base address when doing a discover of an FD image.
514 // Check for additional argument.
515 //
516 if (argc < 2) {
517 Error (NULL, 0, 0, argv[0], "option requires a base address");
518 return STATUS_ERROR;
519 }
520 argc--;
521 argv++;
522 if (tolower (argv[0][1]) == 'x') {
523 sscanf (argv[0] + 2, "%x", &mGlobals.BaseAddress);
524 } else {
525 sscanf (argv[0], "%d", &mGlobals.BaseAddress);
526 }
527 } else if (strcmp (argv[0], "-padvalue") == 0) {
528 //
529 // -padvalue Value
530 //
531 // Used to specify the value to pad with when aligning data while
532 // creating an FD image. Check for additional argument.
533 //
534 if (argc < 2) {
535 Error (NULL, 0, 0, argv[0], "option requires a byte value");
536 return STATUS_ERROR;
537 }
538 argc--;
539 argv++;
540 if (tolower (argv[0][1]) == 'x') {
541 sscanf (argv[0] + 2, "%x", &Temp);
542 mGlobals.MicrocodePadByteValue = (char) Temp;
543 } else {
544 sscanf (argv[0], "%d", &Temp);
545 mGlobals.MicrocodePadByteValue = (char) Temp;
546 }
547 } else if (strcmp (argv[0], "-align") == 0) {
548 //
549 // -align Alignment
550 //
551 // Used to specify how each data file is aligned in the region
552 // when creating an FD image. Check for additional argument.
553 //
554 if (argc < 2) {
555 Error (NULL, 0, 0, argv[0], "option requires an alignment");
556 return STATUS_ERROR;
557 }
558 argc--;
559 argv++;
560 if (tolower (argv[0][1]) == 'x') {
561 sscanf (argv[0] + 2, "%x", &mGlobals.MicrocodeAlignment);
562 } else {
563 sscanf (argv[0], "%d", &mGlobals.MicrocodeAlignment);
564 }
565 } else if (strcmp (argv[0], "-mcmerge") == 0) {
566 //
567 // -mcmerge FileName(s)
568 //
569 // Used to concatenate multiple microde binary files. Can specify
570 // multiple file names with the one -mcmerge flag. Check for additional argument.
571 //
572 if ((argc < 2) || (argv[1][0] == '-')) {
573 Error (NULL, 0, 0, argv[0], "option requires one or more input file names");
574 return STATUS_ERROR;
575 }
576 //
577 // Take input files until another option or end of list
578 //
579 ThingsToDo++;
580 while ((argc > 1) && (argv[1][0] != '-')) {
581 Str = (STRING_LIST *) _malloc (sizeof (STRING_LIST));
582 if (Str == NULL) {
583 Error (NULL, 0, 0, "memory allocation failure", NULL);
584 return STATUS_ERROR;
585 }
586 memset (Str, 0, sizeof (STRING_LIST));
587 Str->Str = argv[1];
588 if (mGlobals.MCIFileNames == NULL) {
589 mGlobals.MCIFileNames = Str;
590 } else {
591 mGlobals.LastMCIFileNames->Next = Str;
592 }
593 mGlobals.LastMCIFileNames = Str;
594 argc--;
595 argv++;
596 }
597 } else if (strcmp (argv[0], "-strsub") == 0) {
598 //
599 // -strsub SrcFile DestFile
600 //
601 // Used to perform string substitutions on a file, writing the result to a new
602 // file. Check for two additional arguments.
603 //
604 if (argc < 3) {
605 Error (NULL, 0, 0, argv[0], "option requires input and output file names for string substitution");
606 return STATUS_ERROR;
607 }
608 argc--;
609 argv++;
610 mGlobals.StringReplaceInFileName = argv[0];
611 argc--;
612 argv++;
613 mGlobals.StringReplaceOutFileName = argv[0];
614 ThingsToDo++;
615 } else {
616 Error (NULL, 0, 0, argv[0], "invalid option");
617 return STATUS_ERROR;
618 }
619 argc--;
620 argv++;
621 }
622 //
623 // If no outputs requested, then report an error
624 //
625 if (ThingsToDo == 0) {
626 Error (NULL, 0, 0, "nothing to do", NULL);
627 return STATUS_ERROR;
628 }
629 //
630 // If they want an asm file, #include file, or C file to be created, then they have to specify a
631 // flash device name and flash definition file name.
632 //
633 if ((mGlobals.CIncludeFileName != NULL) &&
634 ((mGlobals.FlashDevice == NULL) || (mGlobals.FlashDefinitionFileName == NULL))) {
635 Error (NULL, 0, 0, "must specify -flashdevice and -fdf with -hfile", NULL);
636 return STATUS_ERROR;
637 }
638 if ((mGlobals.AsmIncludeFileName != NULL) &&
639 ((mGlobals.FlashDevice == NULL) || (mGlobals.FlashDefinitionFileName == NULL))) {
640 Error (NULL, 0, 0, "must specify -flashdevice and -fdf with -asmincfile", NULL);
641 return STATUS_ERROR;
642 }
643 //
644 // If they want a dsc file to be created, then they have to specify a
645 // flash device name and a flash definition file name
646 //
647 if (mGlobals.DscFileName != NULL) {
648 if (mGlobals.FlashDevice == NULL) {
649 Error (NULL, 0, 0, "must specify -flashdevice with -dsc", NULL);
650 return STATUS_ERROR;
651 }
652 if (mGlobals.FlashDefinitionFileName == NULL) {
653 Error (NULL, 0, 0, "must specify -fdf with -dsc", NULL);
654 return STATUS_ERROR;
655 }
656 }
657 //
658 // If they specified an output microcode file name, then they have to specify an input
659 // file name, and vice versa.
660 //
661 if ((mGlobals.MCIFileName != NULL) && (mGlobals.MCOFileName == NULL)) {
662 Error (NULL, 0, 0, "must specify output microcode file name", NULL);
663 return STATUS_ERROR;
664 }
665 if ((mGlobals.MCOFileName != NULL) && (mGlobals.MCIFileName == NULL) && (mGlobals.MCIFileNames == NULL)) {
666 Error (NULL, 0, 0, "must specify input microcode file name", NULL);
667 return STATUS_ERROR;
668 }
669 //
670 // If doing merge, then have to specify output file name
671 //
672 if ((mGlobals.MCIFileNames != NULL) && (mGlobals.MCOFileName == NULL)) {
673 Error (NULL, 0, 0, "must specify output microcode file name", NULL);
674 return STATUS_ERROR;
675 }
676 //
677 // If they want an output image to be created, then they have to specify
678 // the flash device and the flash device image to use.
679 //
680 if (mGlobals.ImageOutFileName != NULL) {
681 if (mGlobals.FlashDevice == NULL) {
682 Error (NULL, 0, 0, "must specify -flashdevice with -imageout", NULL);
683 return STATUS_ERROR;
684 }
685 if (mGlobals.FlashDeviceImage == NULL) {
686 Error (NULL, 0, 0, "must specify -flashdeviceimage with -imageout", NULL);
687 return STATUS_ERROR;
688 }
689 if (mGlobals.FlashDefinitionFileName == NULL) {
690 Error (NULL, 0, 0, "must specify -c or -fdf with -imageout", NULL);
691 return STATUS_ERROR;
692 }
693 }
694 return STATUS_SUCCESS;
695 }
696
697 static
698 void
699 Usage (
700 VOID
701 )
702 /*++
703
704 Routine Description:
705 Print utility command line help
706
707 Arguments:
708 None
709
710 Returns:
711 NA
712
713 --*/
714 {
715 int i;
716 char *Msg[] = {
717 "Usage: FlashTool -fdf FlashDefFile -flashdevice FlashDevice",
718 " -flashdeviceimage FlashDeviceImage -mci MCIFile -mco MCOFile",
719 " -discover FDImage -dsc DscFile -asmincfile AsmIncFile",
720 " -imageOut ImageOutFile -hfile HFile -strsub InStrFile OutStrFile",
721 " -baseaddr BaseAddr -align Alignment -padvalue PadValue",
722 " -mcmerge MCIFile(s)",
723 " where",
724 " FlashDefFile - input Flash Definition File",
725 " FlashDevice - flash device to use (from flash definition file)",
726 " FlashDeviceImage - flash device image to use (from flash definition file)",
727 " MCIFile - input microcode file to parse",
728 " MCOFile - output binary microcode image to create from MCIFile",
729 " HFile - output #include file to create",
730 " FDImage - name of input FDImage file to scan",
731 " ImageOutFile - output image file to create",
732 " DscFile - output DSC file to create",
733 " AsmIncFile - output ASM include file to create",
734 " InStrFile - input file to replace symbol names, writing result to OutStrFile",
735 " BaseAddr - base address of FDImage (used with -discover)",
736 " Alignment - alignment to use when merging microcode binaries",
737 " PadValue - byte value to use as pad value when aligning microcode binaries",
738 " MCIFile(s) - one or more microcode binary files to merge/concatenate",
739 "",
740 NULL
741 };
742 for (i = 0; Msg[i] != NULL; i++) {
743 fprintf (stdout, "%s\n", Msg[i]);
744 }
745 }