- Support for a LinuxBIOS version number (start at 1.0.0)
- Support for remember our compile time environment - Simple and always correct version of compute_ip_checksum - Improve message strings in crt0.base - Initial support for > 2G ram. - Sizeram now returns a list of valid ranges of ram - pci resource allocation now starts at 0xC0000000 - Update sizeram for every northbridge - Misc cleanups.
This commit is contained in:
parent
9deed69cdd
commit
e803bc7bd4
63 changed files with 1370 additions and 912 deletions
|
|
@ -3,10 +3,12 @@
|
|||
|
||||
#include <boot/linuxbios_tables.h>
|
||||
|
||||
struct mem_range;
|
||||
|
||||
/* This file holds function prototypes for building the linuxbios table. */
|
||||
unsigned long write_linuxbios_table(
|
||||
unsigned long *processor_map,
|
||||
unsigned long totalram,
|
||||
struct mem_range *ram,
|
||||
unsigned long low_table_start, unsigned long low_table_end,
|
||||
unsigned long rom_table_start, unsigned long rom_table_end);
|
||||
|
||||
|
|
@ -17,7 +19,7 @@ struct lb_record *lb_next_record(struct lb_record *rec);
|
|||
struct lb_record *lb_new_record(struct lb_header *header);
|
||||
struct lb_memory *lb_memory(struct lb_header *header);
|
||||
void lb_memory_range(struct lb_memory *mem,
|
||||
uint32_t type, unsigned long start, unsigned long size);
|
||||
uint32_t type, unsigned long startk, unsigned long sizek);
|
||||
struct lb_mainboard *lb_mainboard(struct lb_header *header);
|
||||
unsigned long lb_table_fini(struct lb_header *header);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,8 +61,9 @@ struct lb_memory_range {
|
|||
uint64_t start;
|
||||
uint64_t size;
|
||||
uint32_t type;
|
||||
#define LB_MEM_RAM 1
|
||||
#define LB_MEM_RESERVED 2
|
||||
#define LB_MEM_RAM 1 /* Memory anyone can use */
|
||||
#define LB_MEM_RESERVED 2 /* Don't use this memory region */
|
||||
#define LB_MEM_TABLE 16 /* Ram configuration tables are kept in */
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -88,7 +89,21 @@ struct lb_mainboard {
|
|||
uint8_t strings[0];
|
||||
};
|
||||
|
||||
|
||||
#define LB_TAG_VERSION 0x0004
|
||||
#define LB_TAG_EXTRA_VERSION 0x0005
|
||||
#define LB_TAG_BUILD 0x0006
|
||||
#define LB_TAG_COMPILE_TIME 0x0007
|
||||
#define LB_TAG_COMPILE_BY 0x0008
|
||||
#define LB_TAG_COMPILE_HOST 0x0009
|
||||
#define LB_TAG_COMPILE_DOMAIN 0x000a
|
||||
#define LB_TAG_COMPILER 0x000b
|
||||
#define LB_TAG_LINKER 0x000c
|
||||
#define LB_TAG_ASSEMBLER 0x000d
|
||||
struct lb_string {
|
||||
uint32_t tag;
|
||||
uint32_t size;
|
||||
uint8_t string[0];
|
||||
};
|
||||
|
||||
/* The following structures are for the cmos definitions table */
|
||||
#define LB_TAG_CMOS_OPTION_TABLE 200
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
#ifndef CPU_CPUFIXUP_H
|
||||
#define CPU_CPUFIXUP_H
|
||||
|
||||
struct mem_range;
|
||||
|
||||
#include <cpu/k7/cpufixup.h>
|
||||
#include <cpu/p6/cpufixup.h>
|
||||
|
||||
#ifdef CPU_FIXUP
|
||||
# if defined(k7)
|
||||
# define cpufixup(totalram) k7_cpufixup(totalram)
|
||||
# define cpufixup(mem) k7_cpufixup(mem)
|
||||
# elif defined(i786)
|
||||
# define cpufixup(totalram) p6_cpufixup(totalram)
|
||||
# define cpufixup(mem) p6_cpufixup(mem)
|
||||
# elif defined(i686)
|
||||
# define cpufixup(totalram) p6_cpufixup(totalram)
|
||||
# define cpufixup(mem) p6_cpufixup(mem)
|
||||
# endif
|
||||
#else
|
||||
# define cpufixup(totalram) do {} while(0)
|
||||
# define cpufixup(mem) do {} while(0)
|
||||
#endif
|
||||
|
||||
#endif /* CPU_CPUFIXUP_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef CPU_K7_CPUFIXUP_H
|
||||
#define CPU_K7_CPUFIXUP_H
|
||||
|
||||
void k7_cpufixup(unsigned long totalram);
|
||||
void k7_cpufixup(struct mem_range *mem);
|
||||
|
||||
#endif /* CPU_K7_CPUFIXUP_H */
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@
|
|||
#define CPU_FIXUP
|
||||
#endif
|
||||
|
||||
void p6_cpufixup(unsigned long totalram);
|
||||
void p6_cpufixup(struct mem_range *mem);
|
||||
|
||||
#endif /* CPU_P6_CPUFIXUP_H */
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@
|
|||
|
||||
void set_var_mtrr(unsigned int reg, unsigned long base, unsigned long size, unsigned char type);
|
||||
#if defined(INTEL_PPRO_MTRR)
|
||||
void setup_mtrrs(unsigned long ramsizeK);
|
||||
struct mem_range;
|
||||
void setup_mtrrs(struct mem_range *mem);
|
||||
#endif
|
||||
|
||||
#endif /* ASSEMBLY */
|
||||
|
|
|
|||
11
src/include/mem.h
Normal file
11
src/include/mem.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef MEM_H
|
||||
#define MEM_H
|
||||
|
||||
struct mem_range {
|
||||
unsigned long basek;
|
||||
unsigned long sizek;
|
||||
};
|
||||
|
||||
/* mem_range arrays are non-overlapping, in ascending order and null terminated */
|
||||
|
||||
#endif /* MEM_H */
|
||||
6
src/include/northbridge/amd/amd76x.h
Normal file
6
src/include/northbridge/amd/amd76x.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef AMD76X_H
|
||||
#define AMD76X_H
|
||||
|
||||
void amd76x_setup_pci_arbiter(void);
|
||||
|
||||
#endif /* AMD76X_H */
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef PART_SIZERAM_H
|
||||
#define PART_SIZERAM_H
|
||||
|
||||
unsigned long sizeram(void);
|
||||
struct mem_rang;
|
||||
struct mem_range *sizeram(void);
|
||||
|
||||
#endif /* PART_SIZERAM_H */
|
||||
|
|
|
|||
|
|
@ -10,18 +10,22 @@
|
|||
|
||||
//extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;}
|
||||
|
||||
static inline size_t strnlen(const char *src, size_t max) {
|
||||
int i = 0;
|
||||
if (max<0) {
|
||||
while (*src++)
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
else {
|
||||
while ((*src++) && (i < max))
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
static inline size_t strnlen(const char *src, size_t max)
|
||||
{
|
||||
size_t i = 0;
|
||||
while((*src++) && (i < max)) {
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
static inline size_t strlen(const char *src)
|
||||
{
|
||||
size_t i = 0;
|
||||
while(*src++) {
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
extern void *memcpy(void *dest, const void *src, size_t n);
|
||||
|
|
|
|||
22
src/include/version.h
Normal file
22
src/include/version.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
/* Motherboard Information */
|
||||
extern const char mainboard_vendor[];
|
||||
extern const char mainboard_part_number[];
|
||||
|
||||
/* LinuxBIOS Version */
|
||||
extern const char linuxbios_version[];
|
||||
extern const char linuxbios_extra_version[];
|
||||
extern const char linuxbios_build[];
|
||||
|
||||
/* When LinuxBIOS was compiled */
|
||||
extern const char linuxbios_compile_time[];
|
||||
extern const char linuxbios_compile_by[];
|
||||
extern const char linuxbios_compile_host[];
|
||||
extern const char linuxbios_compile_domain[];
|
||||
extern const char linuxbios_compiler[];
|
||||
extern const char linuxbios_linker[];
|
||||
extern const char linuxbios_assembler[];
|
||||
|
||||
#endif /* VERSION_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue