diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-06 15:05:27 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-06 15:57:15 +0200 |
commit | 0b3fc2e09f09f13c79b4b7b04f8097ce9253b692 (patch) | |
tree | 349f23c5de3bcf529288a36cd04e7f2d52653008 /fw_cfg.c | |
parent | 14b459a6f9c9c02a0901a8a3de5e7c706305ffdd (diff) | |
download | qboot-0b3fc2e09f09f13c79b4b7b04f8097ce9253b692.zip qboot-0b3fc2e09f09f13c79b4b7b04f8097ce9253b692.tar.gz qboot-0b3fc2e09f09f13c79b4b7b04f8097ce9253b692.tar.bz2 |
use fw_cfg DMA for fw_cfg_read
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'fw_cfg.c')
-rw-r--r-- | fw_cfg.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -88,6 +88,15 @@ void fw_cfg_dma(int control, void *buf, int len) } } +void fw_cfg_read(void *buf, int len) +{ + if (version & FW_CFG_VERSION_DMA) { + fw_cfg_dma(FW_CFG_DMA_CTL_READ, buf, len); + } else { + insb(buf, FW_CFG_DATA, len); + } +} + void fw_cfg_read_entry(int e, void *buf, int len) { @@ -99,7 +108,7 @@ fw_cfg_read_entry(int e, void *buf, int len) fw_cfg_dma(control, buf, len); } else { fw_cfg_select(e); - fw_cfg_read(buf, len); + insb(buf, FW_CFG_DATA, len); } } |