All of lore.kernel.org
 help / color / mirror / Atom feed
* [hppa-linux] Linux Kernel and PA-RISC
@ 1999-03-23  6:57 Kumar
  0 siblings, 0 replies; 4+ messages in thread
From: Kumar @ 1999-03-23  6:57 UTC (permalink / raw)
  To: hppa-linux; +Cc: kumar






This is a long one. So bear with me.

In the process of trying to know more about PA-RISC, I ended up
doing a following comparative analysis between PA and 80386:

Take a 80386 -

Make segment registers 32 bits wide and instead of defining
how much memory is covered by each segment using Global descriptor
table etc, make each segments of same size that is  32 bits. 

Take out the special meaning assigned to segment registers by hardware
i.e no CS, DS, ES etc etc. Call these new segment registers "spaces"
each capable of addressing 4 Gig of memory. 

So now we have this 2 dimensional virtual address space, %sr.%offset.

Instead of going through a pdir->page_table->page combination as done
in x86, just use a TLB black box:


	%sr.%offset-------->[TLB black-box]---------->a physical page in 
		                       a flat physical address space.

One of the issues while porting Linux to 80386 would be how to implement
this TLB black-box.

I expect folks to correct me if I have faltered or  made any wrong assumptions
so far.


On a x86 Linux box, at any given time following is happening.

Kernel space is defined by 2 segments in GDT, one each for code and data.
User space is defined by 2 segments in GDT, one each for code and data.
There might be others ( Like stack, though i believe u can use data segment).

When a process makes a syscall going through an interrupt gate:

One of things that we do is to save every thing ( HW state), change
CS and DS to those of kernel space, giving a 32 bit virtual address and
depend on  pdir->page_table->page mumbo jumbo to start executing and fetching
instruction in kernel.


My understanding of PA equivalent:

	Since there is no special meaning (except %sr0 which i think is
	used for branch and link space) to any space registers, Juse use
	by convention a particular space register and a value in this space
	register to define Kernel space. 

	There is no segment level protection here ?
	All protection is through protection identifiers and other fields
	in tlb entry data structures. One of the important field here is
	privilege level of the page defined by a particular tlb entry.

	A process makes a syscall by executing a gate instruction on a 
	privileged page, that braches to a syscall entry point in kernel
	and also increases your privilege level.

	To move from real mode to Virtual mode:

	Set things up ( i.e. create pdir and map everything correctly)
	Hope you are executing on a page thats equivalently mapped.
	Turn on I and D bits in PSW and you are in protected mode.

	
	One other question is whats happening to space registers when
	you are running in real mode ?

I hope, this "magnum opus" is enough for today :-)

-pkd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [hppa-linux] Linux Kernel and PA-RISC
@ 1999-03-24 21:16 Jason Eckhardt
  1999-03-25  0:55 ` [hppa-linux] the cvs thingy Ed June
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Eckhardt @ 1999-03-24 21:16 UTC (permalink / raw)
  To: hppa-linux


>
>
> My understanding of PA equivalent:
>
 ...
> 	
> 	One other question is whats happening to space registers when
> 	you are running in real mode ?
>

  In real mode the space register field of the load/store/cache instructions
  is ignored so that the effective address is just the 32-bit offset.

  Jason.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [hppa-linux] the cvs thingy
  1999-03-24 21:16 [hppa-linux] Linux Kernel and PA-RISC Jason Eckhardt
@ 1999-03-25  0:55 ` Ed June
  1999-03-25 13:53   ` Mike Shaver
  0 siblings, 1 reply; 4+ messages in thread
From: Ed June @ 1999-03-25  0:55 UTC (permalink / raw)
  To: hppa-linux

>

Hmm, am I doing this correct ?

$ export CVSROOT=':pserver:anonymous@sod.res.cmu.edu:/home/cvs/hppa'
$ cvs login
(Logging in to anonymous@sod.res.cmu.edu)
CVS password:
$ cvs -z3 checkout hppa-linux
cvs server: cannot find module `hppa-linux' - ignored
cvs [checkout aborted]: cannot expand modules


--

 Ed June

 buggz@america.net
 Linux: An open choice for free people worldwide.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [hppa-linux] the cvs thingy
  1999-03-25  0:55 ` [hppa-linux] the cvs thingy Ed June
@ 1999-03-25 13:53   ` Mike Shaver
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Shaver @ 1999-03-25 13:53 UTC (permalink / raw)
  To: hppa-linux

Ed June wrote:
> $ cvs -z3 checkout hppa-linux
> cvs server: cannot find module `hppa-linux' - ignored
> cvs [checkout aborted]: cannot expand modules

cvs -z3 co linux

Mike

-- 
9805.70 8095.76

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-03-25  0:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-24 21:16 [hppa-linux] Linux Kernel and PA-RISC Jason Eckhardt
1999-03-25  0:55 ` [hppa-linux] the cvs thingy Ed June
1999-03-25 13:53   ` Mike Shaver
  -- strict thread matches above, loose matches on Subject: below --
1999-03-23  6:57 [hppa-linux] Linux Kernel and PA-RISC Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.