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