[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Clock & "unaligned trap" problems

On Sun 25 Oct 1998, Falk Hueffner wrote:

> - While booting, there's an error message "hwclock is unable to get
> I/O port access". The time is then set to year 2018 (but the correct
> day). Is this a kernel problem?

Yes, your kernel doesn't have "enhanced realtime clock support"
selected. This is a must IMHO on Alpha.

> - When using my favourite shell "zsh", I get "unaligned trap"
> warnings. What are these? How can I get rid of them?

This means that the code is doing incorrect accesses. These are trapped
by the kernel, and emulated (which is much slower).  However, everything
works OK, so it's not a critical problem.

On Alpha, if you want to access a 4-byte data type (e.g. int), the
address at which you access it must be a multiple of 4. If you want to
access a 8-byte data type (e.g. pointer), the address must be a multiple
of 8. For 2-byte values, the address must be a multiple of 2, and for
1-byte values, it doesn't matter. So, this is wrong (real-life example):

    x = *(long *)&array_of_chars[0];
    y = *(long *)&array_of_chars[4];

You will get a trap on the second line.

> Also, I wonder why there is no apt for Alpha. Is it just that nobody

I've never looked at apt...

Paul Slootman
home: paul@wurtel.demon.nl | work: paul@murphy.nl | debian: paul@debian.org
http://www.wurtel.demon.nl | Murphy Software,   Enschede,   the Netherlands

Reply to: