diff options
author | Gabe Black <gabeblack@google.com> | 2019-05-01 20:14:13 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-05-29 04:23:46 +0000 |
commit | 8666440499ef5b175b16efcf9d3a53f0583f0c45 (patch) | |
tree | 8fa4310dcd56908d5c8efbca3854c7444770c8e7 /src/arch/x86/system.cc | |
parent | d7c4cad240fd4f378d7362da5e9e44b9f0dd80d3 (diff) | |
download | gem5-8666440499ef5b175b16efcf9d3a53f0583f0c45.tar.xz |
arch, base, dev, sim: Remove now unnecessary casts from PortProxy methods.
Change-Id: Ia73b2d86a10d02fa09c924a4571477bb5f200eb7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18572
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/arch/x86/system.cc')
-rw-r--r-- | src/arch/x86/system.cc | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/arch/x86/system.cc b/src/arch/x86/system.cc index 3f44ece3a..2af9ff53c 100644 --- a/src/arch/x86/system.cc +++ b/src/arch/x86/system.cc @@ -141,8 +141,7 @@ X86System::initState() uint8_t numGDTEntries = 0; // Place holder at selector 0 uint64_t nullDescriptor = 0; - physProxy.writeBlob(GDTBase + numGDTEntries * 8, - (uint8_t *)(&nullDescriptor), 8); + physProxy.writeBlob(GDTBase + numGDTEntries * 8, &nullDescriptor, 8); numGDTEntries++; SegDescriptor initDesc = 0; @@ -167,8 +166,7 @@ X86System::initState() // it's beginning in memory and it's actual data, we'll use an // intermediary. uint64_t csDescVal = csDesc; - physProxy.writeBlob(GDTBase + numGDTEntries * 8, - (uint8_t *)(&csDescVal), 8); + physProxy.writeBlob(GDTBase + numGDTEntries * 8, (&csDescVal), 8); numGDTEntries++; @@ -180,8 +178,7 @@ X86System::initState() // 32 bit data segment SegDescriptor dsDesc = initDesc; uint64_t dsDescVal = dsDesc; - physProxy.writeBlob(GDTBase + numGDTEntries * 8, - (uint8_t *)(&dsDescVal), 8); + physProxy.writeBlob(GDTBase + numGDTEntries * 8, (&dsDescVal), 8); numGDTEntries++; @@ -200,8 +197,7 @@ X86System::initState() SegDescriptor tssDesc = initDesc; uint64_t tssDescVal = tssDesc; - physProxy.writeBlob(GDTBase + numGDTEntries * 8, - (uint8_t *)(&tssDescVal), 8); + physProxy.writeBlob(GDTBase + numGDTEntries * 8, (&tssDescVal), 8); numGDTEntries++; @@ -230,25 +226,22 @@ X86System::initState() // read/write, user, not present uint64_t pml4e = X86ISA::htog(0x6); for (int offset = 0; offset < (1 << PML4Bits) * 8; offset += 8) { - physProxy.writeBlob(PageMapLevel4 + offset, (uint8_t *)(&pml4e), 8); + physProxy.writeBlob(PageMapLevel4 + offset, (&pml4e), 8); } // Point to the only PDPT pml4e = X86ISA::htog(0x7 | PageDirPtrTable); - physProxy.writeBlob(PageMapLevel4, (uint8_t *)(&pml4e), 8); + physProxy.writeBlob(PageMapLevel4, (&pml4e), 8); // Page Directory Pointer Table // read/write, user, not present uint64_t pdpe = X86ISA::htog(0x6); - for (int offset = 0; offset < (1 << PDPTBits) * 8; offset += 8) { - physProxy.writeBlob(PageDirPtrTable + offset, - (uint8_t *)(&pdpe), 8); - } + for (int offset = 0; offset < (1 << PDPTBits) * 8; offset += 8) + physProxy.writeBlob(PageDirPtrTable + offset, &pdpe, 8); // Point to the PDTs for (int table = 0; table < NumPDTs; table++) { pdpe = X86ISA::htog(0x7 | PageDirTable[table]); - physProxy.writeBlob(PageDirPtrTable + table * 8, - (uint8_t *)(&pdpe), 8); + physProxy.writeBlob(PageDirPtrTable + table * 8, &pdpe, 8); } // Page Directory Tables @@ -259,8 +252,7 @@ X86System::initState() for (int offset = 0; offset < (1 << PDTBits) * 8; offset += 8) { // read/write, user, present, 4MB uint64_t pdte = X86ISA::htog(0x87 | base); - physProxy.writeBlob(PageDirTable[table] + offset, - (uint8_t *)(&pdte), 8); + physProxy.writeBlob(PageDirTable[table] + offset, &pdte, 8); base += pageSize; } } |