MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / Usage

Function Usage

BaseTools/Source/C/GenPage/GenPage.c:93–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93VOID
94Usage (
95 void
96 )
97{
98 printf ("Usage: GenPage.exe [options] EfiLoaderImageName \n\n\
99Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.\n\n\
100 Utility to generate the EfiLoader image containing a page table.\n\n\
101optional arguments:\n\
102 -h, --help Show this help message and exit\n\
103 --version Show program's version number and exit\n\
104 -d [DEBUG], --debug [DEBUG]\n\
105 Output DEBUG statements, where DEBUG_LEVEL is 0 (min)\n\
106 - 9 (max)\n\
107 -v, --verbose Print informational statements\n\
108 -q, --quiet Returns the exit code, error messages will be\n\
109 displayed\n\
110 -s, --silent Returns only the exit code; informational and error\n\
111 messages are not displayed\n\
112 -o OUTPUT_FILENAME, --output OUTPUT_FILENAME\n\
113 Output file contain both the non-page table part and\n\
114 the page table\n\
115 -b BASE_ADDRESS, --baseaddr BASE_ADDRESS\n\
116 The page table location\n\
117 -f OFFSET, --offset OFFSET\n\
118 The position that the page table will appear in the\n\
119 output file\n\
120 --sfo Reserved for future use\n");
121
122}
123
124void *
125CreateIdentityMappingPageTables (
126 void
127 )
128/*++
129
130Routine Description:
131 To create 4G PAE 2M pagetable
132
133Return:
134 void * - buffer containing created pagetable
135
136--*/
137{
138 UINT64 PageAddress;
139 UINT8 *PageTable;
140 UINT8 *PageTablePtr;
141 int PML4Index;
142 int PDPTEIndex;
143 int PDEIndex;
144 X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K *PageMapLevel4Entry;
145 X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K *PageDirectoryPointerEntry;
146 X64_PAGE_TABLE_ENTRY_2M *PageDirectoryEntry2MB;
147
148 PageTable = (void *)malloc (EFI_PAGE_NUMBER * EFI_SIZE_OF_PAGE);
149 if (PageTable == NULL) {
150 Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");

Callers 3

mainFunction · 0.70
GenCrc32.cFile · 0.50
GenFv.cFile · 0.50

Calls 10

printfFunction · 0.85
fopenFunction · 0.85
fcloseFunction · 0.85
freadFunction · 0.85
fwriteFunction · 0.85
mallocFunction · 0.50
ErrorFunction · 0.50
memsetFunction · 0.50
LongFilePathFunction · 0.50

Tested by

no test coverage detected