Re: [PATCH] Make bootsector stub 16-bit-only (i386)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-05-09 at 10:54 +0200, Alexander van Heukelum wrote:
> On Wed, May 09, 2007 at 08:04:07AM +0800, Antonino A. Daplas wrote:
> > On Tue, 2007-05-08 at 20:32 +0200, Alexander van Heukelum wrote:
> > > diff --git a/arch/i386/boot/bootsect.S b/arch/i386/boot/bootsect.S
> > > diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
> > > index 8143c95..8e404cb 100644
> > > --- a/arch/i386/boot/video.S
> > > +++ b/arch/i386/boot/video.S
> > > @@ -95,7 +95,8 @@ #define PARAM_VESAPM_SEG	0x2e
> > >  #define PARAM_VESAPM_OFF	0x30
> > >  #define PARAM_LFB_PAGES		0x32
> > >  #define PARAM_VESA_ATTRIB	0x34
> > > -#define PARAM_CAPABILITIES	0x36
> > > +#define PARAM_VESA_PAD		0x36
> > > +#define PARAM_CAPABILITIES	0x38
> > >  
> > >  /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
> > >  #ifdef CONFIG_VIDEO_RETAIN
> > > diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
> > > index b02308e..0a2e892 100644
> > > --- a/include/linux/screen_info.h
> > > +++ b/include/linux/screen_info.h
> > > @@ -41,8 +41,8 @@ struct screen_info {
> > >  	u16 vesapm_off;		/* 0x30 */
> > >  	u16 pages;		/* 0x32 */
> > >  	u16 vesa_attributes;	/* 0x34 */
> > > -	u32 capabilities;       /* 0x36 */
> > > -				/* 0x3a -- 0x3b reserved for future expansion */
> > > +	u16 vesa_pad;		/* 0x36 */
> > > +	u32 capabilities;       /* 0x38 */
> > >  				/* 0x3c -- 0x3f micro stack for relocatable kernels */
> > >  };
> > >  
> > 
> > You would also need this minor change.
> > 
> > Tony
> > 
> > diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
> > index 5e2280c..2d637d1 100644
> > --- a/arch/i386/boot/video.S
> > +++ b/arch/i386/boot/video.S
> > @@ -95,7 +95,7 @@ #define PARAM_VESAPM_SEG      0x2e
> >  #define PARAM_VESAPM_OFF       0x30
> >  #define PARAM_LFB_PAGES                0x32
> >  #define PARAM_VESA_ATTRIB      0x34
> > -#define PARAM_CAPABILITIES     0x36
> > +#define PARAM_CAPABILITIES     0x38
> >  
> >  /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
> >  #ifdef CONFIG_VIDEO_RETAIN
> 
> Hi!
> 
> I'm making coffee now. I just don't see what I missed? Maybe you were
> led astray by the new PARAM_VESA_PAD I added?

Since you moved screen_info.capabilities forward by 2 bytes, you must
also tell video.S where to poke for the new location, otherwise, vesafb
(which uses the capabilities field) will get confused.

These are the values for the unadjusted and adjusted PARAM_CAPABILITIES:
(The latter one is correct).

capabilities: 746f0000
capabilities: 1

Tony


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux