get sparc64 almost building (fails due to my binutils at the moment)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@60 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
parent
9448a7cffb
commit
6aa2681386
|
@ -52,6 +52,8 @@ static void (*sync_hook)(void);
|
||||||
|
|
||||||
static struct linux_romvec romvec0;
|
static struct linux_romvec romvec0;
|
||||||
|
|
||||||
|
static unsigned long free_ram;
|
||||||
|
|
||||||
static void doublewalk(__attribute__((unused)) unsigned int ptab1,
|
static void doublewalk(__attribute__((unused)) unsigned int ptab1,
|
||||||
__attribute__((unused)) unsigned int va)
|
__attribute__((unused)) unsigned int va)
|
||||||
{
|
{
|
||||||
|
@ -367,18 +369,18 @@ static int obp_inst2pkg(int dev_desc)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void obp_dumb_memfree(char *va, unsigned sz)
|
static void obp_dumb_memfree(__attribute__((unused))char *va,
|
||||||
|
__attribute__((unused))unsigned sz)
|
||||||
{
|
{
|
||||||
DPRINTF("obp_dumb_memfree 0x%x(%d)\n", va, sz);
|
DPRINTF("obp_dumb_memfree 0x%x(%d)\n", va, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * obp_dumb_memalloc(char *va, unsigned size)
|
static char * obp_dumb_memalloc(char *va, unsigned int size)
|
||||||
{
|
{
|
||||||
static char *pa = 0x4000000;
|
free_ram -= size;
|
||||||
|
DPRINTF("obp_dumb_memalloc req 0x%x of %d at 0x%x\n", va, size, free_ram);
|
||||||
|
obp_dumb_mmap(va, 1, free_ram, size);
|
||||||
|
|
||||||
DPRINTF("obp_dumb_memalloc req 0x%x of %d at 0x%x\n", va, size, pa);
|
|
||||||
obp_dumb_mmap(va, 1, pa, size);
|
|
||||||
pa += size;
|
|
||||||
return va;
|
return va;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,6 +446,8 @@ static void obp_fortheval_v2(char *str)
|
||||||
void *
|
void *
|
||||||
init_openprom(unsigned long memsize, const char *cmdline, char boot_device)
|
init_openprom(unsigned long memsize, const char *cmdline, char boot_device)
|
||||||
{
|
{
|
||||||
|
free_ram = va2pa((int)&_data) - PAGE_SIZE;
|
||||||
|
|
||||||
ptphys = totphys;
|
ptphys = totphys;
|
||||||
ptmap = totmap;
|
ptmap = totmap;
|
||||||
ptavail = totavail;
|
ptavail = totavail;
|
||||||
|
@ -457,7 +461,7 @@ init_openprom(unsigned long memsize, const char *cmdline, char boot_device)
|
||||||
|
|
||||||
totavail[0].theres_more = NULL;
|
totavail[0].theres_more = NULL;
|
||||||
totavail[0].start_adr = (char *) 0;
|
totavail[0].start_adr = (char *) 0;
|
||||||
totavail[0].num_bytes = va2pa((int)&_data) - PAGE_SIZE;
|
totavail[0].num_bytes = free_ram;
|
||||||
|
|
||||||
totmap[0].theres_more = NULL;
|
totmap[0].theres_more = NULL;
|
||||||
totmap[0].start_adr = &_start;
|
totmap[0].start_adr = &_start;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
2 encode-int " #address-cells" property
|
2 encode-int " #address-cells" property
|
||||||
1 encode-int " #size-cells" property
|
1 encode-int " #size-cells" property
|
||||||
|
|
||||||
: encode-unit encode-unit-sbus ;
|
\ : encode-unit encode-unit-sbus ;
|
||||||
: decode-unit decode-unit-sbus ;
|
\ : decode-unit decode-unit-sbus ;
|
||||||
|
|
||||||
new-device
|
new-device
|
||||||
" memory" device-name
|
" memory" device-name
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
/* cell based types */
|
/* cell based types */
|
||||||
typedef int64_t cell;
|
typedef int64_t cell;
|
||||||
typedef uint64_t ucell;
|
typedef uint64_t ucell;
|
||||||
typedef long long dcell;
|
typedef __int128_t dcell;
|
||||||
typedef unsigned long long ducell;
|
typedef __uint128_t ducell;
|
||||||
|
|
||||||
#define bitspercell (sizeof(cell)<<3)
|
#define bitspercell (sizeof(cell)<<3)
|
||||||
#define bitsperdcell (sizeof(dcell)<<3)
|
#define bitsperdcell (sizeof(dcell)<<3)
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<object source="elfnote.c" condition="X86"/>
|
<object source="elfnote.c" condition="X86"/>
|
||||||
<object source="elfnote.c" condition="AMD64"/>
|
<object source="elfnote.c" condition="AMD64"/>
|
||||||
<object source="elfnote.c" condition="SPARC32"/>
|
<object source="elfnote.c" condition="SPARC32"/>
|
||||||
|
<object source="elfnote.c" condition="SPARC64"/>
|
||||||
<object source="elfload.c" condition="PPC"/>
|
<object source="elfload.c" condition="PPC"/>
|
||||||
<object source="linuxbios.c" condition="LINUXBIOS"/>
|
<object source="linuxbios.c" condition="LINUXBIOS"/>
|
||||||
<object source="cmdline.c" condition="CMDLINE"/>
|
<object source="cmdline.c" condition="CMDLINE"/>
|
||||||
|
|
Loading…
Reference in New Issue