CAD CAM EDM DRO - Yahoo Group Archive

New kids, gets all the beating !

on 1999-07-16 07:15:30 UTC
Hi, - I guess I should have kept my mouth shut !

I really have a lot to answer for now !

THE 486:

I don't know much about this - and I am guessing a bit:

I have not studied the 486chip, - but I believe it is a little
different. Frederick M. Proctor wrote a paper - "Using Shared Memory
in Real-Time Linux". ( You can download it from NIST )
He has written some sample application programs ( download shmex.tgz
)

Well, I tried almost everything, but I always got some trouble with
shared memory with the EMC programs, - so I tried something more
simple: the shmex programs. But it didn't work. ( It still don't
work )

In his final page in his paper, he is giving thanks to a Mr. Rich
Bowser for information on the 486 memory problem. I don't know
anything about what this is all about, other than - I conclude that
there is something peculiar with the 486. ( enough said )

1. I installed RH5.2 - kernel 2.0.36 the normal way
2. Added the release_09J and compiled
3. Run lilo, with the added lines in lilo.conf
4. added to my /etc/rc.d/rc.local file:
/sbin/insmod /usr/src/rtl/modules/rtl_sched
/sbin/insmod /usr/src/rtl/modules/rtl_fifo
5. Run "frank" - the rt fifo example
- So long, so good.
6. Then I changed #define EXEC_PAGESIZE 4096
to 1024 in /usr/src/linux/include/asm-i386/param.h
- I did not compile my kernel with it !! ( well, 98% sure - I
could have )

7.

A little break:

The RTLinux is not any realtime OS ! [ just a look a like :-) ]
They have a very small "subroutine", a small kernel that lives it's
own life, just like an interrupt routine, that ticks and goes. The
modules you load, hooks into this piece, and get some time to run.
The OS, - the normal Linux, does the same thing. The have not done
anything to Linux, they just steal some processor time.

Then comes the shared memory, a piece of memory that neither the
RTkernel nor the Linux OS will touch. You have put an upper limit in
the lilo.conf. To use this memory, you have to apply special
instructions from both sides, i.e. the RTkernel and the Linux OS.
To put it into simple and stupid words: its like a printer
connected to your computer, - the computer put something out to a
port register, - and the printer will poll some bits to see if there
is something for it to grab. The point is, they are completely
separate units. They just share the port register.
With just a cable to this one place, it is easy. With shared
memory, they have to know where to find what.

I sent all the info about my memory to the NIST guys, but in the end
I found out that their numbers was wrong.

I guess that the memory is like with the old DOS. 640K base memory
- but above that you have bios, add on cards, display, etc. - up to
1Mb. You have to subtract this.
I had 24Mb ram -> times 1024 = 24576 Kb
Take away the bottom 1M - 1024 Kb
---------------------------------
I have now 23552 Kb
( This is also what the bios counts up on a cold boot: 640K base,
23552K extended memory )

Now, we don't have 4M pages as on a pentium, just 1M, - but we must
set aside somewhat less,
and it has to be on a "even" binary size : I took off 256Kb, i.e.
1024 - 256 = 768Kb.

Ok, I will put aside 768Kb for the shared memory pool. ( F.Proctor
told me the EMC only needed about 500Kb )

I set the upper limit: 23552Kb - 768Kb = 22784Kb times 1024 =
23330816 converted to hexadecimal,
gives me 1640000. This will be my upper memory limit.

In C language, you express the hexadecimal numbers as 0x1640000.

Ok, back in lilo.conf:

append="mem=0x1640000"

8.
Now, the EMC software has to know where this shared memory begins.

- in stepper.ini > set SHMEM_BASE_ADDRESS = 0x1640000
- in stepper.run > insmod -f plat/rtlinux_09J/steppermod.o
SHMEM_BASE_ADDRESS=0x1640000 PARPORT_IO_ADDRESS=0x378
( note: all on one line, not like this )

==============================================================
Now try to crank it !

Just a note:

Some of You may be familiar with the editor in Borlands Pascal, C,
SideKick or what ever.
Use the editor called joe. All you have to do is cntrl K, D - and
it will save the file.
Instead of doing all chmod, chown and other stuff, - just do:

cp stepper.run mystuff.run
joe mystuff.run
edit the things you would like to do, and save it.

then just run the file: ./mystuff.run

Something else:

The file you just made, with your changes, does the following
thing: It overrides the shared memory
addresses that the EMC were compiled with, when you did ./install
or ./compile. You don't have to do anything with them.


GOOD LUCK !

( is there any nice looking miss school teacher out there ? I sure
would like to learn the language better ! )
========================================================================

//ARNE

Discussion Thread

Arne Chr. Jorgensen 1999-07-16 07:15:30 UTC New kids, gets all the beating !