Luke Gorrie | 2 Aug 2004 09:51

Bits and pieces

Ahoy,

It's probably more fun to talk about Movitz on the mailing list than
hassling Frode directly, so -

I want to make Erlang operating systems using Movitz as the kernel.
For fun I'm hoping to write some very-small operating systems in the
style of Per Brinch Hansen's "Architecture of Concurrent Programming"
book. (I can highly recommend that book for inspiration in writing
small-as-in-feasible operating systems, not that I've done so yet.
Cheap on bookfinder.com.)

Anyway. I've got a working compiler from Erlang to Lisp and I've used
it to write a "hello world" ErlangOS. But it currently only handles
the sequential subset of Erlang and that's not going to impress my
friends. So I need to add support for concurrency.

I think a nice way to do this would be to have Lisp-level coroutines
as the building block. It looks like this is mostly written in Movitz
but I'm not sure if it's finished (couldn't figure out how to use it).
I'm looking at functions like COPY-CONTROL-STACK,
CLONE-RUN-TIME-CONTEXT, and SWITCH-TO-CONTEXT.

Is that stuff usable? If not, what needs to be done?

Ideally I would like coroutines to have variable-size stacks (growing
and shrinking on demand), but that's not so important - I'll take
anything I can get :-)

I'd also like to do some VGA hacks. Is there any example code?
(Continue reading)

Luke Gorrie | 2 Aug 2004 10:14

Hardware requirements?

Another thing,

Is it right that Movitz should be able to boot and do basic VGA stuff
on basically any computer, include modern laptops?

I can't find my floppy drive to test this.

Frode Vatvedt Fjeld | 2 Aug 2004 11:48

Re: Hardware requirements?

Luke Gorrie <luke <at> bluetail.com> writes:

> Is it right that Movitz should be able to boot and do basic VGA stuff
> on basically any computer, include modern laptops?

Yes, if by "computer" you mean "x86 PC" :-)

> I can't find my floppy drive to test this.

There is of course the bootloader issue. The simple, built-in (floppy
only) bootloder seems to work on many PCs (such as Robert Strandhs
laptop in Oslo, for one random example), but then again I seem to
remember some report that it didn't work on some toshiba laptop. The
Grub loader is probably safer, it seems they managed to break Grub for
386 again, so it's not entirely rock solid either.

--

-- 
Frode Vatvedt Fjeld

Frode Vatvedt Fjeld | 2 Aug 2004 12:05

Re: Bits and pieces

Luke Gorrie <luke <at> bluetail.com> writes:

> Anyway. I've got a working compiler from Erlang to Lisp and I've
> used it to write a "hello world" ErlangOS. But it currently only
> handles the sequential subset of Erlang and that's not going to
> impress my friends. So I need to add support for concurrency.

Yes, this is something I'm hoping to be able to do in the
not-too-distant future too (a few months).

> I think a nice way to do this would be to have Lisp-level coroutines
> as the building block. It looks like this is mostly written in
> Movitz but I'm not sure if it's finished (couldn't figure out how to
> use it).  I'm looking at functions like COPY-CONTROL-STACK,
> CLONE-RUN-TIME-CONTEXT, and SWITCH-TO-CONTEXT.
>
> Is that stuff usable? If not, what needs to be done?

It's not usabel as-is. Copy-control-stack I wrote quite recently, as a
debugging tool actually, but it'll clearly become a concurrency
primitive also. Clone-run-time-context and switch-to-context I wrote
quite a while ago trying to get some threads going, but I stopped that
work for some reasone I don't remember. This means they are incomplete
and possibly a bit outdated wrt. the changes in the run-time-context
since then.

If you want to try and make this stuff work properly for threads or
coroutines or whatever, please do :) It probably requires you to
figure out how the bits and pices of the run-time-context and
associated structures fit together, but there's nothing really
(Continue reading)

Frode Vatvedt Fjeld | 9 Aug 2004 12:19

Re: The reactions of gc to hard-drive reads

Elliott <ejohnson <at> kvpt.org> writes:

> Yep I poped in there and adjusted the value.  Changing 16000 to
> 65537 on line 192 of los0-gc.lisp allows for 256 sectors to be read
> or writen.  I can now handle 131kb of data to and from disk, plus
> run out of memory a lot faster. :) I'll if I can raise the amount of
> memory seen by los0

Just thought I'd mention that this has been fixed for a few weeks
now. That is, los0-gc is able to work with semi-spaces of practically
any size, and the default action of the los0 image should be to split
the machine's available memory in two and do stop-and-copy between
these parts. (Although still there's no decent code to detect memory
other than the ancient bios method, which is restricted to 64 MB, but
this should be trivial to fix once the good detection mechanism
identified). And allcating buffers of a few megabytes should therefore
be unproblematic now.

--

-- 
Frode Vatvedt Fjeld

James Crippen | 13 Aug 2004 08:45
Picon

Segmentation

Is segmentation in use anywhere in Movitz, or is it just talked about
in the manual? And if so, where's the code that sets it up?

Frode Vatvedt Fjeld | 13 Aug 2004 11:07

Re: Segmentation

James Crippen <jcrippen <at> gmail.com> writes:

> Is segmentation in use anywhere in Movitz, or is it just talked
> about in the manual? And if so, where's the code that sets it up?

It's used, but not to a very great extent so far. That is,
thread-local storage is referenced through a designated segment
selector, but so far there's only one thread, and it's segment
selector (in FS) is the same as DS.  DS however is not quite "flat
model", it's starting at physical address 1M. GS (I think it was) is
used to access (memory mapped hardware) below 1M, e.g. by giving a
true physicalp argument to memref-int.

The basic execution environment is set up in the very early boot-up
code that gets generated in make-toplevel-funobj in image.lisp.

--

-- 
Frode Vatvedt Fjeld

James Crippen | 16 Aug 2004 01:03
Picon

ATA reference

Where can I find a reference for ATA programming so I can understand
harddisk.lisp?

Peter Minten | 16 Aug 2004 09:35
Picon
Favicon

Re: ATA reference

On Monday 16 August 2004 01:03, James Crippen wrote:
> Where can I find a reference for ATA programming so I can understand
> harddisk.lisp?

The reference I used when making the file was ATAPI-6 
(http://www.t13.org/project/d1410r3a.pdf).

Greetings,

Peter

James Crippen | 18 Aug 2004 10:30
Picon

with-inline-assembly-case

What is the purpose of with-inline-assembly-case? I understand the
idea of the inline assembly directive, but I don't get why it needed
to be folded into a case statement.

'james


Gmane