From: Antonino Daplas <adaplas@pol.net>
To: Antonino Daplas <adaplas@pol.net>
Cc: James Simmons <jsimmons@infradead.org>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Reading the EDID block for x86 machines
Date: 12 Mar 2003 05:47:37 +0800 [thread overview]
Message-ID: <1047419211.1186.32.camel@localhost.localdomain> (raw)
In-Reply-To: <1047418384.1100.5.camel@localhost.localdomain>
On Wed, 2003-03-12 at 05:33, Antonino Daplas wrote:
> I think I found a chunk of around 500 bytes between INITRD and EDD, so
> we can squeeze in EDID in there :-) Although I'm confident on this,
> I'll feel better if someone who boots with initrd can test it.
Forgot the patch :-)
Tony
diff -Naur linux-2.5.64-fbdev/arch/i386/boot/compressed/misc.c linux-2.5.64/arch/i386/boot/compressed/misc.c
--- linux-2.5.64-fbdev/arch/i386/boot/compressed/misc.c 2003-03-11 21:19:34.000000000 +0000
+++ linux-2.5.64/arch/i386/boot/compressed/misc.c 2003-03-11 21:07:24.000000000 +0000
@@ -91,7 +91,7 @@
#define ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0))
#endif
#define SCREEN_INFO (*(struct screen_info *)(real_mode+0))
-#define EDID_INFO (*(struct edid_info *)(real_mode+0x600))
+#define EDID_INFO (*(struct edid_info *)(real_mode+0x440))
extern char input_data[];
extern int input_len;
diff -Naur linux-2.5.64-fbdev/arch/i386/boot/video.S linux-2.5.64/arch/i386/boot/video.S
--- linux-2.5.64-fbdev/arch/i386/boot/video.S 2003-03-11 21:19:34.000000000 +0000
+++ linux-2.5.64/arch/i386/boot/video.S 2003-03-11 21:07:24.000000000 +0000
@@ -1888,7 +1888,6 @@
popw %ax
ret
-#if defined(CONFIG_EDID)
store_edid:
pushw %es # just save all affected
pushw %ax # affected registers
@@ -1914,21 +1913,22 @@
store_edid_magic:
movb $0x13, %al
movw $128, %cx
- movw $0x600, %di
+ movw $0x440, %di
cld
rep
stosb
ret
+#if defined(CONFIG_EDID)
read_edid:
movw $0x4f15, %ax
movw $0x01, %bx
movw $0x00, %cx
movw $0x01, %dx
- movw $0x600, %di
+ movw $0x440, %di
int $0x10
ret
#else
-store_edid:
+read_edid:
ret
#endif
diff -Naur linux-2.5.64-fbdev/arch/i386/kernel/setup.c linux-2.5.64/arch/i386/kernel/setup.c
--- linux-2.5.64-fbdev/arch/i386/kernel/setup.c 2003-03-11 21:19:34.000000000 +0000
+++ linux-2.5.64/arch/i386/kernel/setup.c 2003-03-11 21:07:24.000000000 +0000
@@ -496,23 +496,6 @@
#define copy_edd() do {} while (0)
#endif
-#if defined(CONFIG_EDID)
-/*
- * Since empty_zero_page has a limited size, we are going to use the
- * same offset as EDD. Thus, copying of the EDID block will only be
- * enabled if EDD is disabled.
- */
-static inline void copy_edid(void)
-{
- edid_info = EDID_INFO;
-}
-#else
-static inline void copy_edid(void)
-{
- memset(&edid_info, 0x13, 128);
-}
-#endif
-
/*
* Do NOT EVER look at the BIOS memory size location.
* It does not work on many machines.
@@ -880,7 +863,7 @@
ROOT_DEV = ORIG_ROOT_DEV;
drive_info = DRIVE_INFO;
screen_info = SCREEN_INFO;
- copy_edid();
+ edid_info = EDID_INFO;
apm_info.bios = APM_BIOS_INFO;
saved_videomode = VIDEO_MODE;
printk("Video mode to be used for restore is %lx\n", saved_videomode);
diff -Naur linux-2.5.64-fbdev/drivers/video/Kconfig linux-2.5.64/drivers/video/Kconfig
--- linux-2.5.64-fbdev/drivers/video/Kconfig 2003-03-11 21:19:34.000000000 +0000
+++ linux-2.5.64/drivers/video/Kconfig 2003-03-11 21:07:47.000000000 +0000
@@ -6,7 +6,7 @@
config EDID
bool "Get EDID block from VBE"
- depends on X86 && !EDD
+ depends on X86
config FB
bool "Support for frame buffer devices"
diff -Naur linux-2.5.64-fbdev/include/asm-i386/setup.h linux-2.5.64/include/asm-i386/setup.h
--- linux-2.5.64-fbdev/include/asm-i386/setup.h 2003-03-11 21:19:34.000000000 +0000
+++ linux-2.5.64/include/asm-i386/setup.h 2003-03-11 21:07:25.000000000 +0000
@@ -37,10 +37,10 @@
#define KERNEL_START (*(unsigned long *) (PARAM+0x214))
#define INITRD_START (*(unsigned long *) (PARAM+0x218))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c))
+#define EDID_INFO (*(struct edid_info *) (PARAM+0x440))
+#define EDID_SIZE 128
#define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
#define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF))
-/* Note: EDID_INFO uses the same offset as EDD_BUF */
-#define EDID_INFO (*(struct edid_info *) (PARAM+EDDBUF))
#define COMMAND_LINE ((char *) (PARAM+2048))
#define COMMAND_LINE_SIZE 256
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
next prev parent reply other threads:[~2003-03-11 21:51 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-11 12:49 Reading the EDID block for x86 machines Antonino Daplas
2003-03-11 15:49 ` James Simmons
2003-03-11 20:07 ` Antonino Daplas
2003-03-11 21:33 ` Antonino Daplas
2003-03-11 21:47 ` Antonino Daplas [this message]
2003-03-11 22:05 ` Jon Smirl
2003-03-11 22:33 ` Antonino Daplas
2003-03-11 22:54 ` Jon Smirl
2003-03-11 23:02 ` Antonino Daplas
2003-03-11 23:42 ` Jon Smirl
2003-03-12 17:38 ` Antonino Daplas
2003-03-12 18:16 ` Jon Smirl
2003-03-12 22:38 ` Antonino Daplas
2003-03-12 23:36 ` Jon Smirl
2003-03-12 23:47 ` Jon Smirl
2003-03-13 6:50 ` Geert Uytterhoeven
2003-03-13 15:42 ` Jon Smirl
2003-03-16 23:00 ` Antonino Daplas
2003-03-17 4:00 ` Jon Smirl
2003-03-17 7:00 ` Antonino Daplas
2003-03-17 19:33 ` Jon Smirl
2003-03-17 21:38 ` Antonino Daplas
2003-03-17 22:02 ` Jon Smirl
2003-03-17 22:29 ` Antonino Daplas
2003-03-17 23:41 ` Jon Smirl
2003-03-18 9:06 ` Geert Uytterhoeven
2003-03-18 10:00 ` Antonino Daplas
2003-03-18 17:07 ` Jon Smirl
2003-03-19 5:15 ` Antonino Daplas
2003-03-19 6:07 ` Jon Smirl
2003-03-18 0:00 ` Jon Smirl
2003-03-11 23:54 ` Jon Smirl
2003-03-12 12:10 ` Ville Syrjälä
2003-03-12 17:38 ` Antonino Daplas
2003-03-12 18:47 ` Ville Syrjälä
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=1047419211.1186.32.camel@localhost.localdomain \
--to=adaplas@pol.net \
--cc=jsimmons@infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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 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.