[SeaBIOS] [PATCH] ahci: Set upper 32-bit registers to zero
Paolo Bonzini
pbonzini at redhat.com
Tue Jan 17 09:46:10 CET 2017
On 13/01/2017 10:48, Ladi Prosek wrote:
> 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.
>
> Signed-off-by: Ladi Prosek <lprosek at redhat.com>
> ---
> src/hw/ahci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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;
> }
Weird as it may seem, HBA reset doesn't clear the address fields
according to the spec.
Reviewed-by: Paolo Bonzini <pbonzini at redhat.com>
More information about the SeaBIOS
mailing list