@@ -39,12 +39,12 @@ PCIBridge::PCIBridge(std::string name) : PCIBridgeBase(name, PCI_HEADER_TYPE_1,
3939
4040 this ->pci_wr_memory_base = [this ](uint16_t val) {
4141 this ->memory_base = (val & this ->memory_cfg ) | (this ->memory_cfg & 15 );
42- this ->memory_base_32 = ((this ->memory_base & 0xfff0 ) << 16 );
42+ this ->memory_base_32 = ((( uint64_t ) this ->memory_base & 0xfff0 ) << 16 );
4343 };
4444
4545 this ->pci_wr_memory_limit = [this ](uint16_t val) {
4646 this ->memory_limit = (val & this ->memory_cfg ) | (this ->memory_cfg & 15 );
47- this ->memory_limit_32 = ((this ->memory_limit & 0xfff0 ) << 16 ) + 0x100000 ;
47+ this ->memory_limit_32 = ((( uint64_t ) this ->memory_limit & 0xfff0 ) << 16 ) + 0x100000 ;
4848 };
4949
5050 this ->pci_wr_io_base = [this ](uint8_t val) {
@@ -61,12 +61,13 @@ PCIBridge::PCIBridge(std::string name) : PCIBridgeBase(name, PCI_HEADER_TYPE_1,
6161 this ->pci_wr_pref_mem_base = [this ](uint16_t val) {
6262 this ->pref_mem_base = (val & this ->pref_mem_cfg ) | (this ->pref_mem_cfg & 15 );
6363 this ->pref_mem_base_64 = ((uint64_t )this ->pref_base_upper32 << 32 ) |
64- ((this ->pref_mem_base & 0xfff0 ) << 16 );
64+ ((( uint64_t ) this ->pref_mem_base & 0xfff0 ) << 16 );
6565 };
6666 this ->pci_wr_pref_mem_limit = [this ](uint16_t val) {
6767 this ->pref_mem_limit = (val & this ->pref_mem_cfg ) | (this ->pref_mem_cfg & 15 );
68- this ->pref_mem_limit_64 = (((uint64_t )this ->pref_limit_upper32 << 32 ) |
69- ((this ->pref_mem_limit & 0xfff0 ) << 16 )) + 0x100000 ;
68+ this ->pref_mem_limit_64 = (((uint64_t )this ->pref_limit_upper32 << 32 ) | \
69+ (((uint64_t )this ->pref_mem_limit & 0xfff0 ) << 16 )) + \
70+ 0x100000 ;
7071 };
7172 this ->pci_wr_io_base_upper16 = [this ](uint16_t val) {
7273 if ((this ->io_base & 15 ) == 1 )
@@ -85,14 +86,15 @@ PCIBridge::PCIBridge(std::string name) : PCIBridgeBase(name, PCI_HEADER_TYPE_1,
8586 if ((this ->pref_mem_cfg & 15 ) == 1 )
8687 this ->pref_base_upper32 = val;
8788 this ->pref_mem_base_64 = ((uint64_t )this ->pref_base_upper32 << 32 ) |
88- ((this ->pref_mem_base & 0xfff0 ) << 16 );
89+ ((( uint64_t ) this ->pref_mem_base & 0xfff0 ) << 16 );
8990 };
9091
9192 this ->pci_wr_pref_limit_upper32 = [this ](uint32_t val) {
9293 if ((this ->pref_mem_cfg & 15 ) == 1 )
9394 this ->pref_limit_upper32 = val;
94- this ->pref_mem_limit_64 = (((uint64_t )this ->pref_limit_upper32 << 32 ) |
95- ((this ->pref_mem_limit & 0xfff0 ) << 16 )) + 0x100000 ;
95+ this ->pref_mem_limit_64 = (((uint64_t )this ->pref_limit_upper32 << 32 ) | \
96+ (((uint64_t )this ->pref_mem_limit & 0xfff0 ) << 16 )) + \
97+ 0x100000 ;
9698 };
9799}
98100
0 commit comments