AHCI: Fix hardware address gets in driver
authorFergus Simpson <afergs@google.com>
Mon, 17 Oct 2016 21:55:51 +0000 (14:55 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 18 Oct 2016 20:02:14 +0000 (16:02 -0400)
commitd99646f33edd092d073903cfe9b702aadff65f73
treee8f4437f729d30415e7e504019b05b73d9e1ae93
parentad5a27943f8ea8a6b44887f0c74822acb8c60a7c
AHCI: Fix hardware address gets in driver

The AHCI driver was using PCIWADDR(ptr) to get the physical address of
memory mapped structs, but only assinging it to the lower 32 bits of
any address field and setting the upper 32-bits to 0. AHCI's memory
mapped structs use 32-bit regsters so both halves are stored in
sequential registers.

This fix uses paddr_low32(ptr) and paddr_hgih32(ptr) to get both halves
of the address.

This should fix issues that occur when a memory mapped struct is outside
of the 32-bit address space.

Change-Id: I8e5ef62c580cc002510ccabadef9c2fcf0153bc8
Signed-off-by: Fergus Simpson <afergs@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/sdiahci.c