Commit graph

49 commits

Author SHA1 Message Date
Eric W. Biederman
bf85f95212 - Fix small syntax error in reset16.lds
- small bug fixes to the elf bootloader
- factor the elf bootloader into focused smal subroutines that are easier to comprehend
  and maintain
- Implement support for PT_NOTE headers and parsing ELF notes if we need special functionality
  An ELF Image should never need an ELF loader to interpret an ELF to work correctly, making
  interpretation of all ELF notes optional.
- Implement support for notes giving PROGRAM_NAME, PROGRAM_VERSION, and PROGRAM_CHECKSUM
2002-01-22 17:51:31 +00:00
Eric W. Biederman
7dc4c05383 Small update to the elf bootloader.
To keep confusion to a minimum refer to ELF segments as segments and not sections.
Ignore segments with types other than PT_LOAD (just in case...)
2002-01-16 17:35:46 +00:00
Eric W. Biederman
0f7f76fb40 Hopefully this is my last commit of major infrasture changes for a while.
Highlights:
 - elfboot.c Now can load images to the ram location where linuxBIOS is running
 - Added the standalone directory for bootloaders built from the linuxBIOS source

Other things:
- Correctly maode fallback_boot.c conditional
- Added entry32.lds to do the math for segment descriptor table entries
- Merged ldscript.cacheram and ldscript.base
- Moved assembly code to the sections .rom.text and .rom.data
- Modified linuxBIOS so C code completely runs from RAM as the SiS630
  case does
- Updated and commented example config files for the supermicro p4dc6
- Bumped the elfboot loader version to 1.0
- Removed extra carriage returns in dump_northbridge.inc (DOS->UNIX)
- General cleanups to the config of the supermicro p4dc6
2002-01-16 05:54:23 +00:00
Eric W. Biederman
7d601c3e2b - NLBConfig better error handling
- Implement payload so it attempts no processing of the image (I can now use it for ELF images!)
- Implement linux so it does what it has always done (but is now distinct from payload)
- Implement the new expr command so I can compute values (I got inspired)
- Micro fix to rom_fill_inbuf.c so we don't get back too many bytes (Thanks Ron)
- Fix for fallback_boot.c so it is always available.  Otherwise I can't say my boot succeeded.
- Added example config scripts for the p4dc6
2002-01-11 02:18:09 +00:00
Eric W. Biederman
9cda94e6d2 Updates to produce a linuxBIOS table. Modeled on the earlier
uniform_boot work, but relocated.  You need the new mkelfImage to
use the elf boot format.

Previous tables were updated so I could find both the start and
the end of where they were written in memory.

Minor p4dc6 updates, to disable some debugging code.

The mkelfImage-1.9 is checked in as util/mkelfImage
2002-01-08 07:04:35 +00:00
Li-Ta Lo
46c64c2bd8 added PCI IDs for SiS900 2002-01-03 04:02:06 +00:00
Li-Ta Lo
3112b98021 add SiS 735 ID 2002-01-02 06:10:56 +00:00
Li-Ta Lo
c2ea9c4b37 use SHIFT free version of flash_addrress for all cases 2001-12-28 06:25:34 +00:00
Eric W. Biederman
cb232f1e04 Lots and Lots of changes. Mainly bugfixes for the supermicro p4dc6,
and a bunch of generic changes.
- Started playing with automatic scanning memory for LinuxBIOS tables.
- Converted the fill_inbuf drivers to stream drivers.  This allows
  for pure data copying operations to be faster, and it allows skipping
  of unneeded data on platforms that support it.
- Added a section .rodata.streams for the stream driver control structures.
  This is preparation for building a bootloader that shares source code
  with LinuxBIOS.
- Added a driver command to NLBConfig.py for objects that should
  always be linked into LinuxBIOS if they are compiled at all.
- Moved the boot_successful logic down into the guts of the
  bootloaders.
- Modified the ip style checksum logic so it isn't specific to uniform
  boot headers...
- Added a function ndelay that uses the RTC (this is i786 specific for now).
- Added a function to delay in seconds for the braindead harddrive
  spinup logic.
- Added a floppy stream driver.
- Added a ide stream driver.
- Broke out the ram initialization for the p4dc6 into multiple c files.
- Stupidly adapted linuxbiosmain and do_inflate to the new stream
  interface.  get_byte is now a slow function call so it might be able
  to use some optimization.
- Updated the ELF bootloader to the new stream interface and adding a
  ELF header scanning function so we can boot off of harddrives and
  not smash their partition tables.
- Removed some bogus unlook ahead code from inflate.c
- Fixed a problem where we did not enable I/O resources on VGA
  compatible chips.  This caused a trident card to lock up the system
  when it's memory mapped resources were enabled.
- Correctly set up nested pci busses.  Before this a pci bus behind a
  pci bus would not get enabled.
- Config changes to the p4dc6
- Added more interrupt sources to the p4dc6 interrupt table
- Converted all of the inbuf drivers to stream drivers.
  All have good conversions except the doc_millenium.
2001-12-20 04:04:42 +00:00
Ronald G. Minnich
cda99b4425 missing newline at end of file.
bad syntax for else defined in ipl.S

ipl.S won't assemble on redhat 7.2, looks like YARB (Yet Another Redhat Bug)
2001-12-06 18:09:29 +00:00
Li-Ta Lo
c065013976 added doc and std flash reading code 2001-12-03 02:19:54 +00:00
Eric W. Biederman
2beb0a1bcc - Updates for the supermicro p4dc6 motherboard
- Code to initialize sdram from C on the l440gx
- cache as ram code fro the p6 it works except conflict misses occur
  with addresses that are not cached so writing to ram does not work.
  Which makes it to brittle to count on.
- Initial implementation of a fallback booting scheme where we can
  have two copies of linuxbios in rom at once.
- Movement of 32 bit entry code from entry16.inc to entry32.inc
- Update of all config files so they now also include entry32.inc
- Fix for start_stop.c & entry16.inc so I can fairly arbitrarily relocate
  the 16bit entry code in SMP.
- A small number of fixes for warnings
2001-11-27 19:29:59 +00:00
Li-Ta Lo
ff2025e3d1 support non-smp and no serial console cases 2001-11-13 06:31:17 +00:00
Eric W. Biederman
d96aab9e06 - Delayed commit of code for the ASUS A7M motherboard
- VIA 686 cleanups from the A7M code (it now works in a different pci slot).
- Update of assembly printing routines to use the debug levels:
  TTYS0_TX_CHAR now becomes CONSOLE_<LEVEL>_TX_CHAR.
  It's more verbose but now the controls are the same as with the C code.
- Break off of loglevel.h from printk.h.  loglevel.h is safe for both
  the assembly routines and the C code to include.
- Next round of commits for the supermicro p4dc6
- SMP setup updates (Rons board is broken)
  I now allow the other SMP processors to report their existence.
  I really need to add a minimum time to run but that hasn't happened yet.
- SMP per motherboard table of apicids, as the assumption that they
  would always be 0 & 1 with only two cpus fails.
- RDRAM setup updates.  The code isn't done but it now works on more
  than one board at a time.
- More cacheram work.  Minor bug fixes and some macros to use it from C.
- Entry point changes so we no longer have to jump over our gdt.
- Added/Audited the cpufixup for the i786
- IDE intialization for the 82801 ich2 chip.
2001-11-13 03:43:37 +00:00
Eric W. Biederman
a8151ba2cd Initial checkin for supermicro p4dc6
This also includes a bunch of my pending work including
- Updated serial code so we can compile in different serial port speeds
- Updates to the build system so that:
  - Makefile.settings holds all of the settings of the config variables
  - ldoptions and cpuflags are generated automatically with perl scripts
  - src/config/Config holds all of the architecture neutral make file settings
- Initial work on the P4 including how to use cache as ram
- Update to the ioapic code for the P4 because it delivers irqs on the system
  bus instead of an out of band bus
- Updated version of printf that doesn't need an intermediate buffer
  - logbuf_subr now handles the case when we want to use a log buffer
- video_subr handles the preliminary code for writing to a video device.
- Pending changes for the L440GX are merged in as well (hopefully I haven't
  messed then up since they were written).
2001-11-03 02:11:49 +00:00
Ronald G. Minnich
71022a5661 added debug option for get_byte to dump every byte.
Fix for technoland config
Added new anal-retentive DoC code for those who want it to docmil_fill_inbuf
added .h files for new DoC code.
2001-10-24 16:13:42 +00:00
Ronald G. Minnich
05d93f1aa3 Fixes to make the w83627hf work with the new superio setup. 2001-10-16 17:09:07 +00:00
Ronald G. Minnich
b890f329df Simple fixup for non-SMP linuxbioses 2001-10-15 22:59:38 +00:00
Ronald G. Minnich
ce6c4c7195 Minor SMP fixes. Fix to linuxpci to catch buggy chipsets 2001-10-15 18:19:40 +00:00
Eric W. Biederman
6032f86410 make.base
Add rule for ldscript.ld
printk.h
      Fix typo it should be printk_alert not printk_alart...
NLBConfig.py
      - Removed some dead code
      - Modified mainboardinit and ldscript to act like my recently modified
        object command and take as a suffix a config option that must be
        set to one for them to work.
      - No longer generate ldscript.ld instead generate ldoptions and
        the variable LDSUBSCRIPTS-1.
2001-08-22 01:07:18 +00:00
Eric W. Biederman
71be41d193 make.base(i386 & alpha)
make.base -- renamed OBJECTS to OBJECTS-1 to allow conditional compilation of objects
ldscript.base -- realized that assignemnts to the location counter inside of sections
           are relative to their start so simplfied the code
pirq_routing.h -- includeded types.h so we don't have suprises
hardwaremain.c -- unconditionally included arch/smp/mpsec.h
arch/i386/smp/Config introduced conitional on the compilation objects into
                  the compilation process
         ioapic.c -- removed (now) unneeded ifdef around this file
         mpsec.c -- removed (now) unneeded ifdef around this file

cpu/cpufixup.h -- Fix typo in the case when no cpufixup is needed.
parts/framebuffer.h -- Added a missing semicolon.
smp/atomic.h -- renamed second atmoic_inc to atomic_dec oops.

tyan/guinnes/Config -- reordered the options so they are grouped a little
                better and said mptable.o is dependent on HAVE_MP_TABLE
tyan/guiness/mainboard.c -- small change for clarity.

northsouthbridge/sis/630/northbridge.c
northsouthbridge/sis/630/southbridge.c
           -- Remove unused include of the now dead param.h

NLBConfig.py
          -- Only include numeric options in the linker script
          -- Update to handle adding a condition for when to build
             objects
2001-08-15 21:30:08 +00:00
Eric W. Biederman
94b5887f47 Add missing semicolon in smp/atomic.h 2001-08-09 19:48:33 +00:00
Eric W. Biederman
064f2b32fd Fix the pirq routing stuff. 2001-08-08 20:35:11 +00:00
Eric W. Biederman
ed8c9d7e0d Code changes from my work and the AMD760MP chipset.
The primary changes is the way in which printk works.
But there are many other assorted code cleanups.
Just look and see :)
2001-08-08 02:45:10 +00:00
Eric W. Biederman
ebccffe3d0 pci_ids.h --- Added new ids.
boot.c  -- Modified to compile even with -fPIC
generic_sdram.inc -- split out generic_sdram_enable.inc -- Some chipsets
    don't need that enable logic.
Added serial_fill_inbuf.c
Removed unused 440gx/param.h sis/630/param.h
Modified: make.base crt0.base ldscript.base mainboard/Config and NLBConfig.py

In NLBConfig.py added the directive mainboardinit (a variant of raminit.inc)
  This allows us to remove hardcodes in crt0.S updated every mainboard/Config to
  reflect the current state of the hardcodes, and the split of generic_sdram.inc
  In crt0.S we should have the bare minimum code in assembly needed to get to C code.

mkrom is no longer needed.
2001-08-07 23:41:49 +00:00
Eric W. Biederman
228148aa23 Start of merge from work on the AMD760MP platform.
This is the safe part just additions to files, and comment changes
2001-08-07 19:46:37 +00:00
Ronald G. Minnich
adfa49add4 Fully configure-ized version of an SMC superio 2001-07-18 15:00:53 +00:00
Li-Ta Lo
efcf2d7622 add SiS 550 PCI IDs 2001-04-19 05:31:21 +00:00
Ronald G. Minnich
b1e09fa054 Chances for the new superio setup. pci.h has new structs.
newpci.c has some new functions. asus config is fixed for i386 stuff.
NLBconfig has a new command (nsuperio) and will take arch, mainboard, or
target as the first command. sis 950 superio has changes for the new
superio model
2001-04-11 21:38:46 +00:00
Eric W. Biederman
0785f9f233 Final updates for my code cleanup and alpha code merge. 2001-03-23 22:56:05 +00:00
Eric W. Biederman
24fe8d03aa Next in my series of cleanups form the alpha port nothing should break yet... 2001-03-23 21:03:13 +00:00
Ronald G. Minnich
faf0c47b79 testing I HATE CVS 2001-03-22 21:26:32 +00:00
Ronald G. Minnich
227ca052f7 Changes from Eric for Alpha and other support 2001-03-13 04:22:19 +00:00
Ronald G. Minnich
e94eeb3d9d Patches for tyson that do the following:
Added set_initrd() to params.h and params.c.

Added PRINTK macro and KERN_SPEW to printk.h.

Changed fill_inbuf.c to accept zkernel_start and zknernel_mask as
variables that can be set by linuxbiosmain().

Changed linuxbiosmain() to allow custom code to modify some parameters
such as where the kernel image is located in ROM, the initrd parameters
and the command line.

Change most of the DBG's in newpci.c to PRINTK(KERN_SPEW...  This was
the worst offender when DEBUG was defined.  Some of it was changed to
KERN_DEBUG.

There are no new files this time, however,
freebios-010214.orig/src/superio/SMC/fdc37n769/superio.inc
remains and needs to be deleted and then 'cvs rm'.

None of these changes should break any other code.  The same
ZKERNEL_START, ZKERNEL_MASK and CMD_LINE defines are still used, but
are now all used in linuxbiosmain() and used to initialize variables
that can later be changed rather than used directly.

These changes allow me to choose between two kernel images, optionally
use an initrd image, load the initrd image and set the kernel command
line as needed.
2001-02-15 15:23:06 +00:00
Ronald G. Minnich
ebe1662d07 Changes for the new mainboard from VIA. 2001-02-07 18:35:22 +00:00
Li-Ta Lo
ffa86f1fb3 fixed a typo on 730 device id 2001-01-29 07:53:52 +00:00
Ronald G. Minnich
b56912ec3a Fixes for CMD_LINE, and other fixes to set up ga-6bxc.
mtrr.c, remove redundant define
string.h bug with 0 in strlen
2001-01-18 23:11:26 +00:00
Li-Ta Lo
7c4b9e606a prepare for SiS 730 support, let's wait and see 2000-12-20 09:08:40 +00:00
Ronald G. Minnich
980dff7eff Continuing fixes for acer. 2000-12-15 00:58:14 +00:00
Li-Ta Lo
79ff9ed5cc MSR names for L2 cache init 2000-12-06 10:58:20 +00:00
Li-Ta Lo
d3e4c27442 use TSC to minotoring the performance of LinuxBIOS 2000-12-02 05:48:29 +00:00
Li-Ta Lo
f0ea4a2bc0 Debug message is disabled by default now. If you want to show the message,
please add "option DEBUG" in the config file or in the C source

#define DEBUG
#include <printk.h>
2000-12-01 08:59:47 +00:00
Ronald G. Minnich
770e5be5fb Gradual fixes for the new config program. Also removing all references
to NEWPCI -- the old code is long gone.
2000-11-14 05:35:34 +00:00
Ronald G. Minnich
3fc0d49e96 Simplified tty for argument passing to kernel 2000-10-18 17:21:31 +00:00
Ronald G. Minnich
a81104004a basic types 2000-10-18 17:20:39 +00:00
Ronald G. Minnich
787deb4ae4 Fixes so we don't use any of the standard include paths 2000-10-17 22:58:51 +00:00
Ronald G. Minnich
ef20fb22dc reorg, and recovery from my mistake. 2000-10-17 20:49:18 +00:00
Ronald G. Minnich
d0d1e8dea2 reorg 2000-10-17 03:24:23 +00:00
Ronald G. Minnich
69e023b385 Code reorg 2000-10-16 23:47:28 +00:00