aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2017-01-13 10:48:29 +0100
committerKevin O'Connor <kevin@koconnor.net>2017-01-17 10:12:07 -0500
commit106543deb447c4005f9a9845f1f43a72547f6209 (patch)
tree77cc7cd19144d0ea41aeca021b2d6c3f0070e355
parent9332965e1c46ddf4e19d7050f1e957a195c703fa (diff)
downloadseabios-hppa-106543deb447c4005f9a9845f1f43a72547f6209.zip
seabios-hppa-106543deb447c4005f9a9845f1f43a72547f6209.tar.gz
seabios-hppa-106543deb447c4005f9a9845f1f43a72547f6209.tar.bz2
ahci: Set upper 32-bit registers to zero
If the HBA supports 64-bit addressing, the registers may contain non-zero values, for example after reboot as a leftover from the OS driving the adapter. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Ladi Prosek <lprosek@redhat.com>
-rw-r--r--src/hw/ahci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index 261a7d2..2eee192 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -361,6 +361,11 @@ ahci_port_alloc(struct ahci_ctrl_s *ctrl, u32 pnr)
ahci_port_writel(ctrl, pnr, PORT_LST_ADDR, (u32)port->list);
ahci_port_writel(ctrl, pnr, PORT_FIS_ADDR, (u32)port->fis);
+ if (ctrl->caps & HOST_CAP_64) {
+ ahci_port_writel(ctrl, pnr, PORT_LST_ADDR_HI, 0);
+ ahci_port_writel(ctrl, pnr, PORT_FIS_ADDR_HI, 0);
+ }
+
return port;
}