This is my pcchips.config, in i have set video_console=0 but when i probe to make the file i have this error.\
gcc ... -o superio_sis_950.o /home/fino/src/superio/sis/950/superio.c /home/fino/src/superio/sis/950/superio.c:2: warning: `rcsid' defined but not used gcc ... -o nsuperio.o nsuperio.c gcc ... -o mainboard.o /home/fino/src/mainboard/pcchips/m810lmr/mainboard.c gcc ... -o irq_tables.o /home/fino/src/mainboard/pcchips/m810lmr/irq_tables.c gcc ... -o cpuid.o /home/fino/src/cpu/p5/cpuid.c /home/fino/src/cpu/p5/cpuid.c:3: warning: `rcsid' defined but not used gcc ... -o delay_tsc.o /home/fino/src/cpu/p5/delay_tsc.c /home/fino/src/cpu/p5/delay_tsc.c: In function `calibrate_tsc': /home/fino/src/cpu/p5/delay_tsc.c:102: warning: unused variable `allones' gcc ... -o microcode.o /home/fino/src/cpu/p6/microcode.c /home/fino/src/cpu/p6/microcode.c:7: warning: `rcsid' defined but not used gcc ... -o mtrr.o /home/fino/src/cpu/p6/mtrr.c /home/fino/src/cpu/p6/mtrr.c: In function `set_var_mtrr': /home/fino/src/cpu/p6/mtrr.c:132: warning: unused variable `tmp' /home/fino/src/cpu/p6/mtrr.c: At top level: /home/fino/src/cpu/p6/mtrr.c:29: warning: `rcsid' defined but not used gcc ... -o l2_cache.o /home/fino/src/cpu/p6/l2_cache.c /home/fino/src/cpu/p6/l2_cache.c:33: warning: `rcsid' defined but not used gcc ... -o cpufixup.o /home/fino/src/cpu/k7/cpufixup.c /home/fino/src/cpu/k7/cpufixup.c:8:1: warning: "TOP_MEM" redefined In file included from /home/fino/src/cpu/k7/cpufixup.c:6: /home/fino/src/include/cpu/k7/mtrr.h:38:1: warning: this is the location of the previous definition /home/fino/src/cpu/k7/cpufixup.c:9:1: warning: "TOP_MEM2" redefined /home/fino/src/include/cpu/k7/mtrr.h:39:1: warning: this is the location of the previous definition rm -f linuxbios.a ar cr linuxbios.a linuxbiosmain.o linuxpci.o newpci.o clog2.o printk.o serial_subr.o subr.o vsprintf.o memset.o memcpy.o memcmp.o malloc.o do_inflate.o delay.o compute_ip_checksum.o version.o keyboard.o mc146818rtc.o isa-dma.o ide.o boot.o linuxbios_table.o i386_subr.o params.o hardwaremain.o pirq_routing.o c_start.o southbridge.o northbridge.o superio_sis_950.o nsuperio.o mainboard.o irq_tables.o keyboard.o cpuid.o delay_tsc.o microcode.o mtrr.o l2_cache.o cpufixup.o cpufixup.o gcc -nostdlib -r -o linuxbios_c.o c_start.o docmil_fill_inbuf.o ide_fill_inbuf.o linuxbios.a /usr/lib/gcc-lib/i386-linux/3.2.3/libgcc.a perl -e 'foreach $var (split(" ", $ENV{VARIABLES})) { if ($ENV{$var} =~ m/^(0x[0-9a-fA-F]+|0[0-7]+|[0-9]+)$/) { print "$var = $ENV{$var};\n"; }}' > ldoptions gcc -nostdlib -nostartfiles -static -o linuxbios_c -T /home/fino/src/config/linuxbios_c.ld linuxbios_c.o linuxbios_c.o(.text+0x51a): In function `displayinit': : undefined reference to `video_init' linuxbios_c.o(.text+0x52e): In function `__display_tx_byte': : undefined reference to `video_tx_byte' linuxbios_c.o(.text+0x5ec1): In function `set_display': : undefined reference to `video_col' linuxbios_c.o(.text+0x5ec9): In function `set_display': : undefined reference to `video_line' collect2: ld returned 1 exit status make: *** [linuxbios_c] Error 1 samyr:/home/fino/freebios/util/config/pcchips#
Tnx
Serafino
Serafino Sorrenti wrote:
This is my pcchips.config, in i have set video_console=0 but when i probe to make the file i have this error.
Try removing the video_console setting completely.
-Steve
sigh, my pcchips no longer builds at all :=(
OK, more to look at.
Current error is:
crt0.s:435: Error: subtraction of two symbols in different sections `gdt_end' {*UND* section} - `gdt' {*UND* section} at file address 52 make: *** [crt0.o] Error 1
Steve, do you have your pcchips.config file?
ron
ron minnich wrote:
sigh, my pcchips no longer builds at all :=(
OK, more to look at.
Current error is:
crt0.s:435: Error: subtraction of two symbols in different sections `gdt_end' {*UND* section} - `gdt' {*UND* section} at file address 52 make: *** [crt0.o] Error 1
Steve, do you have your pcchips.config file?
Hmm, sure. It is attached. Would you like for me to check out the latest and build? The gdt code in sis630 is no longer needed anyway, since Eric changed the gdt in c_start.S.
-Steve
# Config file for PCCHIPS m787cl+ # with vga and graphics logo display # uses flash, ide, and optionally floppy # no doc mem. # # by Steve M. Gehlbach steve@kesa.com #
# This will dump files in directory of /usr/src/pcchips787 target /usr/src/pcchips787
# PCCHIPS m787cl+ mainboard mainboard pcchips/m787cl+
#this sets the vga memory small since #text console uses very little option SMA_SIZE=0x80
option CONFIG_COMPRESS=1
# you have to relocate the gdt before # jumping to linux if you put the flash code # here. biosbase 0xffff0000
# # to setup cacheing on the top # 16M of flash # option XIP_ROM_SIZE= 0x01000000 option XIP_ROM_BASE= 0xff000000
# For printk_debug, set level to 8 # for printk_info, set level to 7 #option DEFAULT_CONSOLE_LOGLEVEL=8 option DEFAULT_CONSOLE_LOGLEVEL=7 #option DEFAULT_CONSOLE_LOGLEVEL=6
# STD_FLASH=1 is not necessary since we relocate the # gdt in chipinit.inc. Turning on the shadow # ram is thereofore okay. It does not wipe out the gdt. #option STD_FLASH=1
# Enable Serial Console for debugging # Enable VGA and logo splash screen option VIDEO_CONSOLE=1 option VIDEO_SHOW_LOGO=1
# # the logo is displayed for VIDEO_SHOW_LOGO seconds. # Need to have to have a 128k rom since the logo image is at the # beginning (0xfffe0000) option VIDEO_SHOW_LOGO=10 option ROM_IMAGE_SIZE=131072 option PCX_FILE_LOCATION=0xfffe0000
option SERIAL_CONSOLE=1 option SERIAL_POST=1
# setup delay using TSC # also set option in cpu/p5 to use timer2 to calibrate option CONFIG_UDELAY_TSC=1
#floppy is nice option MUST_ENABLE_FLOPPY=1
# the floppy/ide needs linux.gz and a ramdisk # at the offset in the command line below #option BOOT_FLOPPY=1 option BOOT_IDE=1 option IDE_BOOT_DRIVE=2 # need to know size of partition table for ide option ONE_TRACK=32
# Use the internal VGA frame buffer device # very important; crashes otherwise option HAVE_FRAMEBUFFER=1
# Path to your kernel (vmlinux) #linux /usr/src/linux-2.4.19 linux /usr/src/linux
# Kernel command line parameters #commandline root=/dev/hda2 console=ttyS0,38400n8 console=/dev/tty0 #commandline root=/dev/hda1 console=/dev/tty0 console=ttyS0,38400n8 #commandline root=/dev/hda1 ro commandline root=/dev/hda2 ro reboot=h
# # these actions put the pcx image file on the front of the bios. # the image size is placed in the first 4 bytes then the pcx file # important that ROM_IMAGE_SIZE be set to 128K or larger. # The logo file is called linuxbioslogo.pcx and is by default located at # src/pc80/linuxbioslogo.pcx. # Change the variable LOGOFILE below if you want to use your own file. # See the file src/pc80/vga_load_pcx.c for details on the file format. # option LOGOFILE=$(TOP)/src/pc80/linuxbioslogo.pcx addaction linuxbios.rom dd if=$(LOGOFILE) of=linuxbios.rom bs=1 seek=4 conv=notrunc; addaction linuxbios.rom perl -e '@a=stat "$(LOGOFILE)";$$a=pack("L",$$a[7]); print $$a' | dd of=linuxbios.rom bs=1 conv=notrunc
# copy to home dir where flash programmer can reach. addaction linuxbios.rom /bin/cp -f linuxbios.rom $(HOME)/cti/software/bios/exp/linuxbios_787.bin
On Mon, 5 May 2003, Steve Gehlbach wrote:
Hmm, sure. It is attached. Would you like for me to check out the latest and build? The gdt code in sis630 is no longer needed anyway, since Eric changed the gdt in c_start.S.
yes, please, see if it builds.
ron
My keyboard under linux isn't working. Dosen't appear to work under ADLO either.
I've got it enabled and I added some more debugging printk's to keyboard.c. Things appear to be happing correctly there. So I'm fairly confident that the hardware is turned on.
I'm suspecting its an IRQ issue. I see reference to assignirq in the hardwaremain.c and to a assignirq.c. If I enable CONFIG_ASSIGNIRQ then the compile fails claiming it can't find the file assignirq.c
I did a find but assignirq.c dosen't seem to exist in my tree. Which is only about a week old.
On Mon, 5 May 2003, Richard Smith wrote:
I'm suspecting its an IRQ issue. I see reference to assignirq in the hardwaremain.c and to a assignirq.c. If I enable CONFIG_ASSIGNIRQ then the compile fails claiming it can't find the file assignirq.c
ron forgets a cvs add again. OK, I will add this tonight. I hope to get this assign irq stuff in in some form before may 12 (final freeze date -- may 8 seemed bad as it was a wednesday).
Sorry about that.
The 'no keyboard' sounds more like it could be a chipset thing. Are you sure it is enabled properly in the PIIX4?
ron
ron minnich wrote:
ron forgets a cvs add again. OK, I will add this tonight. I hope to get this assign irq stuff in in some form before may 12 (final freeze date -- may 8 seemed bad as it was a wednesday).
Can you post something when its available?]
The 'no keyboard' sounds more like it could be a chipset thing. Are you sure it is enabled properly in the PIIX4?
I make keyboard.c wait until a keypress and that works so that indicates that IRQ 1 isn't being un-masked some how?
Oh and seems that src/include/part/keyboard.h has an error
its stil using #ifndef NO_KEYBOARD rather than #if NO_KEYBOARD == [0|1] this causes keyboard_on() to be defined as do {} while(0);
I didn't notice it before because I was calling keyboard_on() from my mainboard.c file but looking in hardwaremain.c showed that that was unneeded. Of course then my keyboard code stopped getting called.
Richard, the sourceforge appears to be back, my cvs update is working.
ron
Richard Smith wrote:
The 'no keyboard' sounds more like it could be a chipset thing. Are you sure it is enabled properly in the PIIX4?
I found the problem. Sure its enabled in the PIIX4 but that won't do much good when it's not enabled in the superIO.
Seems all I did for the superIO was get setup_serial.inc to enable the serial port.
So I guess I need to build one of them new fangled new_superIO config structures and get that into my mix.
Whats the best superio.c and config example for the new superIO code to start with?
On Wed, 7 May 2003, Richard Smith wrote:
So I guess I need to build one of them new fangled new_superIO config structures and get that into my mix.
yes.
Whats the best superio.c and config example for the new superIO code to start with?
ah. Well, try src/superio/winbond/w83977ef/superio.c
ron
I _finally_ got keyboard. Theres a bit in one of my superIO registers that handles the muxing of IRQ pins and some other functions. The default was not to have IRQ 1 enabled.
I can see where if you have mutiple sio's in the system where you might want this bit set in one and not set in others. However the current superio config dosen't seem to have any facility for allowing configuration like this. You have to do it in code.
Perhaps we should add a few new superio items to allow for this? like maybe
struct sio_config_settings { unsigned char offset; unsigned char value; }
And then in superio
struct sio_config_settings config1, config2, config3;
That would give you 3 other registers that you could set via the nsuperio statement.
Or perhaps a new function pointer in superio_control specifically for per-chip setups that don't fall into the pre-defined catagories?
On Thu, 8 May 2003, Richard Smith wrote:
Or perhaps a new function pointer in superio_control specifically for per-chip setups that don't fall into the pre-defined catagories?
We need this. This is the type of thing Eric has mentioned.
Richard, if you want to take a stab at structuring this we can get the new structure into freebios2. We also need to see how we would specify it in the Config files.
ron
Also there dosen't seem to be any mouse device. The NSC pc87351 also does the mouse for our system.
Can I add a mouse to the superio struct and the nlbconfig with out breaking everything? or just wait until freebios2 and just handle it in superio.c?
On Thu, 8 May 2003, Richard Smith wrote:
Can I add a mouse to the superio struct and the nlbconfig with out breaking everything? or just wait until freebios2 and just handle it in superio.c?
let's fix this and get it right in freebios2.
The overall approach of superio is I think OK, but it clearly needs to move away from the generic structure to a per-device type of structure, and we need a way to specify initialization of that structure in the config file.
ron
ron minnich wrote:
Can I add a mouse to the superio struct and the nlbconfig with out breaking everything? or just wait until freebios2 and just handle it in superio.c?
let's fix this and get it right in freebios2.
The overall approach of superio is I think OK, but it clearly needs to move away from the generic structure to a per-device type of structure, and we need a way to specify initialization of that structure in the config file.
Hmmmm.... I'll think about this.. but I'm a little time constrained right now... I worry about not giving it enought thought and coming up with something that will end up being undocumented and difficult to config. Figureing out what all the config options do already is quite involved.
I'm sure Eric will have some good ideas as well when he gets further along with freebios2.
Maybe we should attempt to generate a list of requirements the new structure would need. List members can then chime in on if it would meet thier needs or not.
Richard Smith rsmith@bitworks.com writes:
ron minnich wrote:
Can I add a mouse to the superio struct and the nlbconfig with out breaking everything? or just wait until freebios2 and just handle it in superio.c?
let's fix this and get it right in freebios2. The overall approach of superio is I think OK, but it clearly needs to move away from the generic structure to
a per-device type of structure, and we need a way to specify initialization of
that structure in the config file.
Hmmmm.... I'll think about this.. but I'm a little time constrained right now...
I worry about not giving it enought thought and coming up with something that will end up being undocumented and difficult to config. Figureing out what all the config options do already is quite involved.
I'm sure Eric will have some good ideas as well when he gets further along with freebios2.
Maybe we should attempt to generate a list of requirements the new structure would need. List members can then chime in on if it would meet thier needs or not.
How the structure stuff gets generated needs more work. But it will definitely not be one structure it will be a list of structures. That way we can reuse a generic serial or irq structure, and only invent new structures for new things that come along.
This has been talked about some before but we haven't quite got that far yet.
Eric
ron minnich wrote:
sigh, my pcchips no longer builds at all :=(
OK, more to look at.
Current error is:
crt0.s:435: Error: subtraction of two symbols in different sections `gdt_end' {*UND* section} - `gdt' {*UND* section} at file address 52 make: *** [crt0.o] Error 1
Using gcc2.95 and util/config/pcchips787.config, with the latest checkout, I get an error regarding beep, nothing like what you have above. The beep error is caused by a change to this line in src/pc80/Config:
< object beep.o ---
object beep.o CONFIG_BEEP
This was done in r1.6:
revision 1.6 date: 2003/04/14 22:54:36; author: rminnich; state: Exp; lines: +3 -3 PPC commit
The beep error can be cured by adding "option CONFIG_BEEP=1" in the config file. I assume this was needed since beep.c is x86 specific code. At the time I added beep.c, I thought everything in src/pc80 was x86 specific. (yes no ??)
However, since beep is only used in the video console to my knowledge, it might be better to change it to "object beep.o VIDEO_CONSOLE" unless x86 style video is possible on the ppc. Otherwise CONFIG_BEEP is an obscure setting that needs to be set when using VIDEO_CONSOLE.
-Steve
On Mon, 5 May 2003, Steve Gehlbach wrote:
The beep error can be cured by adding "option CONFIG_BEEP=1" in the config file. I assume this was needed since beep.c is x86 specific code. At the time I added beep.c, I thought everything in src/pc80 was x86 specific. (yes no ??)
it was intended to be, but so many systems use pc80-style hardware (power pc, alpha, etc.) that pc80 is now included in other platforms. Too bad.
However, since beep is only used in the video console to my knowledge, it might be better to change it to "object beep.o VIDEO_CONSOLE" unless
I will do it this way. Makes much more sense. Changed and commit'ed -- please try it out. We're getting close to freezing freebios1, and I'd like to see if we can get as many platforms buildable as possible.
ron
ron minnich wrote:
Changed and commit'ed -- please try it out.
I built the pcchips787.config and stpc.config, made roms and tested on the motherboards, all work okay, per the checked in configs.
-Steve
Serafino Sorrenti wrote:
# use DOC MIL option USE_DOC_MIL=1 docipl northsouthbridge/sis/730/ipl.S
# Need to "relocate the gdt" to use a standard flash part (???) biosbase 0xffff0000
I don't believe you want to mix these two settings. ipl.S is real mode code. I would remove the biosbase setting altogether.
Further, some of the config you have is from the pcchips787. The pcchips787 config is for the sis630 section; the sis730 code is different and many of the option settings from the pcchips787 are not going to work well, unfortunately. I converted the real mode code in the 630 directory so it would work, I think the same thing might have to be done for the 730, but I am not sure.
-Steve
Hello from Gregg C Levine Steve, now I am completely confused. Can you elaborate on the term "gdt"? I am familiar with its use, on the PC, during the time period that covers the pre-Linux era. Namely working in assembler for the IBM-PC, itself, during the 1980s to the 1990s.
After that, I don't remember how it works. So, can you further elaborate? ------------------- Gregg C Levine hansolofalcon@worldnet.att.net ------------------------------------------------------------ "The Force will be with you...Always." Obi-Wan Kenobi "Use the Force, Luke." Obi-Wan Kenobi (This company dedicates this E-Mail to General Obi-Wan Kenobi ) (This company dedicates this E-Mail to Master Yoda )
-----Original Message----- From: linuxbios-admin@clustermatic.org [mailto:linuxbios- admin@clustermatic.org] On Behalf Of Steve Gehlbach Sent: Monday, May 05, 2003 1:29 PM To: Serafino Sorrenti Cc: linuxbios@clustermatic.org Subject: Re: problem with rom
Serafino Sorrenti wrote:
# use DOC MIL option USE_DOC_MIL=1 docipl northsouthbridge/sis/730/ipl.S
# Need to "relocate the gdt" to use a standard flash part (???) biosbase 0xffff0000
I don't believe you want to mix these two settings. ipl.S is real
mode
code. I would remove the biosbase setting altogether.
Further, some of the config you have is from the pcchips787. The pcchips787 config is for the sis630 section; the sis730 code is different and many of the option settings from the pcchips787 are
not
going to work well, unfortunately. I converted the real mode code
in
the 630 directory so it would work, I think the same thing might
have to
be done for the 730, but I am not sure.
-Steve
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Gregg C Levine wrote:
Hello from Gregg C Levine Steve, now I am completely confused. Can you elaborate on the term "gdt"? I am familiar with its use, on the PC, during the time period that covers the pre-Linux era. Namely working in assembler for the IBM-PC, itself, during the 1980s to the 1990s.
The gdt is one of a number of registers in the IA-32 model used for protected mode memory management (ie, for 32-bit mode). Typically, it is loaded to point to a data structure that defines a flat (ie, 4 GB) data segment, and an identical code segment, although you can in reality have many segments defined. These segments are referenced by their offset into the gdt data structure, for example in linux startup, 0x18 defines the data segment, and you would put this into the %ds register. This means the segment is defined 24 bytes into the gdt table. This is very different, of course, from how you use the %ds in real or 16-bit mode.
Originally in linuxbios, the gdt was defined in flash, and not changed until jumping to linux. However, linux will hang if the gdt is located above 1M (not sure why, but I have tested this many times). So if you setup biosbase=0xffff0000, this would put the gdt high, and it has to be loaded low so linux will work. However, recently, Eric setup a gdt reload in c_start.S, which is relocated into ram below 1M, and so this will work fine for linux. This makes some gdt reload code I put into the sis630 area unnecessary.
But the bottom line is you have to setup the gdt to point to a compatible (read that identical) gdt table to linux, before jumping to linux. Linux expects to be in 32-bit mode with the gdt data structure a certain way. You can see it at the bottom of linux/arch/i386/boot/setup.S in the kernel source tree.
Anytime you go into protected mode, you have to setup the gdt, and usually also the idt, which handles interrupts.
You can find more that you would ever want to know about it in the Intel reference manuals, but most folks just copy the table data from someone else. It is very painful code to debug, many bytes of the entries in the table requiring bit by bit settings.
-Steve