Author: jakllsch Date: Sun May 22 17:39:25 2011 New Revision: 6608 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6608
Log: Ensure ck804 romstrap is 16-byte aligned. This alignment seems to be necessary for the chip to recognize it.
Signed-off-by: Jonathan Kollasch jakllsch@kollasch.net Acked-by: Jonathan Kollasch jakllsch@kollasch.net
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc ============================================================================== --- trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 00:18:59 2011 (r6607) +++ trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 17:39:25 2011 (r6608) @@ -21,6 +21,7 @@ .section ".romstrap", "a", @progbits
+ .align 4 .globl __romstrap_start __romstrap_start: rstables:
On 5/22/11 8:39 AM, repository service wrote:
Author: jakllsch Date: Sun May 22 17:39:25 2011 New Revision: 6608 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6608
Log: Ensure ck804 romstrap is 16-byte aligned. This alignment seems to be necessary for the chip to recognize it.
Signed-off-by: Jonathan Kollaschjakllsch@kollasch.net Acked-by: Jonathan Kollaschjakllsch@kollasch.net
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
--- trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 00:18:59 2011 (r6607) +++ trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 17:39:25 2011 (r6608) @@ -21,6 +21,7 @@ .section ".romstrap", "a", @progbits
- .align 4
Shouldn't this be .align 16 then?
On Sun, May 22, 2011 at 12:25:37PM -0700, Stefan Reinauer wrote:
On 5/22/11 8:39 AM, repository service wrote:
Author: jakllsch Date: Sun May 22 17:39:25 2011 New Revision: 6608 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6608
Log: Ensure ck804 romstrap is 16-byte aligned. This alignment seems to be necessary for the chip to recognize it.
Signed-off-by: Jonathan Kollaschjakllsch@kollasch.net Acked-by: Jonathan Kollaschjakllsch@kollasch.net
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
--- trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 00:18:59 2011 (r6607) +++ trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 17:39:25 2011 (r6608) @@ -21,6 +21,7 @@ .section ".romstrap", "a", @progbits
- .align 4
Shouldn't this be .align 16 then?
The as(1) info page says it's in bits on x86.
Jonathan Kollasch
On 5/22/11 1:02 PM, Jonathan A. Kollasch wrote:
On Sun, May 22, 2011 at 12:25:37PM -0700, Stefan Reinauer wrote:
On 5/22/11 8:39 AM, repository service wrote:
Author: jakllsch Date: Sun May 22 17:39:25 2011 New Revision: 6608 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6608
Log: Ensure ck804 romstrap is 16-byte aligned. This alignment seems to be necessary for the chip to recognize it.
Signed-off-by: Jonathan Kollaschjakllsch@kollasch.net Acked-by: Jonathan Kollaschjakllsch@kollasch.net
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
--- trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 00:18:59 2011 (r6607) +++ trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 17:39:25 2011 (r6608) @@ -21,6 +21,7 @@ .section ".romstrap", "a", @progbits
- .align 4
Shouldn't this be .align 16 then?
The as(1) info page says it's in bits on x86.
Jonathan Kollasch
Oh does it? This used to be only the case for i386 + a.out. It seems at least the coreboot reference compiler assumes those are bytes.
Stefan Reinauer wrote:
]>>> + .align 4 ]>> Shouldn't this be .align 16 then? ]> The as(1) info page says it's in bits on x86. ]> ]> Jonathan Kollasch ]> ]Oh does it? This used to be only the case for i386 + a.out. It seems at ]least the coreboot reference compiler assumes those are bytes.
It's easy enough to check. I changed the value from 4 to 5:
romstrap.inc:24: Error: alignment not a power of 2
Thanks, Scott
Did you check the output file? In my tests a .align 4 aligned to 4 bytes not 16.
Sent from my mobile phone
On 22.05.2011, at 19:18, "Scott Duplichan" scott@notabs.org wrote:
Stefan Reinauer wrote:
]>>> + .align 4 ]>> Shouldn't this be .align 16 then? ]> The as(1) info page says it's in bits on x86. ]> ]> Jonathan Kollasch ]> ]Oh does it? This used to be only the case for i386 + a.out. It seems at ]least the coreboot reference compiler assumes those are bytes.
It's easy enough to check. I changed the value from 4 to 5:
romstrap.inc:24: Error: alignment not a power of 2
Thanks, Scott
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Sun, May 22, 2011 at 12:25:37PM -0700, Stefan Reinauer wrote:
On 5/22/11 8:39 AM, repository service wrote:
Author: jakllsch Date: Sun May 22 17:39:25 2011 New Revision: 6608 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6608
Log: Ensure ck804 romstrap is 16-byte aligned. This alignment seems to be necessary for the chip to recognize it.
Signed-off-by: Jonathan Kollaschjakllsch@kollasch.net Acked-by: Jonathan Kollaschjakllsch@kollasch.net
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
--- trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 00:18:59 2011 (r6607) +++ trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 17:39:25 2011 (r6608) @@ -21,6 +21,7 @@ .section ".romstrap", "a", @progbits
- .align 4
Shouldn't this be .align 16 then?
I've been told that I probably wanted .p2align or .balign, so as to avoid the pitfalls of .align having different meanings on various assemblers/architectures.
Anyone have a preference for one or the other?
Jonathan Kollasch
* Jonathan A. Kollasch jakllsch@kollasch.net [110523 12:52]:
On Sun, May 22, 2011 at 12:25:37PM -0700, Stefan Reinauer wrote:
On 5/22/11 8:39 AM, repository service wrote:
Author: jakllsch Date: Sun May 22 17:39:25 2011 New Revision: 6608 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6608
Log: Ensure ck804 romstrap is 16-byte aligned. This alignment seems to be necessary for the chip to recognize it.
Signed-off-by: Jonathan Kollaschjakllsch@kollasch.net Acked-by: Jonathan Kollaschjakllsch@kollasch.net
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
Modified: trunk/src/southbridge/nvidia/ck804/romstrap.inc
--- trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 00:18:59 2011 (r6607) +++ trunk/src/southbridge/nvidia/ck804/romstrap.inc Sun May 22 17:39:25 2011 (r6608) @@ -21,6 +21,7 @@ .section ".romstrap", "a", @progbits
- .align 4
Shouldn't this be .align 16 then?
I've been told that I probably wanted .p2align or .balign, so as to avoid the pitfalls of .align having different meanings on various assemblers/architectures.
Anyone have a preference for one or the other?
I believe we use .align everywhere else in the code, so I think we should stick to that. We can't compile coreboot for an a.out target anyways..
Stefan