mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
![]() Update the assignment of various physical memory buffers used by the SATA controller to explicitly be denoted as physical addresses. The memory is identity-mapped, so these function calls are a nop, but they provide good semantic documentation for any maintainers. The return value of virt_to_phys() is 'unsigned long'. On machines where sizeof(unsigned long) != sizeof(pointer), a cast through (uintptr_t) is needed to appease the compiler due to the potential of losing the upper 32 bits of the address. In compilation this scenario, a physical address could be 64-bits, yet the C pointer environment only allows 32-bit addresses; the constraint is that pointers cannot address more than 4Gb of memory and if virt_to_phys() ever returns an out-of-range value for the physical address, there are issues with emmory mapping which must be solved. However, since the memory is identify mappeed, there is no problem introducing the cast: the original pointer will reside in 32-bits, so the physical address will also be within in 32-bits. Signed-off-by: Taylor Hutt <thutt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
||
---|---|---|
.. | ||
ahci.c | ||
ata_piix.c | ||
ata_piix.h | ||
dwc_ahsata.c | ||
dwc_ahsata.h | ||
fsl_sata.c | ||
fsl_sata.h | ||
ftide020.c | ||
ftide020.h | ||
libata.c | ||
Makefile | ||
mvsata_ide.c | ||
mxc_ata.c | ||
pata_bfin.c | ||
pata_bfin.h | ||
sata_dwc.c | ||
sata_dwc.h | ||
sata_sil.c | ||
sata_sil.h | ||
sata_sil3114.c | ||
sata_sil3114.h | ||
sil680.c | ||
sym53c8xx.c | ||
systemace.c |