* [ECOS] Re: cyg_io_init problems
@ 2000-09-07 4:19 Joerg Troeger
2000-09-07 5:19 ` Carl van Schaik
0 siblings, 1 reply; 5+ messages in thread
From: Joerg Troeger @ 2000-09-07 4:19 UTC (permalink / raw)
To: ecos-discuss
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
Carl,
this is caused by aligning all HAL tables in the brandnew version.
All table entries are aligned to multiples of 8
(see hal_tables.h, f.i. CYG_HAL_TABLE_TYPE).
Unfortunately cyg_devtab_entry_t is of size 0x1c! The simple
"t++" doesn't respect the alignment and doesn't point
correctly to the 2nd entry after incrementing.
I have added a structure member "unsigned long dummy"
at the end of cyg_deventry_t in devtab.h (aligning the structure
to have size 0x20, so "t++" is correct).
Jörg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Re: cyg_io_init problems
2000-09-07 4:19 [ECOS] Re: cyg_io_init problems Joerg Troeger
@ 2000-09-07 5:19 ` Carl van Schaik
2000-09-07 7:12 ` Jesper Skov
0 siblings, 1 reply; 5+ messages in thread
From: Carl van Schaik @ 2000-09-07 5:19 UTC (permalink / raw)
To: Ecos Mailing List
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
> Carl,
>
> this is caused by aligning all HAL tables in the brandnew version.
> All table entries are aligned to multiples of 8
> (see hal_tables.h, f.i. CYG_HAL_TABLE_TYPE).
>
> Unfortunately cyg_devtab_entry_t is of size 0x1c! The simple
> "t++" doesn't respect the alignment and doesn't point
> correctly to the 2nd entry after incrementing.
>
> I have added a structure member "unsigned long dummy"
> at the end of cyg_deventry_t in devtab.h (aligning the structure
> to have size 0x20, so "t++" is correct).
>
> Jörg
This works, but there is still a problem:
It only compiles correctly from a clean compile
once you start working on files and recompiling, the offset is messed up
again.
Carl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Re: cyg_io_init problems
2000-09-07 5:19 ` Carl van Schaik
@ 2000-09-07 7:12 ` Jesper Skov
2000-09-07 7:42 ` Carl van Schaik
0 siblings, 1 reply; 5+ messages in thread
From: Jesper Skov @ 2000-09-07 7:12 UTC (permalink / raw)
To: Carl van Schaik; +Cc: Ecos Mailing List
>>>>> "Carl" == Carl van Schaik <carl@leg.uct.ac.za> writes:
Carl> This works, but there is still a problem: It only compiles
Carl> correctly from a clean compile once you start working on files
Carl> and recompiling, the offset is messed up again.
Please try this patch instead. It should fix the problem properly.
Jesper
Index: ChangeLog
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/io/common/current/ChangeLog,v
retrieving revision 1.29
diff -u -5 -r1.29 ChangeLog
--- ChangeLog 2000/09/04 18:12:14 1.29
+++ ChangeLog 2000/09/07 12:34:57
@@ -1,5 +1,9 @@
+2000-09-07 Jesper Skov <jskov@redhat.com>
+
+ * include/devtab.h (cyg_devtab_entry_t): Fix syntax problem.
+
2000-09-04 Jonathan Larmour <jlarmour@redhat.com>
* include/devtab.h (cyg_devtab_entry_t): Apply CYG_HAL_TABLE_TYPE
2000-08-01 Jonathan Larmour <jlarmour@redhat.co.uk>
Index: include/devtab.h
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/io/common/current/include/devtab.h,v
retrieving revision 1.8
diff -u -5 -r1.8 devtab.h
--- include/devtab.h 2000/09/04 18:12:14 1.8
+++ include/devtab.h 2000/09/07 12:11:01
@@ -130,11 +130,11 @@
Cyg_ErrNo (*lookup)(struct cyg_devtab_entry **tab,
struct cyg_devtab_entry *sub_tab,
const char *name);
void *priv;
unsigned long status;
-} cyg_devtab_entry_t CYG_HAL_TABLE_TYPE;
+} CYG_HAL_TABLE_TYPE cyg_devtab_entry_t;
#define CYG_DEVTAB_STATUS_AVAIL 0x0001
#define CYG_DEVTAB_STATUS_CHAR 0x1000
#define CYG_DEVTAB_STATUS_BLOCK 0x2000
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Re: cyg_io_init problems
2000-09-07 7:12 ` Jesper Skov
@ 2000-09-07 7:42 ` Carl van Schaik
2000-09-10 20:41 ` Jonathan Larmour
0 siblings, 1 reply; 5+ messages in thread
From: Carl van Schaik @ 2000-09-07 7:42 UTC (permalink / raw)
To: Ecos Mailing List
On 7 Sep 2000, Jesper Skov wrote:
> >>>>> "Carl" == Carl van Schaik <carl@leg.uct.ac.za> writes:
>
> Carl> This works, but there is still a problem: It only compiles
> Carl> correctly from a clean compile once you start working on files
> Carl> and recompiling, the offset is messed up again.
> Please try this patch instead. It should fix the problem properly.
The patch does not make a difference. (neither did the other one with the
dummy function)
It seems that certain programs work and others do not, (some of the tests
crash on startup, some run fine)
It looks like the offset before where the code appears is not being
aligned properly.
Carl van Schaik <carl@leg.uct.ac.za>
-----------------------------------------------------
Dept. Electrical Engineering, UCT
621 Menzies Building
University of Cape Town
Rondebosch
Western Cape
7700
South Africa
Tel: +27 21 650-3467
Fax: +27 21 650-3465
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Re: cyg_io_init problems
2000-09-07 7:42 ` Carl van Schaik
@ 2000-09-10 20:41 ` Jonathan Larmour
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2000-09-10 20:41 UTC (permalink / raw)
To: Carl van Schaik; +Cc: Ecos Mailing List
Carl van Schaik wrote:
>
> On 7 Sep 2000, Jesper Skov wrote:
>
> > >>>>> "Carl" == Carl van Schaik <carl@leg.uct.ac.za> writes:
> >
> > Carl> This works, but there is still a problem: It only compiles
> > Carl> correctly from a clean compile once you start working on files
> > Carl> and recompiling, the offset is messed up again.
>
> > Please try this patch instead. It should fix the problem properly.
>
> The patch does not make a difference. (neither did the other one with the
> dummy function)
There are now a fixed (I hope!) set of sources available from anonymous
CVS. Please give those a try.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2000-09-10 20:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-07 4:19 [ECOS] Re: cyg_io_init problems Joerg Troeger
2000-09-07 5:19 ` Carl van Schaik
2000-09-07 7:12 ` Jesper Skov
2000-09-07 7:42 ` Carl van Schaik
2000-09-10 20:41 ` Jonathan Larmour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).