From: Alan Cox <alan@llwyncelyn.cymru>
To: David O'Shea <dcoshea@gmail.com>
Cc: linux-8086@vger.kernel.org
Subject: Re: Memory issues and USB support? (and OpenWatcom)
Date: Sun, 11 Jun 2017 15:54:36 +0100 [thread overview]
Message-ID: <20170611155436.541a5398@llwyncelyn.cymru> (raw)
In-Reply-To: <CAN0DjM1brGUSys-e+gn3e2UKj2vhb=-CF1a5oMJMmLB+KS=2nw@mail.gmail.com>
> That kind of leads me to something else I wanted to ask about: I take
> it the requirement to use small mode is because of the bcc compiler?
Moving to large code isn't a problem, but large data means far pointers
and that means a huge slowdown in performance. Instead ELKS has some
facilities to allow things like disk cache to be in a different segment.
For userspace large models also mean you can't do swapping until you have
286 protected mode.
> > In the Linux 8086 case the big problem is the kernel stack for each
> > process comes from that 64K.
>
> On entry to the kernel, couldn't one change SS:SP to point to some
> other memory area? It looks like the parameters to system calls are
> in registers rather than on the stack. Is it just a case of not
> having done this extra work of managing more bits of memory yet, or is
> there an architectural limitation here?
SS and DS have to be the same in small and tiny mode. A syscall switches
to the kernel code and data so the kernel has 64K of data to play with.
It uses a load of it on kernel stacks it could avoid at a small cost on
context switches. If that were fixed there would be plenty of kernel data
space.
> I was kind of thinking that a process whose pages are in EMS are
> unlikely to get corrupted by a process running off the end of an
> array. I realise that I shouldn't have used the term "memory
> protection" though!
It's less likely one would be scribbled on, but in fact if you give a
16bit process 64K code and 64K data it has to corrupt segment registers
to scribble outside of its space and that makes it more reliable than you
might expect.
Alan
next prev parent reply other threads:[~2017-06-11 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-11 14:09 Memory issues and USB support? (and OpenWatcom) David O'Shea
2017-06-11 14:54 ` Alan Cox [this message]
2017-06-12 4:05 ` David O'Shea
2017-06-14 1:23 ` Alan Cox
2017-06-15 10:18 ` David O'Shea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170611155436.541a5398@llwyncelyn.cymru \
--to=alan@llwyncelyn.cymru \
--cc=dcoshea@gmail.com \
--cc=linux-8086@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox