* Re: Unaligned accesses
2001-07-25 20:41 ` alvin
@ 2001-07-25 21:08 ` Christopher C. Chimelis
2001-07-25 21:15 ` Michal Jaegermann
` (2 subsequent siblings)
3 siblings, 0 replies; 20+ messages in thread
From: Christopher C. Chimelis @ 2001-07-25 21:08 UTC (permalink / raw)
To: axp-list
On Wed, 25 Jul 2001, alvin wrote:
> Ahhhhhhhh the light goes on. Silly me I thought that since I have seen
> messages and fixing the code makes them go away that all the problems
> were tagged. Any quick pointer to the rule that is used for deciding
> what to flag and not?
The relevant code is in arch/alpha/kernel/traps.c in the linux kernel
tree. It should be easy to modify, if you want to try that. Expect the
logging flood gates to open, though. I've crippled a few systems by
enabling the printing of every unaligned access (driver debugging...no
fun).
C
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: Unaligned accesses
2001-07-25 20:41 ` alvin
2001-07-25 21:08 ` Christopher C. Chimelis
@ 2001-07-25 21:15 ` Michal Jaegermann
2001-07-26 12:39 ` Ivan Kokshaysky
2001-07-26 12:40 ` Ivan Kokshaysky
2001-07-26 13:29 ` Jay Estabrook
3 siblings, 1 reply; 20+ messages in thread
From: Michal Jaegermann @ 2001-07-25 21:15 UTC (permalink / raw)
To: axp-list
On Wed, Jul 25, 2001 at 03:41:33PM -0500, alvin wrote:
>
> I am running out of time before my holidays so I will not be able to
> verify this but my feeling is that if there are a number of unaligned
> accesses that are back to back that is when the code breaks.
If you are compiling that only with gcc then '__attribute__ ((packed))'
on various structures will force gcc to generate a much more
careful access code - for a price, of course. Try '-S' flag and
see for yourself. :-) OTOH I really never tried that with arrays.
Michal
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Unaligned accesses
2001-07-25 21:15 ` Michal Jaegermann
@ 2001-07-26 12:39 ` Ivan Kokshaysky
0 siblings, 0 replies; 20+ messages in thread
From: Ivan Kokshaysky @ 2001-07-26 12:39 UTC (permalink / raw)
To: axp-list
On Wed, Jul 25, 2001 at 03:15:09PM -0600, Michal Jaegermann wrote:
> If you are compiling that only with gcc then '__attribute__ ((packed))'
> on various structures will force gcc to generate a much more
> careful access code - for a price, of course.
Using memcpy() with constant size is fine as well, and is portable.
Modern GCC (>= 2.95) generates quite a good inline code for this.
Ivan.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Unaligned accesses
2001-07-25 20:41 ` alvin
2001-07-25 21:08 ` Christopher C. Chimelis
2001-07-25 21:15 ` Michal Jaegermann
@ 2001-07-26 12:40 ` Ivan Kokshaysky
2001-07-26 13:29 ` Jay Estabrook
3 siblings, 0 replies; 20+ messages in thread
From: Ivan Kokshaysky @ 2001-07-26 12:40 UTC (permalink / raw)
To: axp-list
On Wed, Jul 25, 2001 at 03:41:33PM -0500, alvin wrote:
> > It generates some informational messages, but not one for every
> > unaligned access (if it did, there'd be a flood for the more serious
> > transgressors).
>
> Ahhhhhhhh the light goes on. Silly me I thought that since I have seen
> messages and fixing the code makes them go away that all the problems
> were tagged. Any quick pointer to the rule that is used for deciding
> what to flag and not?
To prevent a flood, the rate of "unaligned trap" messages is limited
to 4 messages in 5 ms.
Good place to look for unaligned traps is /proc/cpuinfo. There are
counts for kernel/user unaligned accesses and address of the
instruction caused last trap.
> > So, a little more about the problem you saw, and the machine you are
> > running on, please...
>
> I am running this on 2 systems a UP1100(last to show the problem) and a
> noname.
Note that unaligned "short int" accesses are special. In the code
compiled for ev4/ev5 (i.e. without byte/word extensions) they do not
generate unaligned traps and hence cannot be fixed by kernel. So if
the short int falls into the adjacent quadwords (addr & 7 == 7),
you'll have silent data corruption.
Ivan.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Unaligned accesses
2001-07-25 20:41 ` alvin
` (2 preceding siblings ...)
2001-07-26 12:40 ` Ivan Kokshaysky
@ 2001-07-26 13:29 ` Jay Estabrook
2001-07-26 17:21 ` alvin
3 siblings, 1 reply; 20+ messages in thread
From: Jay Estabrook @ 2001-07-26 13:29 UTC (permalink / raw)
To: axp-list
On Wed, Jul 25, 2001 at 03:41:33PM -0500, alvin wrote:
>
> Any quick pointer to the rule that is used for deciding
> what to flag and not?
I think it is more of a "print max of 4 every so many seconds", rather
than a decision... ;-}
As Chris said, the pertinent code is in arch/alpha/kernel/traps.c
> but my feeling is that if there are a number of unaligned
> accesses that are back to back that is when the code breaks.
>
> The effect that I am seeing is that a 2 byte variable is not getting
> both bytes updated reliably. This problem appears or goes away depending
> on the alignment of the data.
>
>
> > So, a little more about the problem you saw, and the machine you are
> > running on, please...
>
> I am running this on 2 systems a UP1100(last to show the problem) and a
> noname.
> They are running serial consoles with RedHat 6.2 and kernel version:
>
> Linux version 2.2.19-6.2.1 (root@sws1) (gcc version egcs-2.91.66
> 19990314/Linux (egcs-1.1.2 release)) #6 Thu Jul 5 02:22:34 EDT 2001
OK; first off, you'll not get the EGCS 1.1.2 compiler fixed for this, if
it turns out to be the compiler's fault.
Second, if you can make a small test program that shows the problem under
EGCS, then we can do two things:
1. suggest work-around code for EGCS
2. test the latest compilers to make sure that it is fixed in them
Good luck.
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: Unaligned accesses
2001-07-26 13:29 ` Jay Estabrook
@ 2001-07-26 17:21 ` alvin
2001-07-26 18:45 ` Frank Palmieri
2001-07-27 2:17 ` 164SX memory Eric Brown
0 siblings, 2 replies; 20+ messages in thread
From: alvin @ 2001-07-26 17:21 UTC (permalink / raw)
To: axp-list
Jay Estabrook wrote:
>
> On Wed, Jul 25, 2001 at 03:41:33PM -0500, alvin wrote:
[snip]
>
> OK; first off, you'll not get the EGCS 1.1.2 compiler fixed for this, if
> it turns out to be the compiler's fault.
>
> Second, if you can make a small test program that shows the problem under
> EGCS, then we can do two things:
>
> 1. suggest work-around code for EGCS
> 2. test the latest compilers to make sure that it is fixed in them
I am not wedded to egcs-1.1.2. I guess I will have to look for the
latest release of egcs/gcc.
> Good luck.
>
> --Jay++
>
> -----------------------------------------------------------------------------
> Jay A Estabrook Alpha Engineering - LINUX Project
> Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
> 200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
> -----------------------------------------------------------------------------
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
--
Alvin Starr || voice: (416)785-4051
Interlink Connectivity || fax: (416)785-3668
alvin@iplink.net ||
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Unaligned accesses
2001-07-26 17:21 ` alvin
@ 2001-07-26 18:45 ` Frank Palmieri
2001-07-27 2:17 ` 164SX memory Eric Brown
1 sibling, 0 replies; 20+ messages in thread
From: Frank Palmieri @ 2001-07-26 18:45 UTC (permalink / raw)
To: axp-list
Alvin:
There was a uac utility with Digital Unix that could control how unaligned
accesses were handled. Here's a little program that spawns a shell with the
fixup's disabled. When you run your program it will halt instead of doing
the fixups and you can then eliminate them. Note this can be "tedious" and
some programs such as emacs spew out unaligned accesses so be careful what
you run. Note also this code is old and I haven't used it in a while so it
may need a bit of rework but gives a place to start.
Frank
--------------------------------------------------
#include <asm/sysinfo.h>
#include <asm/unistd.h>
static int setsysinfo( unsigned long op, void *buffer, unsigned long size,
int *
start, void *arg, unsigned long flag )
{
syscall( __NR_osf_setsysinfo, op, buffer, size, start, arg, flag );
}
void trap_unaligned(void)
{
unsigned int buf[2];
buf[0] = SSIN_UACPROC;
buf[1] = UAC_SIGBUS | UAC_NOPRINT;
setsysinfo( SSI_NVPAIRS, buf, 1, 0, 0, 0 );
}
int main( int ac )
{
trap_unaligned();
printf("Creating a subshell with SIGBUS setting!\n" );
execl("/bin/bash", "/bin/bash", (char *)0);
return(0);
}
^ permalink raw reply [flat|nested] 20+ messages in thread* 164SX memory
2001-07-26 17:21 ` alvin
2001-07-26 18:45 ` Frank Palmieri
@ 2001-07-27 2:17 ` Eric Brown
2001-07-27 4:48 ` kirk uriksun
2001-07-27 5:18 ` Maurice Hilarius
1 sibling, 2 replies; 20+ messages in thread
From: Eric Brown @ 2001-07-27 2:17 UTC (permalink / raw)
To: axp-list
I feel like giving my 164SX some more RAM. Unfortunately, I've forgotten
what type of RAM it requires. Can someone tell me what type is required?
Thanks,
Eric
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 164SX memory
2001-07-27 2:17 ` 164SX memory Eric Brown
@ 2001-07-27 4:48 ` kirk uriksun
2001-07-27 5:18 ` Maurice Hilarius
1 sibling, 0 replies; 20+ messages in thread
From: kirk uriksun @ 2001-07-27 4:48 UTC (permalink / raw)
To: axp-list
Eric,
No prob, its not particularly special: PC100 ECC (or
in your case, non-ECC is also supported) unbuffered
3.3 volt CAS2/CAS3 SDRAM. This is a Pyxis 21174
chipset requirement, even though the Pyxis chipset
locks the frequency of the system bus to a 66MHz
frequency and you COULD use PC66 memory as a result.
However, PC100 memory (go to http://www.crucial.com
and buy memory from the "Intel - 440BX" selections)
and you'll get the PC100 memory selections for
everything up to 256MB modules (the largest supported
on the low-end Pyxis based machines, including SX, LX
and the Samsung/Deskstation UX/BX). You'll note these
are MUCH cheaper and higher quality parts (much newer
part numbers in a volume part) speced well above the
"tested" PC66 memory you'll find under the "Digital -
Personal Workstation" group (these are Pyxis based
machines with board very similar to the LX/SX boards,
though PWS has 2 more DIMM sockets and two PCI buses).
I have 2 LX boxes, both using Crucial 256MB modules of
the PC100 CAS2 (7ns) type. They have performed very
well despite repeated overclocking experiments,
including jacking up the Pyxis bus successfully to
75MHz (but never to 83.5, unfortunately, that will
require more significant soldering work).
Good luck,
--Kirk
--- Eric Brown <ericbr@oz.net> wrote:
> I feel like giving my 164SX some more RAM.
> Unfortunately, I've forgotten
> what type of RAM it requires. Can someone tell me
> what type is required?
>
> Thanks,
> Eric
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 164SX memory
2001-07-27 2:17 ` 164SX memory Eric Brown
2001-07-27 4:48 ` kirk uriksun
@ 2001-07-27 5:18 ` Maurice Hilarius
2001-08-06 9:59 ` Iso-H
1 sibling, 1 reply; 20+ messages in thread
From: Maurice Hilarius @ 2001-07-27 5:18 UTC (permalink / raw)
To: axp-list
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
With regards to your message at 08:17 PM 7/26/01, Eric Brown. Where you stated:
>I feel like giving my 164SX some more RAM. Unfortunately, I've forgotten
>what type of RAM it requires. Can someone tell me what type is required?
SDRAM DIMMs, PC100, ECC, unbuffered.
ECC is not mandatory, but is more reliable.
However do not mix ECC with non-ECC.
[-- Attachment #2: Maurice Hilarius.vcf --]
[-- Type: text/x-vcard, Size: 462 bytes --]
BEGIN:VCARD
VERSION:2.1
N:Hilarius;Maurice
FN:Maurice Hilarius
ORG:Hard Data Ltd.
TITLE:President
TEL;WORK;BUSINESS:780-456-9771
TEL;WORK;VOICE:780-456-9771
TEL;WORK;CELL:780-906-7359
TEL;WORK;FAX:780-456-9772
ADR;WORK:;;11060 - 166 Avenue;Edmonton;AB;T5X1Y3;Canada
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:11060-166 Avenue=0D=0AEdmonton, AB T5X1Y3=0D=0ACanada
URL;WORK:http://www.harddata.com
EMAIL;PREF;INTERNET:maurice@harddata.com
REV:20010222T231737Z
END:VCARD
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
With our best regards,
Maurice W. Hilarius Telephone: 01-780-456-9771
Hard Data Ltd. FAX: 01-780-456-9772
11060 - 166 Avenue mailto:maurice@harddata.com
Edmonton, AB, Canada http://www.harddata.com/
T5X 1Y3
--> Now Shipping Dual Processor Athlon DDR RAM Systems! <-
--> Ask me about our New Alpha DDR Systems! <-
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: 164SX memory
2001-07-27 5:18 ` Maurice Hilarius
@ 2001-08-06 9:59 ` Iso-H
2001-08-06 12:33 ` Rich Payne
0 siblings, 1 reply; 20+ messages in thread
From: Iso-H @ 2001-08-06 9:59 UTC (permalink / raw)
To: axp-list
On Thu, 26 Jul 2001, Maurice Hilarius wrote:
> With regards to your message at 08:17 PM 7/26/01, Eric Brown. Where you stated:
> >I feel like giving my 164SX some more RAM. Unfortunately, I've forgotten
> >what type of RAM it requires. Can someone tell me what type is required?
> SDRAM DIMMs, PC100, ECC, unbuffered.
> ECC is not mandatory, but is more reliable.
> However do not mix ECC with non-ECC.
I tried to use single sided 128MB DIMMs (Hyundai HY57V28820HCT-H)
but they didn't work?! Do I have to upgrade AlphaBIOS/SRM
or is it totally impossible to use these DIMMs?
I have 164SX's original AlphaBIOS version (5.62-1 ??)
>
Iso-H
--
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 164SX memory
2001-08-06 9:59 ` Iso-H
@ 2001-08-06 12:33 ` Rich Payne
2001-08-06 12:52 ` Iso-H
0 siblings, 1 reply; 20+ messages in thread
From: Rich Payne @ 2001-08-06 12:33 UTC (permalink / raw)
To: axp-list
On Mon, 6 Aug 2001, Iso-H wrote:
> On Thu, 26 Jul 2001, Maurice Hilarius wrote:
>
> > With regards to your message at 08:17 PM 7/26/01, Eric Brown. Where you stated:
> > >I feel like giving my 164SX some more RAM. Unfortunately, I've forgotten
> > >what type of RAM it requires. Can someone tell me what type is required?
> > SDRAM DIMMs, PC100, ECC, unbuffered.
> > ECC is not mandatory, but is more reliable.
> > However do not mix ECC with non-ECC.
>
> I tried to use single sided 128MB DIMMs (Hyundai HY57V28820HCT-H)
> but they didn't work?! Do I have to upgrade AlphaBIOS/SRM
> or is it totally impossible to use these DIMMs?
> I have 164SX's original AlphaBIOS version (5.62-1 ??)
Changing the AlphaBIOS won't help you. Did you put in a pair of DIMMs (not
just one)? If so then I'd say the SX doesn't like that memory.
--rdp
--
Rich Payne
rpayne@alphalinux.org www.alphalinux.org
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 164SX memory
2001-08-06 12:33 ` Rich Payne
@ 2001-08-06 12:52 ` Iso-H
0 siblings, 0 replies; 20+ messages in thread
From: Iso-H @ 2001-08-06 12:52 UTC (permalink / raw)
To: axp-list
On Mon, 6 Aug 2001, Rich Payne wrote:
> On Mon, 6 Aug 2001, Iso-H wrote:
>
> > On Thu, 26 Jul 2001, Maurice Hilarius wrote:
> >
> > > With regards to your message at 08:17 PM 7/26/01, Eric Brown. Where you stated:
> > > >I feel like giving my 164SX some more RAM. Unfortunately, I've forgotten
> > > >what type of RAM it requires. Can someone tell me what type is required?
> > > SDRAM DIMMs, PC100, ECC, unbuffered.
> > > ECC is not mandatory, but is more reliable.
> > > However do not mix ECC with non-ECC.
> >
> > I tried to use single sided 128MB DIMMs (Hyundai HY57V28820HCT-H)
> > but they didn't work?! Do I have to upgrade AlphaBIOS/SRM
> > or is it totally impossible to use these DIMMs?
> > I have 164SX's original AlphaBIOS version (5.62-1 ??)
>
> Changing the AlphaBIOS won't help you. Did you put in a pair of DIMMs (not
Yes.
> just one)? If so then I'd say the SX doesn't like that memory.
Probably so. Perhaps I have to try to get double sided
DIMMs ...
>
> --rdp
>
> --
> Rich Payne
> rpayne@alphalinux.org www.alphalinux.org
>
>
Iso-H
--
^ permalink raw reply [flat|nested] 20+ messages in thread