1/****************************************************************************** 2 * 3 * Module Name: asllisting - Listing file generation 4 * 5 *****************************************************************************/ 6 7/* 8 * Copyright (C) 2000 - 2012, Intel Corp. --- 121 unchanged lines hidden (view full) --- 130 void); 131 132static ACPI_STATUS 133LsTreeWriteWalk ( 134 ACPI_PARSE_OBJECT *Op, 135 UINT32 Level, 136 void *Context); 137 |
138static UINT32 139LsReadAmlOutputFile ( 140 UINT8 *Buffer); |
141 |
142 |
143/******************************************************************************* 144 * 145 * FUNCTION: LsTreeWriteWalk 146 * 147 * PARAMETERS: ASL_WALK_CALLBACK 148 * 149 * 150 * RETURN: None. --- 1130 unchanged lines hidden (view full) --- 1281 /* No other output types supported */ 1282 break; 1283 } 1284} 1285 1286 1287/******************************************************************************* 1288 * |
1289 * FUNCTION: LsReadAmlOutputFile 1290 * 1291 * PARAMETERS: Buffer - Where to return data 1292 * 1293 * RETURN: None. 1294 * 1295 * DESCRIPTION: Read a line of the AML output prior to formatting the data 1296 * 1297 ******************************************************************************/ 1298 1299static UINT32 1300LsReadAmlOutputFile ( 1301 UINT8 *Buffer) 1302{ 1303 UINT32 Actual; 1304 1305 1306 Actual = fread (Buffer, 1, HEX_TABLE_LINE_SIZE, 1307 Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); 1308 1309 if (ferror (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle)) 1310 { 1311 FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ); 1312 AslAbort (); 1313 } 1314 1315 return (Actual); 1316} 1317 1318 1319/******************************************************************************* 1320 * |
1321 * FUNCTION: LsDoHexOutputC 1322 * 1323 * PARAMETERS: None 1324 * 1325 * RETURN: None. 1326 * 1327 * DESCRIPTION: Create the hex output file. This is the same data as the AML 1328 * output file, but formatted into hex/ascii bytes suitable for --- 21 unchanged lines hidden (view full) --- 1350 FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n", 1351 AmlFileSize); 1352 FlPrintFile (ASL_FILE_HEX_OUTPUT, "unsigned char AmlCode[] =\n{\n"); 1353 1354 while (Offset < AmlFileSize) 1355 { 1356 /* Read enough bytes needed for one output line */ 1357 |
1358 LineLength = LsReadAmlOutputFile (FileData); |
1359 if (!LineLength) 1360 { 1361 break; 1362 } 1363 1364 FlPrintFile (ASL_FILE_HEX_OUTPUT, " "); 1365 1366 for (i = 0; i < LineLength; i++) --- 70 unchanged lines hidden (view full) --- 1437 FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n", 1438 AmlFileSize); 1439 FlPrintFile (ASL_FILE_HEX_OUTPUT, " Name (BUF1, Buffer()\n {\n"); 1440 1441 while (Offset < AmlFileSize) 1442 { 1443 /* Read enough bytes needed for one output line */ 1444 |
1445 LineLength = LsReadAmlOutputFile (FileData); |
1446 if (!LineLength) 1447 { 1448 break; 1449 } 1450 1451 FlPrintFile (ASL_FILE_HEX_OUTPUT, " "); 1452 1453 for (i = 0; i < LineLength; i++) --- 69 unchanged lines hidden (view full) --- 1523 FlPrintFile (ASL_FILE_HEX_OUTPUT, "; Assembly code source output\n"); 1524 FlPrintFile (ASL_FILE_HEX_OUTPUT, "; AML code block contains 0x%X bytes\n;\n", 1525 AmlFileSize); 1526 1527 while (Offset < AmlFileSize) 1528 { 1529 /* Read enough bytes needed for one output line */ 1530 |
1531 LineLength = LsReadAmlOutputFile (FileData); |
1532 if (!LineLength) 1533 { 1534 break; 1535 } 1536 1537 FlPrintFile (ASL_FILE_HEX_OUTPUT, " db "); 1538 1539 for (i = 0; i < LineLength; i++) --- 33 unchanged lines hidden --- |