AHCI: Prevent sign extension of partial address
authorFergus Simpson <afergs@google.com>
Thu, 20 Oct 2016 19:00:55 +0000 (12:00 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 20 Oct 2016 19:18:06 +0000 (15:18 -0400)
commitac67a8b3dfc0dd34909f32a90e2a9a8023b7b13c
tree8cd48f0e4416e236682317b4e2d418553f64c8c1
parente68a8934c7fd7520795a5c7a07674b3fafbfd38e
AHCI: Prevent sign extension of partial address

Drive reads were not working past the 1 TiB mark because the resulting
address was negative. This was determined to be an issue with an
unsigned char getting sign extended when bit shifted into an int64_t.
It is now cast to a uint32_t after the shift to prevent sign extension.
The container was also changed from int64_t to uint64_t.

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