Am 10.07.2013 21:17 schrieb Stefan Tauner:
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
diff --git a/flash.h b/flash.h index ba93245..9e787c0 100644 --- a/flash.h +++ b/flash.h @@ -41,7 +41,8 @@ #define ERROR_OOM -100 #define TIMEOUT_ERROR -101
-typedef unsigned long chipaddr; +/* TODO: check using code for correct usage of types */ +typedef uintptr_t chipaddr;
This looks too good to be viable. I have a bad feeling about this in the context of 64-bit resources on x86 (32bit), but drivers accessing resources shouldn't be using chipaddr anyway.. That said, it should not result in any breakage on 32bit platforms. We may see pretty explosions once we start supporting the x32 pseudo-arch. But that will need an audit of the codebase anyway.
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Regards, Carl-Daniel
On Sat, 13 Jul 2013 18:07:22 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
This looks too good to be viable. I have a bad feeling about this in the context of 64-bit resources on x86 (32bit), but drivers accessing resources shouldn't be using chipaddr anyway.. That said, it should not result in any breakage on 32bit platforms. We may see pretty explosions once we start supporting the x32 pseudo-arch. But that will need an audit of the codebase anyway.
What kind of 64b resources are you thinking about here?
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Thanks, r1698.
Am 14.07.2013 01:32 schrieb Stefan Tauner:
On Sat, 13 Jul 2013 18:07:22 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
This looks too good to be viable. I have a bad feeling about this in the context of 64-bit resources on x86 (32bit), but drivers accessing resources shouldn't be using chipaddr anyway.. That said, it should not result in any breakage on 32bit platforms. We may see pretty explosions once we start supporting the x32 pseudo-arch. But that will need an audit of the codebase anyway.
What kind of 64b resources are you thinking about here?
64-bit PCI memory BARs. Those can exist on x86_64 systems running x86 flashrom. But AFAICS that PCI code is not affected by this change.
Regards, Carl-Daniel