第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Linux 64位BAR編程

Linux 64位BAR編程

海綿寶寶撒 2021-04-05 16:13:22
PCI橋支持32/64首選項(xiàng)/無(wú)首選項(xiàng):pci_bus 0000:00: root bus resource [bus 00-ff]pci_bus 0000:00: root bus resource [io  0x0000-0xffff] pci_bus 0000:00: root bus resource [mem 0x1000000000-0x10ffffffff] (bus address [0x00000000-0xffffffff])pci_bus 0000:00: root bus resource [mem 0x1100000000-0x11ffffffff pref] (bus address [0x00000000-0xffffffff])pci_bus 0000:00: root bus resource [mem 0x2000000000-0x2fffffffff] (bus address [0x00000000-0xfffffffff])pci_bus 0000:00: root bus resource [mem 0x3000000000-0x3fffffffff pref] (bus  address [0x00000000-0xfffffffff])掃描具有2條BAR的端點(diǎn):pci 0000:01:00.0: BAR 2: assigned [mem 0x2100000000-0x211fffffff 64bit pref]pci 0000:01:00.0: BAR 0: assigned [mem 0x1000000000-0x100007ffff]橋顯示了窗口:pci 0000:00:00.0: PCI bridge to [bus 01]pci 0000:00:00.0:   bridge window [mem 0x1000000000-0x10000fffff]pci 0000:00:00.0:   bridge window [mem 0x2100000000-0x211fffffff 64bit pref]端點(diǎn)總結(jié)了BAR:endpoint: BAR 0 addr = 0x1000000000, size = 524287endpoint: BAR 1 addr = 0x2100000000, size = 536870911BAR1的高32位將被編程為什么?我預(yù)期為0x21,但找到0x1。這是因?yàn)閜cibios_bus_to_resource / pcibios_resource_to_bus。它標(biāo)識(shí)了3個(gè)窗口偏移:window->res->start = 1000000000 window->offset = 1000000000 window->res->end = 10FFFFFFFFwindow->res->start = 1100000000 window->offset = 1100000000 window->res->end = 11FFFFFFFFwindow->res->start = 2000000000 window->offset = 2000000000 window->res->end = 2FFFFFFFFF當(dāng)顯示上面的地址時(shí),它會(huì)增加偏移量,而在端點(diǎn)中對(duì)BAR寄存器進(jìn)行編程時(shí),則將其減去。因此0x2100000000變?yōu)?x100000000。使用64位地址和32位BAR可能會(huì)有意義,但是為什么使用64位BAR會(huì)正確呢?
查看完整描述

1 回答

?
慕森卡

TA貢獻(xiàn)1806條經(jīng)驗(yàn) 獲得超8個(gè)贊

據(jù)此(取自問(wèn)題):


    pci_bus 0000:00: root bus resource [mem 0x1000000000-0x10ffffffff] (bus address [0x00000000-0xffffffff])

    pci_bus 0000:00: root bus resource [mem 0x1100000000-0x11ffffffff pref] (bus address [0x00000000-0xffffffff])

    pci_bus 0000:00: root bus resource [mem 0x2000000000-0x2fffffffff] (bus address [0x00000000-0xfffffffff])

    pci_bus 0000:00: root bus resource [mem 0x3000000000-0x3fffffffff pref] (bus  address [0x00000000-0xfffffffff])

存儲(chǔ)器地址0x20'0000'0000對(duì)應(yīng)于總線地址0。


因此,如果要使用存儲(chǔ)器地址0x21'0000'0000訪問(wèn)該設(shè)備中的BAR,則需要將其編程為0x1'0000'0000。


同樣,存儲(chǔ)器地址0x10'0000'0000對(duì)應(yīng)于總線地址0。因此,設(shè)備中的BAR被編程為0,可以使用存儲(chǔ)器地址0x10'0000'0000進(jìn)行訪問(wèn)。


查看完整回答
反對(duì) 回復(fù) 2021-04-16
  • 1 回答
  • 0 關(guān)注
  • 422 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)