Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.development > #9987

Re: FYSOS: The Graphical User Interface

From Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam>
Newsgroups alt.os.development
Subject Re: FYSOS: The Graphical User Interface
Date 2016-08-26 16:16 -0400
Organization Aioe.org NNTP Server
Message-ID <20160826161635.324a9afe@_> (permalink)
References (14 earlier) <npjl0o$s2o$1@dont-email.me> <20160824070006.0ef4cbd1@_> <npmhpm$uml$1@dont-email.me> <20160825184541.025acb6b@_> <nposvl$rap$1@gioia.aioe.org>

Show all headers | View raw


On Fri, 26 Aug 2016 10:00:17 +0200
"wolfgang kern" <nowhere@never.at> wrote:

> Rod Pemberton and James Harris wrote:

> [about SMM..]  
> 
> The VBIOS wont/cant use SMM.  
> 
> > It's true that if the BIOS is called in RM instead of PM, then it's
> > free to enter PM.  If not, it's "locked" out.
> > Wolfgang said that the BIOS checked for PM.    
> 
> Yes both main and video BIOS does it for several functions to 
> support INTxx in v86mode (skips RM-segment calculation then).  

What happens when the BIOS/VBIOS is in v86mode instead of RM16 and it
attempts to switch into PM16 to set up 'unreal' mode?  What is the
difference in functionality between the call in RM and v86mode?  Does
v86mode limit the BIOS/VBIOS call to below 1MB?

Do any of the calls which support v86mode address above 1MB?  If they
do, how do they do it?  The processor is already in PM and v86mode is
limited to 1MB. You also said VBIOS won't/cant use SMM.

I'm taking this to mean any BIOS or VBIOS called from v86mode is
limited to below 1MB, except if the BIOS or VBIOS is called from RM16
it may switch into PM32 or 'unreal' mode via PM16 and then address
above 1MB.

> > If the BIOS is in PM, how could it access memory above 1MB?  
> 
> how else ?  ;)  
> VESA2.0 PM16 interface doesn't work on LFB.

So, a PM16 video BIOS call won't switch into PM32 to address above
1MB? ...

> >> To start with I wanted to use the BIOS only to switch video modes.
> >> I  cannot think of any other portable way to change the screen 
> >> resolution.  
> 
> right.
> 
> > SVGA is portable.  It's just the VESA methods that are not.  Yes?
> > The higher level VESA mode numbers aren't standard either.  
> 
> true.
>  
> [binary translation...]
> 
> would need an extremely smart tool to figure all the mixed parts 
> of code, data, branch tables, index/data IO-pairs and more.
>  
> > Does the BIOS or video BIOS have self-modifying code? ...  
> 
> No, except before the main BIOS load modules depending on type of 
> boot device. 
> VBIOS seem to be ROM based, but it's also partially writeable 
> so it could use SMC for mode-changes (not checked so far).
>
> > I would generally assume that code is clean.  
> 
> yes, as long no weird boot-loader spoils it.
> 
>  
> [calling RM16 BIOS from LM ...]
> possible anyway, even this needs some overhead.
> 
> > It's too bad that we can't confirm that the BIOS is 16-bit clean.
> > Wolfgang said the video BIOS isn't (anymore?).   
> 
> also the main BIOS use temorary PM32, since decades already.
> 

Is PM32 and 'unreal' mode the only modes the BIOS switches into?

If we can call BIOS or video BIOS in RM16, can we call it in v86mode? 
If we can call BIOS of video BIOS in PM16, can we call it in CM16?
If we can call BIOS of video BIOS in PM32, can we call it in CM32?

> > Each one of the 16-bit modes has a corresponding 32-bit mode which 
> > can address above 1MB.  
> 
> ?? ..Video modes got nothing to do with CPU-modes.
> Not all VGA-modes have a LFB counterpart.

The BIOS and video BIOS code is written to work for certain CPU-modes,
e.g., RM16, v86, PM16, PM32.

Basically, I'm attempting to get a rough idea of which CPU-modes can be
used for which BIOS or VBIOS calls, and what mechanism the BIOS/VBIOS
call uses to switch into another CPU-mode.  Do they use CR0.PE (likely)
or CS.D (unlikely)?  This was to see if James could use CM16 or another
mode that is easier to switch into, instead of RM16.

How does the BIOS and video BIOS get into a CPU-mode that can address
above 1MB?  What modes is it called from and what modes does it switch
into?

I suspected these:

RM16 -> PM32 via CR0.PE
PM16 -> PM32 via CS.D
PM32 directly
v86 ->  (impossible?)

You said these:

RM16 -> PM32 via CR0.PE
RM16 -> PM16 -> 'unreal'

The processor also supports:

RM16 -> RM32 via CS.D
PM16 -> PM32 via CS.D
CM16 -> CM32 via CS.D

But, James was in LM (PM64), so switching to CM would be easier than
RM16.

> > If confirmed, then you'd only need to switch
> > out of PM64 to one of the 16-bit modes (RM16, PM16, or CM16) and the
> > BIOS would switch to a 32-bit mode (RM32, PM32, or CM32) for you to
> > access above 1MB.  However, my current understanding is that BIOSes
> > switch from RM16 to PM32 (either directly or temporarily for
> > 'unreal' mode) to access above 1MB, but I don't have any BIOS
> > documentation other than RBIL.  
> 
> VBIOS dont need to enter PM32 to set data-seg limits for 'unreal
> flat', it can do this within PM16.

The VBIOS is using a CR0.PE mode switch for 'unreal', and not CS.D.,
i.e., RM16 -> PM16 -> 'unreal'.

What happens when the VBIOS is called in CM16 or PM16 instead of RM16,
and VBIOS attempts to switch into PM16 to set 'unreal' mode? This is a
processor fault, yes?  The processor already has CR0.PE set.

> [..can we trust BIOS functions]  Yes of course! 
> But if you're enough paranoid feel free to write your own BIOS :) 

I already know I don't need much from the BIOS for my simple OS.  VESA
would be nice, but I only programmed text mode CRTC.  I never got to
coding the IDE disk routines.  That machine failed and the new one
was SATA ...  So, I think only high resolution VESA video and disk
routines are the only BIOS functionality I would use, and E820h.  I
would only use the disk routines until I've coded my own.

Support for more advanced or obsolete hardware or functionality, e.g.,
PCI, PnP, AGP, ACPI, simply won't be implemented.  Mouse, keyboard,
disk, video and a few standard motherboard components is probably all.
Anything beyond that, the OS becomes extremely dependent on the
hardware, and that functionality is only required sometimes.


Rod Pemberton

Back to alt.os.development | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

FYSOS: The Graphical User Interface "Benjamin David Lunt" <zfysz@fysnet.net> - 2016-07-08 11:52 -0700
  Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-16 11:00 +0200
    Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-16 11:14 +0100
      Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-16 19:07 +0200
        Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-16 19:42 +0100
          Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-16 21:32 +0200
            Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-16 23:22 -0400
              Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-17 13:50 +0200
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-18 01:41 -0400
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-18 10:47 +0200
            Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-17 08:45 +0100
              Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-17 13:57 +0200
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-18 01:47 -0400
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-18 10:59 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-18 11:37 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-18 17:38 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-19 10:03 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-19 22:34 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-22 17:43 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-22 19:04 +0200
    Re: FYSOS: The Graphical User Interface "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-08-16 04:18 -0700
      Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-16 12:25 +0100
        Re: FYSOS: The Graphical User Interface "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-08-16 04:41 -0700
        Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-16 19:19 +0200
      Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-16 19:14 +0200
    Re: FYSOS: The Graphical User Interface "Benjamin David Lunt" <zfysz@fysnet.net> - 2016-08-16 19:24 -0700
      Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-17 12:26 +0200
        Re: FYSOS: The Graphical User Interface "Mike Gonta" <mikegonta@gmail.com> - 2016-08-17 10:42 -0400
          Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-18 01:16 +0200
            Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-18 12:17 +0100
              Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-18 19:23 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-19 17:29 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-19 22:55 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-22 17:18 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-22 19:23 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-23 11:46 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-23 23:44 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-24 08:29 +0100
                Re: FYSOS: The Graphical User Interface "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-08-24 02:39 -0700
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-24 17:43 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-24 11:25 +0200
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-23 17:50 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-24 09:14 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-24 12:39 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-25 10:46 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-25 12:40 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-25 12:10 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-25 14:43 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-27 13:56 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-27 15:59 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-27 17:03 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-27 22:43 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-28 09:22 +0100
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-28 11:51 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-28 13:08 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-27 19:12 -0400
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-28 10:41 +0200
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-28 08:48 -0400
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-27 19:12 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-28 10:16 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-28 08:46 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-28 18:45 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-28 17:51 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-29 07:55 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-29 06:40 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-31 06:43 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-24 07:00 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-25 11:37 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-25 18:45 -0400
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-26 10:00 +0200
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-26 16:16 -0400
                Re: FYSOS: The Graphical User Interface "wolfgang kern" <nowhere@never.at> - 2016-08-27 15:10 +0200
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-27 17:59 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-27 19:11 -0400
                Re: FYSOS: The Graphical User Interface James Harris <james.harris.1@gmail.com> - 2016-08-28 10:56 +0100
                Re: FYSOS: The Graphical User Interface Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-28 08:45 -0400
        Re: FYSOS: The Graphical User Interface "Benjamin David Lunt" <zfysz@fysnet.net> - 2016-08-17 20:12 -0700

csiph-web