mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
We have merged the plethora of include files into one. A given linuxbios target architecture must support all the functions described therein. All the structs etc. in include/tables.h are known to be architecture-independent. We hope this new layout is easier to folow than the old one. Todo: Remove the LGDT code from tables writing (how did THAT get in there ;-) and put it somewhere sane; add OFW table support. We are going to need some nice OFW table code. Also, the license headers should be correct in this commit. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@128 f3766cd6-281f-0410-b1cd-43a5c92072e9
47 lines
1.5 KiB
C
47 lines
1.5 KiB
C
/*
|
|
* table management code for Linux BIOS
|
|
* This is the architecture-independent driver; it has a hook to architecture-dependent code.
|
|
*
|
|
* Copright (C) 2002 Eric Biederman, Linux NetworX
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; version 2 of the License.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
|
|
*
|
|
*/
|
|
|
|
#include <console/console.h>
|
|
#include <cpu.h>
|
|
#include <tables.h>
|
|
#include <boot/linuxbios_tables.h>
|
|
|
|
struct lb_memory *
|
|
write_tables(void)
|
|
{
|
|
unsigned long low_table_start, low_table_end;
|
|
unsigned long rom_table_start, rom_table_end;
|
|
|
|
rom_table_start = 0xf0000;
|
|
rom_table_end = 0xf0000;
|
|
/* Start low addr at 16 bytes instead of 0 because of a buglet
|
|
* in the generic linux unzip code, as it tests for the a20 line.
|
|
*/
|
|
low_table_start = 0;
|
|
low_table_end = 16;
|
|
|
|
/* The linuxbios table must be in 0-4K or 960K-1M */
|
|
write_linuxbios_table(
|
|
low_table_start, low_table_end,
|
|
rom_table_start, rom_table_end);
|
|
|
|
return get_lb_mem();
|
|
}
|