mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
openbios.patch-15-svn25.bz2 part II merge
git-svn-id: svn://coreboot.org/openbios/openbios-devel@27 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -57,16 +57,23 @@ int aout_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
int image_retval;
|
int image_retval;
|
||||||
struct exec ehdr;
|
struct exec ehdr;
|
||||||
unsigned long start, size;
|
unsigned long start, size;
|
||||||
|
unsigned int offset;
|
||||||
|
|
||||||
image_name = image_version = 0;
|
image_name = image_version = 0;
|
||||||
|
|
||||||
if (!file_open(filename))
|
if (!file_open(filename))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (lfile_read(&ehdr, sizeof ehdr) != sizeof ehdr) {
|
for (offset = 0; offset < 16 * 512; offset += 512) {
|
||||||
debug("Can't read a.out header\n");
|
if (lfile_read(&ehdr, sizeof ehdr) != sizeof ehdr) {
|
||||||
retval = LOADER_NOT_SUPPORT;
|
debug("Can't read a.out header\n");
|
||||||
goto out;
|
retval = LOADER_NOT_SUPPORT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
if (!N_BADMAG(ehdr))
|
||||||
|
break;
|
||||||
|
|
||||||
|
file_seek(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (N_BADMAG(ehdr)) {
|
if (N_BADMAG(ehdr)) {
|
||||||
@@ -76,9 +83,9 @@ int aout_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (N_MAGIC(ehdr) == NMAGIC) {
|
if (N_MAGIC(ehdr) == NMAGIC) {
|
||||||
size = N_DATADDR(ehdr) + ehdr.a_data;
|
size = addr_fixup(N_DATADDR(ehdr)) + addr_fixup(ehdr.a_data);
|
||||||
} else {
|
} else {
|
||||||
size = ehdr.a_text + ehdr.a_data;
|
size = addr_fixup(ehdr.a_text) + addr_fixup(ehdr.a_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
start = 0x4000; // N_TXTADDR(ehdr);
|
start = 0x4000; // N_TXTADDR(ehdr);
|
||||||
@@ -88,7 +95,7 @@ int aout_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
|
|
||||||
printf("Loading a.out %s...\n", image_name ? image_name : "image");
|
printf("Loading a.out %s...\n", image_name ? image_name : "image");
|
||||||
|
|
||||||
file_seek(N_TXTOFF(ehdr));
|
file_seek(offset + N_TXTOFF(ehdr));
|
||||||
|
|
||||||
if (N_MAGIC(ehdr) == NMAGIC) {
|
if (N_MAGIC(ehdr) == NMAGIC) {
|
||||||
if (lfile_read(start, ehdr.a_text) != ehdr.a_text) {
|
if (lfile_read(start, ehdr.a_text) != ehdr.a_text) {
|
||||||
@@ -108,18 +115,19 @@ int aout_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
|
|
||||||
debug("Loaded %lu bytes\n", size);
|
debug("Loaded %lu bytes\n", size);
|
||||||
|
|
||||||
debug("entry point is %#x\n", start);
|
debug("entry point is %#lx\n", start);
|
||||||
printf("Jumping to entry point...\n");
|
printf("Jumping to entry point...\n");
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
{
|
{
|
||||||
extern unsigned int qemu_mem_size;
|
extern unsigned int qemu_mem_size;
|
||||||
|
extern char boot_device;
|
||||||
void *init_openprom(unsigned long memsize, const char *cmdline, char boot_device);
|
void *init_openprom(unsigned long memsize, const char *cmdline, char boot_device);
|
||||||
|
|
||||||
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
||||||
const void *romvec;
|
const void *romvec;
|
||||||
|
|
||||||
romvec = init_openprom(qemu_mem_size, cmdline, 'c');
|
romvec = init_openprom(qemu_mem_size, cmdline, boot_device);
|
||||||
entry = (void *) addr_fixup(start);
|
entry = (void *) addr_fixup(start);
|
||||||
image_retval = entry(romvec, 0, 0, 0, 0);
|
image_retval = entry(romvec, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,24 +16,54 @@ int linux_load(struct sys_info *, const char *filename, const char *cmdline);
|
|||||||
void boot(void);
|
void boot(void);
|
||||||
|
|
||||||
struct sys_info sys_info;
|
struct sys_info sys_info;
|
||||||
|
uint32_t kernel_image;
|
||||||
|
uint32_t kernel_size;
|
||||||
|
uint32_t cmdline;
|
||||||
|
uint32_t cmdline_size;
|
||||||
|
char boot_device;
|
||||||
|
|
||||||
void boot(void)
|
void boot(void)
|
||||||
{
|
{
|
||||||
char *path=pop_fstr_copy(), *param;
|
char *path=pop_fstr_copy(), *param;
|
||||||
|
|
||||||
// char *param="root=/dev/hda2 console=ttyS0,115200n8 console=tty0";
|
if (kernel_size) {
|
||||||
|
extern unsigned int qemu_mem_size;
|
||||||
|
void *init_openprom(unsigned long memsize, const char *cmdline, char boot_device);
|
||||||
|
|
||||||
|
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
||||||
|
const void *romvec;
|
||||||
|
|
||||||
|
printk("[sparc] Kernel already loaded\n");
|
||||||
|
romvec = init_openprom(qemu_mem_size, (void *)cmdline, boot_device);
|
||||||
|
entry = (void *) kernel_image;
|
||||||
|
entry(romvec, 0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if(!path) {
|
if(!path) {
|
||||||
|
switch(boot_device) {
|
||||||
|
case 'a':
|
||||||
|
path = "/obio/SUNW,fdtwo";
|
||||||
|
break;
|
||||||
|
case 'c':
|
||||||
|
path = "disk";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case 'd':
|
||||||
path = "cdrom";
|
path = "cdrom";
|
||||||
//printk("[sparc] Booting default not supported.\n");
|
break;
|
||||||
//return;
|
case 'n':
|
||||||
|
path = "net";
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
param = strchr(path, ' ');
|
param = strchr(path, ' ');
|
||||||
if(param) {
|
if(param) {
|
||||||
*param = '\0';
|
*param = '\0';
|
||||||
param++;
|
param++;
|
||||||
}
|
} else if (cmdline_size) {
|
||||||
|
param = (char *)cmdline;
|
||||||
|
}
|
||||||
|
|
||||||
printk("[sparc] Booting file '%s' with parameters '%s'\n",path, param);
|
printk("[sparc] Booting file '%s' with parameters '%s'\n",path, param);
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ badseg:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long process_image_notes(Elf_phdr *phdr, int phnum,
|
static unsigned long process_image_notes(Elf_phdr *phdr, int phnum,
|
||||||
unsigned short *sum_ptr)
|
unsigned short *sum_ptr,
|
||||||
|
unsigned int offset)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
@@ -90,7 +91,7 @@ static unsigned long process_image_notes(Elf_phdr *phdr, int phnum,
|
|||||||
if (phdr[i].p_type != PT_NOTE)
|
if (phdr[i].p_type != PT_NOTE)
|
||||||
continue;
|
continue;
|
||||||
buf = malloc(phdr[i].p_filesz);
|
buf = malloc(phdr[i].p_filesz);
|
||||||
file_seek(phdr[i].p_offset);
|
file_seek(offset + phdr[i].p_offset);
|
||||||
if (lfile_read(buf, phdr[i].p_filesz) != phdr[i].p_filesz) {
|
if (lfile_read(buf, phdr[i].p_filesz) != phdr[i].p_filesz) {
|
||||||
printf("Can't read note segment\n");
|
printf("Can't read note segment\n");
|
||||||
goto out;
|
goto out;
|
||||||
@@ -132,7 +133,8 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int load_segments(Elf_phdr *phdr, int phnum,
|
static int load_segments(Elf_phdr *phdr, int phnum,
|
||||||
unsigned long checksum_offset)
|
unsigned long checksum_offset,
|
||||||
|
unsigned int offset)
|
||||||
{
|
{
|
||||||
unsigned long bytes;
|
unsigned long bytes;
|
||||||
//unsigned int start_time, time;
|
//unsigned int start_time, time;
|
||||||
@@ -145,7 +147,7 @@ static int load_segments(Elf_phdr *phdr, int phnum,
|
|||||||
continue;
|
continue;
|
||||||
debug("segment %d addr:%#x file:%#x mem:%#x ",
|
debug("segment %d addr:%#x file:%#x mem:%#x ",
|
||||||
i, addr_fixup(phdr[i].p_paddr), phdr[i].p_filesz, phdr[i].p_memsz);
|
i, addr_fixup(phdr[i].p_paddr), phdr[i].p_filesz, phdr[i].p_memsz);
|
||||||
file_seek(phdr[i].p_offset);
|
file_seek(offset + phdr[i].p_offset);
|
||||||
debug("loading... ");
|
debug("loading... ");
|
||||||
if (lfile_read(phys_to_virt(addr_fixup(phdr[i].p_paddr)), phdr[i].p_filesz)
|
if (lfile_read(phys_to_virt(addr_fixup(phdr[i].p_paddr)), phdr[i].p_filesz)
|
||||||
!= phdr[i].p_filesz) {
|
!= phdr[i].p_filesz) {
|
||||||
@@ -309,16 +311,24 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
Elf_Bhdr *boot_notes = NULL;
|
Elf_Bhdr *boot_notes = NULL;
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
int image_retval;
|
int image_retval;
|
||||||
|
unsigned int offset;
|
||||||
|
|
||||||
image_name = image_version = 0;
|
image_name = image_version = 0;
|
||||||
|
|
||||||
if (!file_open(filename))
|
if (!file_open(filename))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (lfile_read(&ehdr, sizeof ehdr) != sizeof ehdr) {
|
for (offset = 0; offset < 16 * 512; offset += 512) {
|
||||||
debug("Can't read ELF header\n");
|
if (lfile_read(&ehdr, sizeof ehdr) != sizeof ehdr) {
|
||||||
retval = LOADER_NOT_SUPPORT;
|
debug("Can't read ELF header\n");
|
||||||
goto out;
|
retval = LOADER_NOT_SUPPORT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ehdr.e_ident[EI_MAG0] == ELFMAG0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
file_seek(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ehdr.e_ident[EI_MAG0] != ELFMAG0
|
if (ehdr.e_ident[EI_MAG0] != ELFMAG0
|
||||||
@@ -339,7 +349,7 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
|
|
||||||
phdr_size = ehdr.e_phnum * sizeof *phdr;
|
phdr_size = ehdr.e_phnum * sizeof *phdr;
|
||||||
phdr = malloc(phdr_size);
|
phdr = malloc(phdr_size);
|
||||||
file_seek(ehdr.e_phoff);
|
file_seek(offset + ehdr.e_phoff);
|
||||||
if (lfile_read(phdr, phdr_size) != phdr_size) {
|
if (lfile_read(phdr, phdr_size) != phdr_size) {
|
||||||
printf("Can't read program header\n");
|
printf("Can't read program header\n");
|
||||||
goto out;
|
goto out;
|
||||||
@@ -348,14 +358,14 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
if (!check_mem_ranges(info, phdr, ehdr.e_phnum))
|
if (!check_mem_ranges(info, phdr, ehdr.e_phnum))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
checksum_offset = process_image_notes(phdr, ehdr.e_phnum, &checksum);
|
checksum_offset = process_image_notes(phdr, ehdr.e_phnum, &checksum, offset);
|
||||||
|
|
||||||
printf("Loading %s", image_name ? image_name : "image");
|
printf("Loading %s", image_name ? image_name : "image");
|
||||||
if (image_version)
|
if (image_version)
|
||||||
printf(" version %s", image_version);
|
printf(" version %s", image_version);
|
||||||
printf("...\n");
|
printf("...\n");
|
||||||
|
|
||||||
if (!load_segments(phdr, ehdr.e_phnum, checksum_offset))
|
if (!load_segments(phdr, ehdr.e_phnum, checksum_offset, offset))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (checksum_offset) {
|
if (checksum_offset) {
|
||||||
@@ -373,12 +383,13 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline)
|
|||||||
#if 1
|
#if 1
|
||||||
{
|
{
|
||||||
extern unsigned int qemu_mem_size;
|
extern unsigned int qemu_mem_size;
|
||||||
|
extern char boot_device;
|
||||||
void *init_openprom(unsigned long memsize, const char *cmdline, char boot_device);
|
void *init_openprom(unsigned long memsize, const char *cmdline, char boot_device);
|
||||||
|
|
||||||
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
||||||
const void *romvec;
|
const void *romvec;
|
||||||
|
|
||||||
romvec = init_openprom(qemu_mem_size, cmdline, 'c');
|
romvec = init_openprom(qemu_mem_size, cmdline, boot_device);
|
||||||
entry = (void *) addr_fixup(ehdr.e_entry);
|
entry = (void *) addr_fixup(ehdr.e_entry);
|
||||||
image_retval = entry(romvec, 0, 0, 0, 0);
|
image_retval = entry(romvec, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,10 @@
|
|||||||
void boot(void);
|
void boot(void);
|
||||||
void ob_ide_init(void);
|
void ob_ide_init(void);
|
||||||
|
|
||||||
|
#define IOMMU_BASE 0x10000000 /* First page of sun4m IOMMU */
|
||||||
|
#define SLAVIO_BASE 0x71000000
|
||||||
|
#define MACIO_BASE 0x70000000
|
||||||
|
|
||||||
static unsigned char intdict[256 * 1024];
|
static unsigned char intdict[256 * 1024];
|
||||||
|
|
||||||
static void init_memory(void)
|
static void init_memory(void)
|
||||||
@@ -50,17 +54,19 @@ arch_init( void )
|
|||||||
|
|
||||||
modules_init();
|
modules_init();
|
||||||
#ifdef CONFIG_DRIVER_SBUS
|
#ifdef CONFIG_DRIVER_SBUS
|
||||||
init_mmu_swift();
|
init_mmu_swift(IOMMU_BASE);
|
||||||
|
|
||||||
ob_sbus_init();
|
ob_sbus_init();
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_DRIVER_ESP
|
#ifdef CONFIG_DRIVER_ESP
|
||||||
ob_esp_init();
|
ob_esp_init(MACIO_BASE);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_DRIVER_OBIO
|
#ifdef CONFIG_DRIVER_OBIO
|
||||||
ob_obio_init(0x71000000);
|
ob_obio_init(SLAVIO_BASE);
|
||||||
|
nvram_init();
|
||||||
#endif
|
#endif
|
||||||
device_end();
|
device_end();
|
||||||
|
|
||||||
bind_func("platform-boot", boot );
|
bind_func("platform-boot", boot );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ static const struct linux_arguments_v0 * const obp_argp = &obp_arg;
|
|||||||
static void (*synch_hook)(void);
|
static void (*synch_hook)(void);
|
||||||
|
|
||||||
static struct linux_romvec romvec0;
|
static struct linux_romvec romvec0;
|
||||||
static int prop_mem_reg[3];
|
|
||||||
static int prop_mem_avail[3];
|
|
||||||
static int prop_vmem_avail[6];
|
|
||||||
|
|
||||||
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)
|
||||||
@@ -418,31 +415,18 @@ init_openprom(unsigned long memsize, const char *cmdline, char boot_device)
|
|||||||
/*
|
/*
|
||||||
* Form memory descriptors.
|
* Form memory descriptors.
|
||||||
*/
|
*/
|
||||||
totphys[0].theres_more = 0;
|
totphys[0].theres_more = NULL;
|
||||||
totphys[0].start_adr = (char *) 0;
|
totphys[0].start_adr = (char *) 0;
|
||||||
totphys[0].num_bytes = memsize;
|
totphys[0].num_bytes = memsize;
|
||||||
|
|
||||||
totavail[0].theres_more = 0;
|
totavail[0].theres_more = NULL;
|
||||||
totavail[0].start_adr = (char*) 0;
|
totavail[0].start_adr = (char *) 0;
|
||||||
totavail[0].num_bytes = memsize;
|
totavail[0].num_bytes = memsize;
|
||||||
|
|
||||||
totmap[0].theres_more = 0;
|
totmap[0].theres_more = NULL;
|
||||||
totmap[0].start_adr = &_start;
|
totmap[0].start_adr = &_start;
|
||||||
totmap[0].num_bytes = (unsigned long) &_iomem - (unsigned long) &_start;
|
totmap[0].num_bytes = (unsigned long) &_iomem - (unsigned long) &_start;
|
||||||
|
|
||||||
prop_mem_reg[0] = 0;
|
|
||||||
prop_mem_reg[1] = 0;
|
|
||||||
prop_mem_reg[2] = memsize;
|
|
||||||
prop_mem_avail[0] = 0;
|
|
||||||
prop_mem_avail[1] = 0;
|
|
||||||
prop_mem_avail[2] = va2pa((unsigned long)&_data) - 1;
|
|
||||||
prop_vmem_avail[0] = 0;
|
|
||||||
prop_vmem_avail[1] = 0;
|
|
||||||
prop_vmem_avail[2] = (unsigned long)&_start - 1;
|
|
||||||
prop_vmem_avail[3] = 0;
|
|
||||||
prop_vmem_avail[4] = 0xffe00000;
|
|
||||||
prop_vmem_avail[5] = 0x00200000;
|
|
||||||
|
|
||||||
// Linux wants a R/W romvec table
|
// Linux wants a R/W romvec table
|
||||||
romvec0.pv_magic_cookie = LINUX_OPPROM_MAGIC;
|
romvec0.pv_magic_cookie = LINUX_OPPROM_MAGIC;
|
||||||
romvec0.pv_romvers = 0;
|
romvec0.pv_romvers = 0;
|
||||||
@@ -478,6 +462,7 @@ init_openprom(unsigned long memsize, const char *cmdline, char boot_device)
|
|||||||
romvec0.pv_v2devops.v2_dev_seek = obp_devseek;
|
romvec0.pv_v2devops.v2_dev_seek = obp_devseek;
|
||||||
obp_arg.boot_dev_ctrl = 0;
|
obp_arg.boot_dev_ctrl = 0;
|
||||||
obp_arg.boot_dev_unit = 0;
|
obp_arg.boot_dev_unit = 0;
|
||||||
|
obp_arg.dev_partition = 4;
|
||||||
obp_arg.argv[0] = "sd(0,0,0):d";
|
obp_arg.argv[0] = "sd(0,0,0):d";
|
||||||
|
|
||||||
switch(boot_device) {
|
switch(boot_device) {
|
||||||
@@ -503,7 +488,7 @@ init_openprom(unsigned long memsize, const char *cmdline, char boot_device)
|
|||||||
}
|
}
|
||||||
obp_arg.argv[1] = cmdline;
|
obp_arg.argv[1] = cmdline;
|
||||||
romvec0.pv_v2bootargs.bootpath = &obp_arg.argv[0];
|
romvec0.pv_v2bootargs.bootpath = &obp_arg.argv[0];
|
||||||
romvec0.pv_v2bootargs.bootargs = &cmdline;
|
romvec0.pv_v2bootargs.bootargs = &obp_arg.argv[1];
|
||||||
romvec0.pv_v2bootargs.fd_stdin = &obp_fd_stdin;
|
romvec0.pv_v2bootargs.fd_stdin = &obp_fd_stdin;
|
||||||
romvec0.pv_v2bootargs.fd_stdout = &obp_fd_stdout;
|
romvec0.pv_v2bootargs.fd_stdout = &obp_fd_stdout;
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
" SUNW,SparcStation-5" encode-string " name" property
|
" SUNW,SparcStation-5" encode-string " name" property
|
||||||
" SparcStation" encode-string " banner-name" property
|
" SparcStation" encode-string " banner-name" property
|
||||||
" sun4m" encode-string " compatible" property
|
" sun4m" encode-string " compatible" property
|
||||||
h# 01800000 encode-int 0 encode-int encode+ 0 encode-int encode+ h# 00000081 encode-int encode+
|
|
||||||
0 encode-int encode+ 0 encode-int encode+ 0 encode-int encode+ 0 encode-int encode+
|
|
||||||
" idprom" property \ XXX
|
|
||||||
" /obio/zs@0,100000:a" encode-string " stdin-path" property
|
" /obio/zs@0,100000:a" encode-string " stdin-path" property
|
||||||
" /obio/zs@0,100000:a" encode-string " stdout-path" property
|
" /obio/zs@0,100000:a" encode-string " stdout-path" property
|
||||||
: encode-unit encode-unit-sbus ;
|
: encode-unit encode-unit-sbus ;
|
||||||
@@ -15,8 +12,6 @@
|
|||||||
|
|
||||||
new-device
|
new-device
|
||||||
" memory" device-name
|
" memory" device-name
|
||||||
h# 100000 encode-int " available" property \ XXX
|
|
||||||
h# 0 encode-int h# 10000000 encode-int encode+ h# 00000300 encode-int encode+ " reg" property \ XXX
|
|
||||||
external
|
external
|
||||||
: open true ;
|
: open true ;
|
||||||
: close ;
|
: close ;
|
||||||
@@ -26,8 +21,6 @@ finish-device
|
|||||||
|
|
||||||
new-device
|
new-device
|
||||||
" virtual-memory" device-name
|
" virtual-memory" device-name
|
||||||
h# 100000 encode-int " available" property \ XXX
|
|
||||||
h# 0 encode-int h# 10000000 encode-int encode+ h# 00000300 encode-int encode+ " reg" property \ XXX
|
|
||||||
external
|
external
|
||||||
: open true ;
|
: open true ;
|
||||||
: close ;
|
: close ;
|
||||||
@@ -131,7 +124,6 @@ finish-device
|
|||||||
" /iommu/sbus" find-device
|
" /iommu/sbus" find-device
|
||||||
new-device
|
new-device
|
||||||
" espdma" device-name
|
" espdma" device-name
|
||||||
h# 4 encode-int h# 08400000 encode-int encode+ h# 00000010 encode-int encode+ " reg" property
|
|
||||||
external
|
external
|
||||||
: encode-unit encode-unit-sbus ;
|
: encode-unit encode-unit-sbus ;
|
||||||
: decode-unit decode-unit-sbus ;
|
: decode-unit decode-unit-sbus ;
|
||||||
@@ -180,76 +172,6 @@ new-device
|
|||||||
: decode-unit decode-unit-sbus ;
|
: decode-unit decode-unit-sbus ;
|
||||||
finish-device
|
finish-device
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" SUNW,fdtwo" device-name
|
|
||||||
" block" device-type
|
|
||||||
h# 0 encode-int h# 00400000 encode-int encode+ h# 0000000f encode-int encode+ " reg" property
|
|
||||||
h# 2b encode-int 0 encode-int encode+ " intr" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" auxio" device-name
|
|
||||||
h# 0 encode-int h# 00900000 encode-int encode+ h# 00000001 encode-int encode+ " reg" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" counter" device-name
|
|
||||||
h# 0 encode-int h# 00d00000 encode-int encode+ h# 00000010 encode-int encode+
|
|
||||||
h# 0 encode-int encode+ h# 00d10000 encode-int encode+ h# 00000010 encode-int encode+
|
|
||||||
" reg" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" eeprom" device-name
|
|
||||||
h# 0 encode-int h# 00200000 encode-int encode+ h# 00002000 encode-int encode+ " reg" property
|
|
||||||
" mk48t08" model
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" interrupt" device-name
|
|
||||||
h# 0 encode-int h# 00e00000 encode-int encode+ h# 00000010 encode-int encode+
|
|
||||||
h# 0 encode-int encode+ h# 00e10000 encode-int encode+ h# 00000010 encode-int encode+
|
|
||||||
" reg" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" power" device-name
|
|
||||||
h# 0 encode-int h# 00910000 encode-int encode+ h# 00000001 encode-int encode+ " reg" property
|
|
||||||
h# 22 encode-int 0 encode-int encode+ " intr" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" slavioconfig" device-name
|
|
||||||
h# 0 encode-int h# 00800000 encode-int encode+ h# 00000001 encode-int encode+ " reg" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" zs" device-name
|
|
||||||
" serial" device-type
|
|
||||||
h# 0 encode-int h# 00000000 encode-int encode+ h# 00000008 encode-int encode+ " reg" property
|
|
||||||
1 encode-int " slave" property
|
|
||||||
h# 2c encode-int 0 encode-int encode+ " intr" property
|
|
||||||
-1 encode-int " keyboard" property
|
|
||||||
-1 encode-int " mouse" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /obio" find-device
|
|
||||||
new-device
|
|
||||||
" zs" device-name
|
|
||||||
" serial" device-type
|
|
||||||
h# 0 encode-int h# 00100000 encode-int encode+ h# 00000008 encode-int encode+ " reg" property
|
|
||||||
0 encode-int " slave" property
|
|
||||||
h# 2c encode-int 0 encode-int encode+ " intr" property
|
|
||||||
finish-device
|
|
||||||
|
|
||||||
" /options" find-device
|
" /options" find-device
|
||||||
" disk" encode-string " boot-from" property
|
" disk" encode-string " boot-from" property
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
<option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
|
<option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
|
||||||
<option name="CONFIG_FSYS_AFFS" type="boolean" value="true"/>
|
<option name="CONFIG_FSYS_AFFS" type="boolean" value="true"/>
|
||||||
<option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
|
<option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
|
||||||
|
<option name="CONFIG_DEBUG_EXT2FS" type="boolean" value="false"/>
|
||||||
|
|
||||||
<!-- Miscellaneous -->
|
<!-- Miscellaneous -->
|
||||||
<option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
|
<option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
<option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
|
<option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
|
||||||
<option name="CONFIG_FSYS_AFFS" type="boolean" value="true"/>
|
<option name="CONFIG_FSYS_AFFS" type="boolean" value="true"/>
|
||||||
<option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
|
<option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
|
||||||
|
<option name="CONFIG_DEBUG_EXT2FS" type="boolean" value="false"/>
|
||||||
|
|
||||||
<!-- Miscellaneous -->
|
<!-- Miscellaneous -->
|
||||||
<option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
|
<option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ void *mem_alloc(struct mem *t, int size, int align);
|
|||||||
void *mem_zalloc(struct mem *t, int size, int align);
|
void *mem_zalloc(struct mem *t, int size, int align);
|
||||||
int map_page(unsigned long va, unsigned long epa, int type);
|
int map_page(unsigned long va, unsigned long epa, int type);
|
||||||
void *map_io(unsigned pa, int size);
|
void *map_io(unsigned pa, int size);
|
||||||
void init_mmu_swift(void);
|
void init_mmu_swift(unsigned long base);
|
||||||
void *dvma_alloc(int size, unsigned int *pphys);
|
void *dvma_alloc(int size, unsigned int *pphys);
|
||||||
|
|
||||||
#ifndef BOOTSTRAP
|
#ifndef BOOTSTRAP
|
||||||
|
|||||||
Reference in New Issue
Block a user