Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
r58459 r58466 81 81 82 82 /** 83 Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise 83 Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise 84 84 OR, and writes the result back to the 8-bit I/O port. 85 85 … … 147 147 Writes Value to the bit field of the I/O register. The bit field is specified 148 148 by the StartBit and the EndBit. All other bits in the destination I/O 149 register are preserved. The value written to the I/O port is returned. 149 register are preserved. The value written to the I/O port is returned. 150 150 151 151 If 8-bit I/O port operations are not supported, then ASSERT(). … … 349 349 If 16-bit I/O port operations are not supported, then ASSERT(). 350 350 If Port is not aligned on a 16-bit boundary, then ASSERT(). 351 351 352 352 @param Port The I/O port to write. 353 353 @param AndData The value to AND with the read value from the I/O port. … … 367 367 368 368 /** 369 Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise 369 Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise 370 370 OR, and writes the result back to the 16-bit I/O port. 371 371 … … 379 379 If 16-bit I/O port operations are not supported, then ASSERT(). 380 380 If Port is not aligned on a 16-bit boundary, then ASSERT(). 381 381 382 382 @param Port The I/O port to write. 383 383 @param AndData The value to AND with the read value from the I/O port. … … 660 660 661 661 /** 662 Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise 662 Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise 663 663 OR, and writes the result back to the 32-bit I/O port. 664 664 … … 953 953 954 954 /** 955 Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise 955 Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise 956 956 OR, and writes the result back to the 64-bit I/O port. 957 957 … … 1191 1191 result back to the 8-bit MMIO register. 1192 1192 1193 Reads the 8-bit MMIO register specified by Address, performs a bitwise 1193 Reads the 8-bit MMIO register specified by Address, performs a bitwise 1194 1194 OR between the read result and the value specified by OrData, and 1195 1195 writes the result to the 8-bit MMIO register specified by Address. The value … … 1244 1244 1245 1245 /** 1246 Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise 1246 Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise 1247 1247 OR, and writes the result back to the 8-bit MMIO register. 1248 1248 … … 1348 1348 writes the result back to the bit field in the 8-bit MMIO register. 1349 1349 1350 Reads the 8-bit MMIO register specified by Address, performs a bitwise 1350 Reads the 8-bit MMIO register specified by Address, performs a bitwise 1351 1351 OR between the read result and the value specified by OrData, and 1352 1352 writes the result to the 8-bit MMIO register specified by Address. The value … … 1478 1478 result back to the 16-bit MMIO register. 1479 1479 1480 Reads the 16-bit MMIO register specified by Address, performs a bitwise 1480 Reads the 16-bit MMIO register specified by Address, performs a bitwise 1481 1481 OR between the read result and the value specified by OrData, and 1482 1482 writes the result to the 16-bit MMIO register specified by Address. The value … … 1533 1533 1534 1534 /** 1535 Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise 1535 Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise 1536 1536 OR, and writes the result back to the 16-bit MMIO register. 1537 1537 … … 1639 1639 writes the result back to the bit field in the 16-bit MMIO register. 1640 1640 1641 Reads the 16-bit MMIO register specified by Address, performs a bitwise 1641 Reads the 16-bit MMIO register specified by Address, performs a bitwise 1642 1642 OR between the read result and the value specified by OrData, and 1643 1643 writes the result to the 16-bit MMIO register specified by Address. The value … … 1772 1772 result back to the 32-bit MMIO register. 1773 1773 1774 Reads the 32-bit MMIO register specified by Address, performs a bitwise 1774 Reads the 32-bit MMIO register specified by Address, performs a bitwise 1775 1775 OR between the read result and the value specified by OrData, and 1776 1776 writes the result to the 32-bit MMIO register specified by Address. The value … … 1827 1827 1828 1828 /** 1829 Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise 1829 Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise 1830 1830 OR, and writes the result back to the 32-bit MMIO register. 1831 1831 … … 1933 1933 writes the result back to the bit field in the 32-bit MMIO register. 1934 1934 1935 Reads the 32-bit MMIO register specified by Address, performs a bitwise 1935 Reads the 32-bit MMIO register specified by Address, performs a bitwise 1936 1936 OR between the read result and the value specified by OrData, and 1937 1937 writes the result to the 32-bit MMIO register specified by Address. The value … … 2066 2066 result back to the 64-bit MMIO register. 2067 2067 2068 Reads the 64-bit MMIO register specified by Address, performs a bitwise 2068 Reads the 64-bit MMIO register specified by Address, performs a bitwise 2069 2069 OR between the read result and the value specified by OrData, and 2070 2070 writes the result to the 64-bit MMIO register specified by Address. The value … … 2121 2121 2122 2122 /** 2123 Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise 2123 Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise 2124 2124 OR, and writes the result back to the 64-bit MMIO register. 2125 2125 … … 2227 2227 writes the result back to the bit field in the 64-bit MMIO register. 2228 2228 2229 Reads the 64-bit MMIO register specified by Address, performs a bitwise 2229 Reads the 64-bit MMIO register specified by Address, performs a bitwise 2230 2230 OR between the read result and the value specified by OrData, and 2231 2231 writes the result to the 64-bit MMIO register specified by Address. The value -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/IoLib.c
r48674 r58466 127 127 If 16-bit I/O port operations are not supported, then ASSERT(). 128 128 If Port is not aligned on a 16-bit boundary, then ASSERT(). 129 129 130 130 @param Port The I/O port to write. 131 131 @param Value The value to write to the I/O port. … … 164 164 If 32-bit I/O port operations are not supported, then ASSERT(). 165 165 If Port is not aligned on a 32-bit boundary, then ASSERT(). 166 166 167 167 @param Port The I/O port to read. 168 168 … … 198 198 If 32-bit I/O port operations are not supported, then ASSERT(). 199 199 If Port is not aligned on a 32-bit boundary, then ASSERT(). 200 200 201 201 @param Port The I/O port to write. 202 202 @param Value The value to write to the I/O port. … … 338 338 @param Address The MMIO register to write. 339 339 @param Value The value to write to the MMIO register. 340 340 341 341 @return Value. 342 342 … … 407 407 @param Address The MMIO register to write. 408 408 @param Value The value to write to the MMIO register. 409 409 410 410 @return Value. 411 411 … … 479 479 @param Address The MMIO register to write. 480 480 @param Value The value to write to the MMIO register. 481 481 482 482 @return Value. 483 483 -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c
r48674 r58466 25 25 Copy data from MMIO region to system memory by using 8-bit access. 26 26 27 Copy data from MMIO region specified by starting address StartAddress 28 to system memory specified by Buffer by using 8-bit access. The total 27 Copy data from MMIO region specified by starting address StartAddress 28 to system memory specified by Buffer by using 8-bit access. The total 29 29 number of byte to be copied is specified by Length. Buffer is returned. 30 31 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 30 31 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 32 32 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 33 33 … … 52 52 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 53 53 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); 54 54 55 55 ReturnBuffer = Buffer; 56 56 57 57 while (Length-- != 0) { 58 58 *(Buffer++) = MmioRead8 (StartAddress++); … … 65 65 Copy data from MMIO region to system memory by using 16-bit access. 66 66 67 Copy data from MMIO region specified by starting address StartAddress 68 to system memory specified by Buffer by using 16-bit access. The total 67 Copy data from MMIO region specified by starting address StartAddress 68 to system memory specified by Buffer by using 16-bit access. The total 69 69 number of byte to be copied is specified by Length. Buffer is returned. 70 70 71 71 If StartAddress is not aligned on a 16-bit boundary, then ASSERT(). 72 72 73 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 73 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 74 74 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 75 75 … … 95 95 96 96 ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); 97 97 98 98 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 99 99 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); … … 101 101 ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); 102 102 ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); 103 103 104 104 ReturnBuffer = Buffer; 105 105 106 106 while (Length != 0) { 107 107 *(Buffer++) = MmioRead16 (StartAddress); … … 116 116 Copy data from MMIO region to system memory by using 32-bit access. 117 117 118 Copy data from MMIO region specified by starting address StartAddress 119 to system memory specified by Buffer by using 32-bit access. The total 118 Copy data from MMIO region specified by starting address StartAddress 119 to system memory specified by Buffer by using 32-bit access. The total 120 120 number of byte to be copied is specified by Length. Buffer is returned. 121 121 122 122 If StartAddress is not aligned on a 32-bit boundary, then ASSERT(). 123 123 124 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 124 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 125 125 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 126 126 … … 146 146 147 147 ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); 148 148 149 149 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 150 150 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); … … 152 152 ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); 153 153 ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); 154 154 155 155 ReturnBuffer = Buffer; 156 156 157 157 while (Length != 0) { 158 158 *(Buffer++) = MmioRead32 (StartAddress); … … 167 167 Copy data from MMIO region to system memory by using 64-bit access. 168 168 169 Copy data from MMIO region specified by starting address StartAddress 170 to system memory specified by Buffer by using 64-bit access. The total 169 Copy data from MMIO region specified by starting address StartAddress 170 to system memory specified by Buffer by using 64-bit access. The total 171 171 number of byte to be copied is specified by Length. Buffer is returned. 172 172 173 173 If StartAddress is not aligned on a 64-bit boundary, then ASSERT(). 174 174 175 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 175 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 176 176 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 177 177 … … 197 197 198 198 ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); 199 199 200 200 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 201 201 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); … … 203 203 ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); 204 204 ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); 205 205 206 206 ReturnBuffer = Buffer; 207 207 208 208 while (Length != 0) { 209 209 *(Buffer++) = MmioRead64 (StartAddress); … … 219 219 Copy data from system memory to MMIO region by using 8-bit access. 220 220 221 Copy data from system memory specified by Buffer to MMIO region specified 222 by starting address StartAddress by using 8-bit access. The total number 221 Copy data from system memory specified by Buffer to MMIO region specified 222 by starting address StartAddress by using 8-bit access. The total number 223 223 of byte to be copied is specified by Length. Buffer is returned. 224 225 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 224 225 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 226 226 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT(). 227 227 … … 246 246 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 247 247 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); 248 248 249 249 ReturnBuffer = (UINT8 *) Buffer; 250 250 251 251 while (Length-- != 0) { 252 252 MmioWrite8 (StartAddress++, *(Buffer++)); … … 254 254 255 255 return ReturnBuffer; 256 256 257 257 } 258 258 … … 260 260 Copy data from system memory to MMIO region by using 16-bit access. 261 261 262 Copy data from system memory specified by Buffer to MMIO region specified 263 by starting address StartAddress by using 16-bit access. The total number 262 Copy data from system memory specified by Buffer to MMIO region specified 263 by starting address StartAddress by using 16-bit access. The total number 264 264 of byte to be copied is specified by Length. Buffer is returned. 265 265 266 266 If StartAddress is not aligned on a 16-bit boundary, then ASSERT(). 267 267 268 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 268 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 269 269 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT(). 270 270 … … 291 291 292 292 ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); 293 293 294 294 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 295 295 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); … … 299 299 300 300 ReturnBuffer = (UINT16 *) Buffer; 301 301 302 302 while (Length != 0) { 303 303 MmioWrite16 (StartAddress, *(Buffer++)); 304 304 305 305 StartAddress += sizeof (UINT16); 306 306 Length -= sizeof (UINT16); … … 314 314 Copy data from system memory to MMIO region by using 32-bit access. 315 315 316 Copy data from system memory specified by Buffer to MMIO region specified 317 by starting address StartAddress by using 32-bit access. The total number 316 Copy data from system memory specified by Buffer to MMIO region specified 317 by starting address StartAddress by using 32-bit access. The total number 318 318 of byte to be copied is specified by Length. Buffer is returned. 319 319 320 320 If StartAddress is not aligned on a 32-bit boundary, then ASSERT(). 321 321 322 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 322 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 323 323 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT(). 324 324 … … 345 345 346 346 ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); 347 347 348 348 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 349 349 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); … … 353 353 354 354 ReturnBuffer = (UINT32 *) Buffer; 355 355 356 356 while (Length != 0) { 357 357 MmioWrite32 (StartAddress, *(Buffer++)); 358 358 359 359 StartAddress += sizeof (UINT32); 360 360 Length -= sizeof (UINT32); … … 367 367 Copy data from system memory to MMIO region by using 64-bit access. 368 368 369 Copy data from system memory specified by Buffer to MMIO region specified 370 by starting address StartAddress by using 64-bit access. The total number 369 Copy data from system memory specified by Buffer to MMIO region specified 370 by starting address StartAddress by using 64-bit access. The total number 371 371 of byte to be copied is specified by Length. Buffer is returned. 372 372 373 373 If StartAddress is not aligned on a 64-bit boundary, then ASSERT(). 374 374 375 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 375 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 376 376 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT(). 377 377 … … 398 398 399 399 ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); 400 400 401 401 ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); 402 402 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); … … 406 406 407 407 ReturnBuffer = (UINT64 *) Buffer; 408 408 409 409 while (Length != 0) { 410 410 MmioWrite64 (StartAddress, *(Buffer++)); 411 411 412 412 StartAddress += sizeof (UINT64); 413 413 Length -= sizeof (UINT64); -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf
r58459 r58466 35 35 IoLib.c 36 36 IoLibMmioBuffer.c 37 37 38 38 [Packages] 39 39 MdePkg/MdePkg.dec
Note:
See TracChangeset
for help on using the changeset viewer.