From svn at openbios.org Mon Dec 1 19:04:16 2008 From: svn at openbios.org (svn at openbios.org) Date: Mon, 1 Dec 2008 19:04:16 +0100 Subject: [OpenBIOS] r278 - openbios-devel/arch/sparc32 Message-ID: Author: blueswirl Date: 2008-12-01 19:04:16 +0100 (Mon, 01 Dec 2008) New Revision: 278 Modified: openbios-devel/arch/sparc32/aoutload.c openbios-devel/arch/sparc32/boot.c openbios-devel/arch/sparc32/boot.h openbios-devel/arch/sparc32/romvec.c Log: Fix NetBSD booting Modified: openbios-devel/arch/sparc32/aoutload.c =================================================================== --- openbios-devel/arch/sparc32/aoutload.c 2008-11-30 13:44:38 UTC (rev 277) +++ openbios-devel/arch/sparc32/aoutload.c 2008-12-01 18:04:16 UTC (rev 278) @@ -57,22 +57,19 @@ int image_retval; struct exec ehdr; unsigned long start, size; - unsigned int offset; + unsigned int offset = 512; image_name = image_version = NULL; if (!file_open(filename)) goto out; - for (offset = 0; offset < 16 * 512; offset += 512) { - file_seek(offset); - if (lfile_read(&ehdr, sizeof ehdr) != sizeof ehdr) { - debug("Can't read a.out header\n"); - retval = LOADER_NOT_SUPPORT; - goto out; - } - if (!N_BADMAG(ehdr)) - break; + file_seek(offset); + + if (lfile_read(&ehdr, sizeof ehdr) != sizeof ehdr) { + debug("Can't read a.out header\n"); + retval = LOADER_NOT_SUPPORT; + goto out; } if (N_BADMAG(ehdr)) { Modified: openbios-devel/arch/sparc32/boot.c =================================================================== --- openbios-devel/arch/sparc32/boot.c 2008-11-30 13:44:38 UTC (rev 277) +++ openbios-devel/arch/sparc32/boot.c 2008-12-01 18:04:16 UTC (rev 278) @@ -20,6 +20,18 @@ uint32_t cmdline_size; char boot_device; +static void try_path(const char *path, char *param, const void *romvec) +{ + push_str(path); + fword("pathres-resolve-aliases"); + bootpath = pop_fstr_copy(); + printk("Trying %s (%s)\n", path, bootpath); + + elf_load(&sys_info, path, param, romvec); + linux_load(&sys_info, path, param); + aout_load(&sys_info, path, romvec); +} + void boot(void) { char *path = pop_fstr_copy(), *param, *oldpath = path; @@ -87,7 +99,7 @@ obp_arg.argv[1] = param; } - romvec = init_openprom(qemu_mem_size, path); + romvec = init_openprom(qemu_mem_size); if (kernel_size) { int (*entry)(const void *romvec_ptr, int p2, int p3, int p4, int p5); @@ -103,20 +115,17 @@ else printk("without parameters.\n"); - if (elf_load(&sys_info, path, param, romvec) == LOADER_NOT_SUPPORT) - if (linux_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, path, romvec) == LOADER_NOT_SUPPORT) { + try_path(path, param, romvec); - snprintf(altpath, sizeof(altpath), "%s:d", path); + push_str(path); + PUSH(':'); + fword("left-split"); + snprintf(altpath, sizeof(altpath), "%s:d", pop_fstr_copy()); + POP(); + POP(); - if (elf_load(&sys_info, altpath, param, romvec) - == LOADER_NOT_SUPPORT) - if (linux_load(&sys_info, altpath, param) - == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, altpath, romvec) - == LOADER_NOT_SUPPORT) - printk("Unsupported image format\n"); - } + try_path(altpath, param, romvec); + printk("Unsupported image format\n"); free(path); } Modified: openbios-devel/arch/sparc32/boot.h =================================================================== --- openbios-devel/arch/sparc32/boot.h 2008-11-30 13:44:38 UTC (rev 277) +++ openbios-devel/arch/sparc32/boot.h 2008-12-01 18:04:16 UTC (rev 278) @@ -24,10 +24,11 @@ unsigned int start_elf(unsigned long entry_point, unsigned long param); // romvec.c -void *init_openprom(unsigned long memsize, const char *path); +void *init_openprom(unsigned long memsize); // boot.c extern struct sys_info sys_info; +extern const char *bootpath; void boot(void); // sys_info.c Modified: openbios-devel/arch/sparc32/romvec.c =================================================================== --- openbios-devel/arch/sparc32/romvec.c 2008-11-30 13:44:38 UTC (rev 277) +++ openbios-devel/arch/sparc32/romvec.c 2008-12-01 18:04:16 UTC (rev 278) @@ -49,7 +49,7 @@ static int obp_devseek(int dev_desc, int hi, int lo); struct linux_arguments_v0 obp_arg; -static const char *bootpath; +const char *bootpath; static const struct linux_arguments_v0 * const obp_argp = &obp_arg; static void (*sync_hook)(void); @@ -501,7 +501,7 @@ } void * -init_openprom(unsigned long memsize, const char *path) +init_openprom(unsigned long memsize) { ptphys = totphys; ptmap = totmap; @@ -559,9 +559,6 @@ romvec0.pv_v2devops.v2_dev_write = obp_devwrite; romvec0.pv_v2devops.v2_dev_seek = obp_devseek; - push_str(path); - fword("pathres-resolve-aliases"); - bootpath = pop_fstr_copy(); romvec0.pv_v2bootargs.bootpath = &bootpath; romvec0.pv_v2bootargs.bootargs = &obp_arg.argv[1]; From svn at openbios.org Mon Dec 1 20:08:33 2008 From: svn at openbios.org (svn at openbios.org) Date: Mon, 1 Dec 2008 20:08:33 +0100 Subject: [OpenBIOS] r279 - openbios-devel/forth/admin Message-ID: Author: blueswirl Date: 2008-12-01 20:08:33 +0100 (Mon, 01 Dec 2008) New Revision: 279 Modified: openbios-devel/forth/admin/nvram.fs Log: Fix NetBSD 4.0 booting Modified: openbios-devel/forth/admin/nvram.fs =================================================================== --- openbios-devel/forth/admin/nvram.fs 2008-12-01 18:04:16 UTC (rev 278) +++ openbios-devel/forth/admin/nvram.fs 2008-12-01 19:08:33 UTC (rev 279) @@ -305,8 +305,8 @@ " boot" " boot-command" str-config \ 7.4.3.5 " " " boot-file" str-config \ 7.4.3.5 " false" " diag-switch?" bool-config \ 7.4.3.5 -" net" " diag-device" str-config \ 7.4.3.5 -" diag" " diag-file" str-config \ 7.4.3.5 +no-conf-def " diag-device" str-config \ 7.4.3.5 +no-conf-def " diag-file" str-config \ 7.4.3.5 " false" " fcode-debug?" bool-config \ 7.7 " " " nvramrc" str-config \ 7.4.4.2 " false" " oem-banner?" bool-config From laurent at lvivier.info Thu Dec 4 01:00:21 2008 From: laurent at lvivier.info (Laurent Vivier) Date: Thu, 4 Dec 2008 01:00:21 +0100 Subject: [OpenBIOS] [PATCH] Evaluate date using C locale Message-ID: <78E7A335-2E1A-4CC5-972E-3ED1FD6B9EB9@lvivier.info> This patch uses C locale to compute date for version.fs and openbios- version.h instead of current locale. This avoids to have some dates like "d?c 3 2008" instead of "dec 3 2008" Laurent -------------------- laurent at lvivier.info -------------------- "Tout ce qui est impossible reste ? accomplir" Jules Verne "Things are only impossible until they're not" Jean-Luc Picard -------------- next part -------------- A non-text attachment was scrubbed... Name: C-date.patch Type: application/octet-stream Size: 6851 bytes Desc: not available URL: -------------- next part -------------- From segher at kernel.crashing.org Thu Dec 4 15:15:17 2008 From: segher at kernel.crashing.org (Segher Boessenkool) Date: Thu, 4 Dec 2008 15:15:17 +0100 Subject: [OpenBIOS] [PATCH] Evaluate date using C locale In-Reply-To: <78E7A335-2E1A-4CC5-972E-3ED1FD6B9EB9@lvivier.info> References: <78E7A335-2E1A-4CC5-972E-3ED1FD6B9EB9@lvivier.info> Message-ID: <49221C32-E855-43C9-9993-49C7581504BD@kernel.crashing.org> > This patch uses C locale to compute date for version.fs and > openbios-version.h instead of current locale. You should use LC_ALL=C, not LANG=C; LANG provides a default for all the separate locale settings that aren't otherwise set, while LC_ALL overrides everything. Segher From laurent at lvivier.info Thu Dec 4 15:50:12 2008 From: laurent at lvivier.info (laurent at lvivier.info) Date: Thu, 04 Dec 2008 15:50:12 +0100 Subject: [OpenBIOS] [PATCH] Evaluate date using C locale Message-ID: <26528270.1300501228402212237.JavaMail.servlet@kundenserver> >> This patch uses C locale to compute date for version.fs and >> openbios-version.h instead of current locale. > >You should use LC_ALL=C, not LANG=C; LANG provides a default for >all the separate locale settings that aren't otherwise set, while >LC_ALL overrides everything. Yes, you're right, but in fact LC_TIME should be enough. Laurent From segher at kernel.crashing.org Thu Dec 4 19:24:18 2008 From: segher at kernel.crashing.org (Segher Boessenkool) Date: Thu, 4 Dec 2008 19:24:18 +0100 Subject: [OpenBIOS] [PATCH] Evaluate date using C locale In-Reply-To: <26528270.1300501228402212237.JavaMail.servlet@kundenserver> References: <26528270.1300501228402212237.JavaMail.servlet@kundenserver> Message-ID: <9593BCE2-2D9B-4617-9B49-85913AC687B9@kernel.crashing.org> >>> This patch uses C locale to compute date for version.fs and >>> openbios-version.h instead of current locale. >> >> You should use LC_ALL=C, not LANG=C; LANG provides a default for >> all the separate locale settings that aren't otherwise set, while >> LC_ALL overrides everything. > > Yes, you're right, but in fact LC_TIME should be enough. Not if the user has set LC_ALL already. Segher From blauwirbel at gmail.com Thu Dec 4 19:30:35 2008 From: blauwirbel at gmail.com (Blue Swirl) Date: Thu, 4 Dec 2008 20:30:35 +0200 Subject: [OpenBIOS] [PATCH] Evaluate date using C locale In-Reply-To: <9593BCE2-2D9B-4617-9B49-85913AC687B9@kernel.crashing.org> References: <26528270.1300501228402212237.JavaMail.servlet@kundenserver> <9593BCE2-2D9B-4617-9B49-85913AC687B9@kernel.crashing.org> Message-ID: On 12/4/08, Segher Boessenkool wrote: > > > > > > > > > This patch uses C locale to compute date for version.fs and > > > > openbios-version.h instead of current locale. > > > > > > > > > > You should use LC_ALL=C, not LANG=C; LANG provides a default for > > > all the separate locale settings that aren't otherwise set, while > > > LC_ALL overrides everything. > > > > > > > Yes, you're right, but in fact LC_TIME should be enough. > > > > Not if the user has set LC_ALL already. Maybe the timezone should be set to UTC as well. From svn at openbios.org Thu Dec 4 21:14:23 2008 From: svn at openbios.org (svn at openbios.org) Date: Thu, 4 Dec 2008 21:14:23 +0100 Subject: [OpenBIOS] r280 - openbios-devel/config/examples Message-ID: Author: blueswirl Date: 2008-12-04 21:14:23 +0100 (Thu, 04 Dec 2008) New Revision: 280 Modified: openbios-devel/config/examples/amd64_rules.xml openbios-devel/config/examples/cross-ppc_rules.xml openbios-devel/config/examples/cross-sparc32_rules.xml openbios-devel/config/examples/cross-sparc64_rules.xml openbios-devel/config/examples/sparc32_rules.xml openbios-devel/config/examples/sparc64_rules.xml openbios-devel/config/examples/x86_rules.xml Log: Evaluate date using C locale and UTC timezone, original patch by Laurent Vivier Modified: openbios-devel/config/examples/amd64_rules.xml =================================================================== --- openbios-devel/config/examples/amd64_rules.xml 2008-12-01 19:08:33 UTC (rev 279) +++ openbios-devel/config/examples/amd64_rules.xml 2008-12-04 20:14:23 UTC (rev 280) @@ -34,7 +34,7 @@ $(ODIR)/forth/version.fs: @test -d $(dir $@) || $(INSTALL) -d $(dir $@) - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo ": builddate \" $$DATE\" ; " ; \ echo ": version \" $(VERSION)\" ; " ; ) \ > $(dir $@)/version.fs Modified: openbios-devel/config/examples/cross-ppc_rules.xml =================================================================== --- openbios-devel/config/examples/cross-ppc_rules.xml 2008-12-01 19:08:33 UTC (rev 279) +++ openbios-devel/config/examples/cross-ppc_rules.xml 2008-12-04 20:14:23 UTC (rev 280) @@ -40,13 +40,13 @@ versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs $(ODIR)/forth/version.fs: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo ": builddate \" $$DATE\" ; " ; \ echo ": version \" $(VERSION)\" ; " ; ) \ > $(dir $@)/version.fs $(ODIR)/target/include/openbios-version.h: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \ echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \ echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \ Modified: openbios-devel/config/examples/cross-sparc32_rules.xml =================================================================== --- openbios-devel/config/examples/cross-sparc32_rules.xml 2008-12-01 19:08:33 UTC (rev 279) +++ openbios-devel/config/examples/cross-sparc32_rules.xml 2008-12-04 20:14:23 UTC (rev 280) @@ -38,13 +38,13 @@ versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs $(ODIR)/forth/version.fs: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo ": builddate \" $$DATE\" ; " ; \ echo ": version \" $(VERSION)\" ; " ; ) \ > $(dir $@)/version.fs $(ODIR)/target/include/openbios-version.h: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \ echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \ echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \ Modified: openbios-devel/config/examples/cross-sparc64_rules.xml =================================================================== --- openbios-devel/config/examples/cross-sparc64_rules.xml 2008-12-01 19:08:33 UTC (rev 279) +++ openbios-devel/config/examples/cross-sparc64_rules.xml 2008-12-04 20:14:23 UTC (rev 280) @@ -39,13 +39,13 @@ versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs $(ODIR)/forth/version.fs: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo ": builddate \" $$DATE\" ; " ; \ echo ": version \" $(VERSION)\" ; " ; ) \ > $(dir $@)/version.fs $(ODIR)/target/include/openbios-version.h: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \ echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \ echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \ Modified: openbios-devel/config/examples/sparc32_rules.xml =================================================================== --- openbios-devel/config/examples/sparc32_rules.xml 2008-12-01 19:08:33 UTC (rev 279) +++ openbios-devel/config/examples/sparc32_rules.xml 2008-12-04 20:14:23 UTC (rev 280) @@ -43,13 +43,13 @@ versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs $(ODIR)/forth/version.fs: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo ": builddate \" $$DATE\" ; " ; \ echo ": version \" $(VERSION)\" ; " ; ) \ > $(dir $@)/version.fs $(ODIR)/target/include/openbios-version.h: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \ echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \ echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \ Modified: openbios-devel/config/examples/sparc64_rules.xml =================================================================== --- openbios-devel/config/examples/sparc64_rules.xml 2008-12-01 19:08:33 UTC (rev 279) +++ openbios-devel/config/examples/sparc64_rules.xml 2008-12-04 20:14:23 UTC (rev 280) @@ -50,13 +50,13 @@ versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs $(ODIR)/forth/version.fs: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo ": builddate \" $$DATE\" ; " ; \ echo ": version \" $(VERSION)\" ; " ; ) \ > $(dir $@)/version.fs $(ODIR)/target/include/openbios-version.h: - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \ echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \ echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \ Modified: openbios-devel/config/examples/x86_rules.xml =================================================================== --- openbios-devel/config/examples/x86_rules.xml 2008-12-01 19:08:33 UTC (rev 279) +++ openbios-devel/config/examples/x86_rules.xml 2008-12-04 20:14:23 UTC (rev 280) @@ -38,7 +38,7 @@ $(ODIR)/forth/version.fs: @test -d $(dir $@) || $(INSTALL) -d $(dir $@) - @DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \ + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo ": builddate \" $$DATE\" ; " ; \ echo ": version \" $(VERSION)\" ; " ; ) \ > $(dir $@)/version.fs From svn at openbios.org Fri Dec 5 19:31:27 2008 From: svn at openbios.org (svn at openbios.org) Date: Fri, 5 Dec 2008 19:31:27 +0100 Subject: [OpenBIOS] r281 - in openbios-devel: arch/ppc/qemu arch/sparc32 arch/x86 arch/x86/xbox include/openbios modules Message-ID: Author: blueswirl Date: 2008-12-05 19:31:27 +0100 (Fri, 05 Dec 2008) New Revision: 281 Modified: openbios-devel/arch/ppc/qemu/console.c openbios-devel/arch/sparc32/console.c openbios-devel/arch/sparc32/openbios.c openbios-devel/arch/sparc32/openbios.h openbios-devel/arch/x86/openbios.c openbios-devel/arch/x86/xbox/console.c openbios-devel/include/openbios/drivers.h openbios-devel/modules/console.c openbios-devel/modules/video.c Log: Initialize VGA from PCI configuration (Laurent Vivier) Modified: openbios-devel/arch/ppc/qemu/console.c =================================================================== --- openbios-devel/arch/ppc/qemu/console.c 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/arch/ppc/qemu/console.c 2008-12-05 18:31:27 UTC (rev 281) @@ -138,20 +138,6 @@ #include "../../../modules/video.c" #include "../../../modules/console.c" -static uint32_t vga_phys_mem; -static int vga_width, vga_height, vga_depth; - -int Qemu_GetFBInfo( osi_fb_info_t *fb ) -{ - fb->mphys = vga_phys_mem; - fb->w = vga_width; - fb->h = vga_height; - fb->depth = vga_depth; - fb->rb = fb->w * ((fb->depth + 7) / 8); - - return 0; -} - /* ****************************************************************** * common functions, implementing simple concurrent console * ****************************************************************** */ Modified: openbios-devel/arch/sparc32/console.c =================================================================== --- openbios-devel/arch/sparc32/console.c 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/arch/sparc32/console.c 2008-12-05 18:31:27 UTC (rev 281) @@ -141,7 +141,7 @@ #define DAC_BASE 0x00200000ULL #define DAC_SIZE 16 -static unsigned char *vmem; +unsigned char *vmem; static volatile uint32_t *dac; typedef struct osi_fb_info { @@ -149,19 +149,6 @@ int rb, w, h, depth; } osi_fb_info_t; -static int TCX_GetFBInfo( osi_fb_info_t *fb ) -{ - fb->w = 1024; - fb->h = 768; - fb->depth = 8; - fb->rb = 1024; - fb->mphys = (unsigned long)vmem; - - return 0; -} - -#define openbios_GetFBInfo(x) TCX_GetFBInfo(x) - #include "../../modules/video.c" #include "../../modules/console.c" Modified: openbios-devel/arch/sparc32/openbios.c =================================================================== --- openbios-devel/arch/sparc32/openbios.c 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/arch/sparc32/openbios.c 2008-12-05 18:31:27 UTC (rev 281) @@ -122,7 +122,7 @@ #endif #ifdef CONFIG_DRIVER_SBUS #ifdef CONFIG_DEBUG_CONSOLE_VIDEO - init_video(); + init_video((unsigned long)vmem, 1024, 768, 8, 1024); #endif ob_sbus_init(hwdef->iommu_base + 0x1000ULL, qemu_machine_type); #endif Modified: openbios-devel/arch/sparc32/openbios.h =================================================================== --- openbios-devel/arch/sparc32/openbios.h 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/arch/sparc32/openbios.h 2008-12-05 18:31:27 UTC (rev 281) @@ -20,6 +20,7 @@ int openbios(void); /* console.c */ +extern unsigned char *vmem; extern void cls(void); #ifdef CONFIG_DEBUG_CONSOLE extern int uart_init(uint64_t port, unsigned long speed); Modified: openbios-devel/arch/x86/openbios.c =================================================================== --- openbios-devel/arch/x86/openbios.c 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/arch/x86/openbios.c 2008-12-05 18:31:27 UTC (rev 281) @@ -51,7 +51,7 @@ ob_floppy_init(); #endif #ifdef CONFIG_XBOX - init_video(); + init_video(phys_to_virt(0x3C00000), 640, 480, 32, 2560); node_methods_init(); #endif device_end(); Modified: openbios-devel/arch/x86/xbox/console.c =================================================================== --- openbios-devel/arch/x86/xbox/console.c 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/arch/x86/xbox/console.c 2008-12-05 18:31:27 UTC (rev 281) @@ -19,19 +19,6 @@ int rb, w, h, depth; } osi_fb_info_t; -int Xbox_GetFBInfo (osi_fb_info_t *fb) -{ - fb->w = 640; - fb->h = 480; - fb->depth = 32; - fb->rb = fb->w * 4; /* rgb + alpha */ - fb->mphys = phys_to_virt(0x3C00000); /* 60M - 64M */ - - return 0; -} - -#define openbios_GetFBInfo(x) Xbox_GetFBInfo(x) - #include "../../../modules/video.c" #include "../../../modules/console.c" Modified: openbios-devel/include/openbios/drivers.h =================================================================== --- openbios-devel/include/openbios/drivers.h 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/include/openbios/drivers.h 2008-12-05 18:31:27 UTC (rev 281) @@ -22,7 +22,7 @@ int keyboard_dataready(void); unsigned char keyboard_readdata(void); #ifdef CONFIG_DEBUG_CONSOLE_VIDEO -void init_video(void); +void init_video(unsigned long fb, int width, int height, int depth, int rb); #endif #endif #ifdef CONFIG_DRIVER_IDE Modified: openbios-devel/modules/console.c =================================================================== --- openbios-devel/modules/console.c 2008-12-04 20:14:23 UTC (rev 280) +++ openbios-devel/modules/console.c 2008-12-05 18:31:27 UTC (rev 281) @@ -150,24 +150,10 @@ static void scroll1( void ) { - osi_fb_info_t fb; - int i, x, offs, size, *dest, *src; - - openbios_GetFBInfo( &fb ); + int x; - offs = fb.rb * FONT_ADJ_HEIGHT; - size = (fb.h * fb.rb - offs)/16; - dest = (int*)fb.mphys; - src = (int*)(fb.mphys + offs); + video_scroll( FONT_ADJ_HEIGHT ); - for( i=0; i Author: blueswirl Date: 2008-12-05 19:32:39 +0100 (Fri, 05 Dec 2008) New Revision: 282 Modified: openbios-devel/drivers/build.xml openbios-devel/drivers/pci.c openbios-devel/modules/video.c Log: Misc VGA fixes (Laurent Vivier) Modified: openbios-devel/drivers/build.xml =================================================================== --- openbios-devel/drivers/build.xml 2008-12-05 18:31:27 UTC (rev 281) +++ openbios-devel/drivers/build.xml 2008-12-05 18:32:39 UTC (rev 282) @@ -14,6 +14,7 @@ + Modified: openbios-devel/drivers/pci.c =================================================================== --- openbios-devel/drivers/pci.c 2008-12-05 18:31:27 UTC (rev 281) +++ openbios-devel/drivers/pci.c 2008-12-05 18:32:39 UTC (rev 282) @@ -305,11 +305,9 @@ static int vga_config_cb (const pci_config_t *config) { -#if 0 if (config->regions[0] != 0x00000000) vga_vbe_init(config->path, config->regions[0], config->sizes[0], config->regions[1], config->sizes[1]); -#endif return 0; } Modified: openbios-devel/modules/video.c =================================================================== --- openbios-devel/modules/video.c 2008-12-05 18:31:27 UTC (rev 281) +++ openbios-devel/modules/video.c 2008-12-05 18:32:39 UTC (rev 282) @@ -148,7 +148,7 @@ while( ww-- ) *p++ = col; } else { - char *p = (char*)pp + x; + char *p = (ushort*)pp + x; while( ww-- ) *p++ = col; } @@ -181,6 +181,10 @@ dac[1] = ((color >> 8) & 0xff) << 24; // Green dac[1] = (color & 0xff) << 24; // Blue } +#else + vga_set_color(ind, ((color >> 16) & 0xff), + ((color >> 8) & 0xff), + (color & 0xff)); #endif } @@ -278,14 +282,7 @@ PUSH(len); } -static void -video_open(void) -{ - RET(-1); -} - NODE_METHODS( video ) = { - {"open", video_open }, {"dimensions", video_dimensions }, {"set-colors", video_set_colors }, {"fill-rectangle", video_fill_rect }, From igor.v.kovalenko at gmail.com Sun Dec 7 22:45:59 2008 From: igor.v.kovalenko at gmail.com (Igor Kovalenko) Date: Mon, 8 Dec 2008 00:45:59 +0300 Subject: [OpenBIOS] [PATCH] sparc64 add cpuid to cpu node In-Reply-To: References: Message-ID: On Sat, Sep 27, 2008 at 10:51 PM, Blue Swirl wrote: > On 9/27/08, Igor Kovalenko wrote: >> Hi! >> >> Linux kernel expects at least "cpuid" property in cpu device node, or >> it halts execution. This patch adds one with dummy "1" value. This >> allows to make some progress into booting the kernel. >> >> Please apply. > > Thanks, applied. The real implementation would be to probe the real ID > from various registers but as we don't have SMP yet this is sufficient > for now. > Small correction: cpuid property of qemu cpu should be "0" for the linux kernel to boot on qemu. This is because kernel is reading cpu registers to find out current smp processor ID and it happens to find out "0" cpuid because corresponding register is zeroed by qemu. Currently kernel fails since there is no "0" cpu node in tree. Please apply the following patch: openbios-sparc64-cpuid.patch -- Kind regards, Igor V. Kovalenko -------------- next part -------------- A non-text attachment was scrubbed... Name: openbios-sparc64-cpuid.patch Type: application/octet-stream Size: 364 bytes Desc: not available URL: From svn at openbios.org Thu Dec 11 18:10:03 2008 From: svn at openbios.org (svn at openbios.org) Date: Thu, 11 Dec 2008 18:10:03 +0100 Subject: [OpenBIOS] r283 - openbios-devel/arch/sparc64 Message-ID: Author: blueswirl Date: 2008-12-11 18:10:03 +0100 (Thu, 11 Dec 2008) New Revision: 283 Modified: openbios-devel/arch/sparc64/openbios.c Log: Fix fake CPU ID value (Igor Kovalenko) Small correction: cpuid property of qemu cpu should be "0" for the linux kernel to boot on qemu. This is because kernel is reading cpu registers to find out current smp processor ID and it happens to find out "0" cpuid because corresponding register is zeroed by qemu. Currently kernel fails since there is no "0" cpu node in tree. Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-12-05 18:32:39 UTC (rev 282) +++ openbios-devel/arch/sparc64/openbios.c 2008-12-11 17:10:03 UTC (rev 283) @@ -424,7 +424,7 @@ push_str("sparc-version"); fword("property"); - PUSH(1); + PUSH(0); fword("encode-int"); push_str("cpuid"); fword("property"); From blauwirbel at gmail.com Thu Dec 11 18:11:06 2008 From: blauwirbel at gmail.com (Blue Swirl) Date: Thu, 11 Dec 2008 19:11:06 +0200 Subject: [OpenBIOS] [PATCH] sparc64 add cpuid to cpu node In-Reply-To: References: Message-ID: On 12/7/08, Igor Kovalenko wrote: > On Sat, Sep 27, 2008 at 10:51 PM, Blue Swirl wrote: > > On 9/27/08, Igor Kovalenko wrote: > >> Hi! > >> > >> Linux kernel expects at least "cpuid" property in cpu device node, or > >> it halts execution. This patch adds one with dummy "1" value. This > >> allows to make some progress into booting the kernel. > >> > >> Please apply. > > > > Thanks, applied. The real implementation would be to probe the real ID > > from various registers but as we don't have SMP yet this is sufficient > > for now. > > > > > Small correction: cpuid property of qemu cpu should be "0" for the > linux kernel to boot on qemu. This is because kernel is reading cpu > registers to find out current smp processor ID and it happens to find > out "0" cpuid because corresponding register is zeroed by qemu. > Currently kernel fails since there is no "0" cpu node in tree. > > Please apply the following patch: openbios-sparc64-cpuid.patch Thanks. I did not see any difference, but applied anyway. From svn at openbios.org Thu Dec 11 21:30:53 2008 From: svn at openbios.org (svn at openbios.org) Date: Thu, 11 Dec 2008 21:30:53 +0100 Subject: [OpenBIOS] r284 - in openbios-devel: arch/amd64 arch/ppc arch/ppc/briq arch/ppc/mol arch/ppc/pearpc arch/sparc32 arch/sparc64 arch/unix arch/unix/gui_qt arch/unix/plugins/plugin_pci arch/unix/plugins/plugin_qt arch/x86 arch/x86/xbox drivers fs fs/grubfs fs/hfs fs/hfsplus fs/hfsplus/include include include/amd64 include/ia64 include/libc include/openbios include/ppc include/unix include/x86 kernel kernel/include libc modules Message-ID: Author: blueswirl Date: 2008-12-11 21:30:53 +0100 (Thu, 11 Dec 2008) New Revision: 284 Modified: openbios-devel/arch/amd64/boot.c openbios-devel/arch/amd64/console.c openbios-devel/arch/amd64/context.c openbios-devel/arch/amd64/elfload.c openbios-devel/arch/amd64/lib.c openbios-devel/arch/amd64/linux_load.c openbios-devel/arch/amd64/loadfs.c openbios-devel/arch/amd64/multiboot.c openbios-devel/arch/amd64/multiboot.h openbios-devel/arch/amd64/openbios.c openbios-devel/arch/amd64/openbios.h openbios-devel/arch/amd64/segment.c openbios-devel/arch/amd64/switch.S openbios-devel/arch/amd64/sys_info.c openbios-devel/arch/ppc/briq/briq.c openbios-devel/arch/ppc/briq/briq.h openbios-devel/arch/ppc/briq/init.c openbios-devel/arch/ppc/briq/kernel.c openbios-devel/arch/ppc/briq/main.c openbios-devel/arch/ppc/briq/methods.c openbios-devel/arch/ppc/briq/tree.c openbios-devel/arch/ppc/briq/vfd.c openbios-devel/arch/ppc/kernel.c openbios-devel/arch/ppc/kernel.h openbios-devel/arch/ppc/misc.S openbios-devel/arch/ppc/mmutypes.h openbios-devel/arch/ppc/mol/console.c openbios-devel/arch/ppc/mol/init.c openbios-devel/arch/ppc/mol/kernel.c openbios-devel/arch/ppc/mol/main.c openbios-devel/arch/ppc/mol/methods.c openbios-devel/arch/ppc/mol/mol.c openbios-devel/arch/ppc/mol/mol.h openbios-devel/arch/ppc/mol/osi-blk.c openbios-devel/arch/ppc/mol/osi-scsi.c openbios-devel/arch/ppc/mol/prom.c openbios-devel/arch/ppc/mol/prom.h openbios-devel/arch/ppc/mol/pseudodisk.c openbios-devel/arch/ppc/mol/tree.c openbios-devel/arch/ppc/ofmem.c openbios-devel/arch/ppc/osi.h openbios-devel/arch/ppc/osi_calls.h openbios-devel/arch/ppc/pearpc/init.c openbios-devel/arch/ppc/pearpc/kernel.c openbios-devel/arch/ppc/pearpc/main.c openbios-devel/arch/ppc/pearpc/methods.c openbios-devel/arch/ppc/pearpc/pearpc.c openbios-devel/arch/ppc/pearpc/pearpc.h openbios-devel/arch/ppc/pearpc/tree.c openbios-devel/arch/ppc/pearpc/vfd.c openbios-devel/arch/ppc/start.S openbios-devel/arch/sparc32/linux_load.c openbios-devel/arch/sparc32/loadfs.c openbios-devel/arch/sparc32/openbios.c openbios-devel/arch/sparc32/switch.S openbios-devel/arch/sparc64/boot.c openbios-devel/arch/sparc64/console.c openbios-devel/arch/sparc64/entry.S openbios-devel/arch/sparc64/linux_load.c openbios-devel/arch/sparc64/loadfs.c openbios-devel/arch/sparc64/openbios.c openbios-devel/arch/sparc64/openbios.h openbios-devel/arch/unix/blk.c openbios-devel/arch/unix/boot.c openbios-devel/arch/unix/gui_qt/gui-qt.cpp openbios-devel/arch/unix/gui_qt/gui-qt.h openbios-devel/arch/unix/gui_qt/qt-main.cpp openbios-devel/arch/unix/plugins/plugin_pci/plugin_pci.c openbios-devel/arch/unix/plugins/plugin_qt/pciconfig.h openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.cpp openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.h openbios-devel/arch/unix/plugins/plugin_qt/qt_main.cpp openbios-devel/arch/unix/unix.c openbios-devel/arch/x86/boot.c openbios-devel/arch/x86/console.c openbios-devel/arch/x86/context.c openbios-devel/arch/x86/elfload.c openbios-devel/arch/x86/entry.S openbios-devel/arch/x86/exception.c openbios-devel/arch/x86/forthload.c openbios-devel/arch/x86/lib.c openbios-devel/arch/x86/linux_load.c openbios-devel/arch/x86/loadfs.c openbios-devel/arch/x86/multiboot.c openbios-devel/arch/x86/multiboot.h openbios-devel/arch/x86/openbios.c openbios-devel/arch/x86/openbios.h openbios-devel/arch/x86/segment.c openbios-devel/arch/x86/sys_info.c openbios-devel/arch/x86/xbox/console.c openbios-devel/arch/x86/xbox/methods.c openbios-devel/drivers/adb.c openbios-devel/drivers/adb.h openbios-devel/drivers/floppy.c openbios-devel/drivers/ide.c openbios-devel/drivers/ide.h openbios-devel/drivers/kbd.c openbios-devel/drivers/kbd.h openbios-devel/drivers/pci.c openbios-devel/drivers/scsi.h openbios-devel/drivers/timer.c openbios-devel/drivers/vga.h openbios-devel/drivers/vga_load_regs.c openbios-devel/fs/grubfs/defs.h openbios-devel/fs/grubfs/dir.h openbios-devel/fs/grubfs/disk_inode_ffs.h openbios-devel/fs/grubfs/filesys.h openbios-devel/fs/grubfs/fs.h openbios-devel/fs/grubfs/fsys_affs.c openbios-devel/fs/grubfs/fsys_ext2fs.c openbios-devel/fs/grubfs/fsys_fat.c openbios-devel/fs/grubfs/fsys_ffs.c openbios-devel/fs/grubfs/fsys_iso9660.c openbios-devel/fs/grubfs/fsys_jfs.c openbios-devel/fs/grubfs/fsys_minix.c openbios-devel/fs/grubfs/fsys_ntfs.c openbios-devel/fs/grubfs/fsys_reiserfs.c openbios-devel/fs/grubfs/fsys_vstafs.c openbios-devel/fs/grubfs/fsys_xfs.c openbios-devel/fs/grubfs/glue.h openbios-devel/fs/grubfs/grubfs_fs.c openbios-devel/fs/grubfs/jfs.h openbios-devel/fs/grubfs/ufs_fs.h openbios-devel/fs/grubfs/xfs.h openbios-devel/fs/hfs/block.c openbios-devel/fs/hfs/hfs.c openbios-devel/fs/hfs/hfs_fs.c openbios-devel/fs/hfs_mdb.h openbios-devel/fs/hfsplus/blockiter.c openbios-devel/fs/hfsplus/btree.c openbios-devel/fs/hfsplus/hfsp_fs.c openbios-devel/fs/hfsplus/include/apple.h openbios-devel/fs/hfsplus/include/blockiter.h openbios-devel/fs/hfsplus/include/btree.h openbios-devel/fs/hfsplus/include/hfs.h openbios-devel/fs/hfsplus/include/hfsp.h openbios-devel/fs/hfsplus/include/hfstime.h openbios-devel/fs/hfsplus/include/libhfsp.h openbios-devel/fs/hfsplus/include/record.h openbios-devel/fs/hfsplus/include/unicode.h openbios-devel/fs/hfsplus/include/volume.h openbios-devel/fs/hfsplus/libhfsp.c openbios-devel/fs/hfsplus/record.c openbios-devel/fs/hfsplus/unicode.c openbios-devel/fs/hfsplus/volume.c openbios-devel/fs/ioglue.c openbios-devel/include/a.out.h openbios-devel/include/amd64/io.h openbios-devel/include/elf_boot.h openbios-devel/include/ia64/io.h openbios-devel/include/libc/diskio.h openbios-devel/include/libc/stdlib.h openbios-devel/include/libc/string.h openbios-devel/include/libc/vsprintf.h openbios-devel/include/mconfig.h openbios-devel/include/ofmem.h openbios-devel/include/openbios/bindings.h openbios-devel/include/openbios/config.h openbios-devel/include/openbios/drivers.h openbios-devel/include/openbios/elfload.h openbios-devel/include/openbios/fs.h openbios-devel/include/openbios/kernel.h openbios-devel/include/openbios/nvram.h openbios-devel/include/openbios/of.h openbios-devel/include/ppc/asmdefs.h openbios-devel/include/ppc/processor.h openbios-devel/include/sys_info.h openbios-devel/include/unix/plugin_pci.h openbios-devel/include/unix/plugins.h openbios-devel/include/x86/io.h openbios-devel/kernel/bootstrap.c openbios-devel/kernel/cross.h openbios-devel/kernel/dict.c openbios-devel/kernel/forth.c openbios-devel/kernel/include/dict.h openbios-devel/kernel/internal.c openbios-devel/kernel/primitives.c openbios-devel/libc/diskio.c openbios-devel/libc/extra.c openbios-devel/libc/misc.c openbios-devel/libc/vsprintf.c openbios-devel/modules/bindings.c openbios-devel/modules/client.c openbios-devel/modules/cmdline.c openbios-devel/modules/console.c openbios-devel/modules/deblocker.c openbios-devel/modules/disk-label.c openbios-devel/modules/elfload.c openbios-devel/modules/filesystems.c openbios-devel/modules/init.c openbios-devel/modules/ipchecksum.c openbios-devel/modules/linuxbios.c openbios-devel/modules/linuxbios.h openbios-devel/modules/mac-parts.c openbios-devel/modules/mac-parts.h openbios-devel/modules/modules.h openbios-devel/modules/nvram.c openbios-devel/modules/pc-parts.c openbios-devel/modules/sun-parts.c openbios-devel/modules/video.c Log: Delete extra whitespace at the end of line, which annoys quilt Modified: openbios-devel/arch/amd64/boot.c =================================================================== --- openbios-devel/arch/amd64/boot.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/boot.c 2008-12-11 20:30:53 UTC (rev 284) @@ -14,14 +14,14 @@ void boot(void); -struct sys_info sys_info; +struct sys_info sys_info; void boot(void) { char *path=pop_fstr_copy(), *param; - + // char *param="root=/dev/hda2 console=ttyS0,115200n8 console=tty0"; - + if(!path) { printk("[x86] Booting default not supported.\n"); return; @@ -32,7 +32,7 @@ *param = '\0'; param++; } - + printk("[x86] Booting file '%s' with parameters '%s'\n",path, param); if (elf_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) Modified: openbios-devel/arch/amd64/console.c =================================================================== --- openbios-devel/arch/amd64/console.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/console.c 2008-12-11 20:30:53 UTC (rev 284) @@ -200,7 +200,7 @@ static void video_putchar(int c) { int p=1; - + if (c == '\n' || c == '\r') { video_newline(); return; @@ -228,7 +228,7 @@ static void video_cls(void) { int i; - + for (i = 0; i < 2 * COLUMNS * LINES;) { video[i++] = 0; video[i++] = ATTRIBUTE; Modified: openbios-devel/arch/amd64/context.c =================================================================== --- openbios-devel/arch/amd64/context.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/context.c 2008-12-11 20:30:53 UTC (rev 284) @@ -17,7 +17,7 @@ void __exit_context(void); /* assembly routine */ /* - * Main context structure + * Main context structure * It is placed at the bottom of our stack, and loaded by assembly routine * to start us up. */ Modified: openbios-devel/arch/amd64/elfload.c =================================================================== --- openbios-devel/arch/amd64/elfload.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/elfload.c 2008-12-11 20:30:53 UTC (rev 284) @@ -153,7 +153,7 @@ } bytes += phdr[i].p_filesz; debug("clearing... "); - memset(phys_to_virt(phdr[i].p_paddr + phdr[i].p_filesz), 0, + memset(phys_to_virt(phdr[i].p_paddr + phdr[i].p_filesz), 0, phdr[i].p_memsz - phdr[i].p_filesz); if (phdr[i].p_offset <= checksum_offset && phdr[i].p_offset + phdr[i].p_filesz >= checksum_offset+2) { @@ -356,7 +356,7 @@ if (!load_segments(phdr, ehdr.e_phnum, checksum_offset)) goto out; - + if (checksum_offset) { if (!verify_image(&ehdr, phdr, ehdr.e_phnum, checksum)) goto out; Modified: openbios-devel/arch/amd64/lib.c =================================================================== --- openbios-devel/arch/amd64/lib.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/lib.c 2008-12-11 20:30:53 UTC (rev 284) @@ -15,7 +15,7 @@ #include "openbios/kernel.h" /* Format a string and print it on the screen, just like the libc - * function printf. + * function printf. */ int printk( const char *fmt, ... ) { Modified: openbios-devel/arch/amd64/linux_load.c =================================================================== --- openbios-devel/arch/amd64/linux_load.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/linux_load.c 2008-12-11 20:30:53 UTC (rev 284) @@ -123,7 +123,7 @@ uint16_t ramdisk_flags; /* 0x1f8 */ #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 -#define RAMDISK_LOAD_FLAG 0x4000 +#define RAMDISK_LOAD_FLAG 0x4000 uint8_t reserved8[2]; /* 0x1fa */ uint16_t orig_root_dev; /* 0x1fc */ uint8_t reserved9[1]; /* 0x1fe */ @@ -464,7 +464,7 @@ max = hdr->initrd_addr_max; else max = 0x38000000; /* Hardcoded value for older kernels */ - + /* FILO itself is at the top of RAM. (relocated) * So, try putting initrd just below us. */ end = virt_to_phys(_start); @@ -520,9 +520,9 @@ outb(0, 0xf0); outb(0, 0xf1); - /* we're getting screwed again and again by this problem of the 8259. - * so we're going to leave this lying around for inclusion into - * crt0.S on an as-needed basis. + /* we're getting screwed again and again by this problem of the 8259. + * so we're going to leave this lying around for inclusion into + * crt0.S on an as-needed basis. * * well, that went ok, I hope. Now we have to reprogram the interrupts :-( * we put them right after the intel-reserved hardware interrupts, at @@ -565,8 +565,8 @@ linux_gdt[2] = gdt[FLAT_CODE]; linux_gdt[3] = gdt[FLAT_DATA]; /* 2.6 kernel uses 12 and 13, but head.S uses backward-compatible - * segments (2 and 3), so it SHOULD not be a problem. - * However, some distro kernels (eg. RH9) with backported threading + * segments (2 and 3), so it SHOULD not be a problem. + * However, some distro kernels (eg. RH9) with backported threading * patch use 12 and 13 also when booting... */ linux_gdt[12] = gdt[FLAT_CODE]; linux_gdt[13] = gdt[FLAT_DATA]; @@ -594,7 +594,7 @@ params->orig_x = cursor_x; params->orig_y = cursor_y; #endif - + /* Go... */ ctx = switch_to(ctx); Modified: openbios-devel/arch/amd64/loadfs.c =================================================================== --- openbios-devel/arch/amd64/loadfs.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/loadfs.c 2008-12-11 20:30:53 UTC (rev 284) @@ -27,18 +27,18 @@ unsigned long file_size(void) { llong fpos, fsize; - + /* save current position */ fpos=tell(load_fd); /* go to end of file and get position */ seek_io(load_fd, -1); fsize=tell(load_fd); - + /* go back to old position */ seek_io(load_fd, 0); seek_io(load_fd, fpos); - + return fsize; } Modified: openbios-devel/arch/amd64/multiboot.c =================================================================== --- openbios-devel/arch/amd64/multiboot.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/multiboot.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,6 +1,6 @@ /* Support for Multiboot */ -#include "openbios/config.h" +#include "openbios/config.h" #include "asm/io.h" #include "sys_info.h" #include "multiboot.h" @@ -9,7 +9,7 @@ #ifdef CONFIG_DEBUG_BOOT #define debug printk #else -#define debug(x...) +#define debug(x...) #endif struct mbheader { @@ -62,11 +62,11 @@ printf("Multiboot: no dictionary\n"); return; } - + mod = (module_t *) mbinfo->mods_addr; info->dict_start=(unsigned long *)mod->mod_start; info->dict_end=(unsigned long *)mod->mod_end; - + if (mbinfo->flags & MULTIBOOT_MMAP_VALID) { /* convert mmap records */ mbmem = phys_to_virt(mbinfo->mmap_addr); Modified: openbios-devel/arch/amd64/multiboot.h =================================================================== --- openbios-devel/arch/amd64/multiboot.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/multiboot.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ -/* multiboot.h - * tag: header for multiboot +/* multiboot.h + * tag: header for multiboot * * Copyright (C) 2003-2004 Stefan Reinauer * Modified: openbios-devel/arch/amd64/openbios.c =================================================================== --- openbios-devel/arch/amd64/openbios.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/openbios.c 2008-12-11 20:30:53 UTC (rev 284) @@ -24,7 +24,7 @@ static void init_memory(void) { /* push start and end of available memory to the stack - * so that the forth word QUIT can initialize memory + * so that the forth word QUIT can initialize memory * management. For now we use hardcoded memory between * 0x10000 and 0x9ffff (576k). If we need more memory * than that we have serious bloat. @@ -60,11 +60,11 @@ #endif collect_sys_info(&sys_info); - + dict=intdict; load_dictionary((char *)sys_info.dict_start, sys_info.dict_end-sys_info.dict_start); - + relocate(&sys_info); #ifdef CONFIG_DEBUG_CONSOLE @@ -83,7 +83,7 @@ PUSH_xt( bind_noname_func(arch_init) ); fword("PREPOST-initializer"); - + PC = (ucell)findword("initialize-of"); if (!PC) { Modified: openbios-devel/arch/amd64/openbios.h =================================================================== --- openbios-devel/arch/amd64/openbios.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/openbios.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2004/01/15 16:14:05 samuel> * Time-stamp: <2004/01/15 16:14:05 samuel> - * + * * - * - * - * + * + * + * * Copyright (C) 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #ifndef _H_OPENBIOS Modified: openbios-devel/arch/amd64/segment.c =================================================================== --- openbios-devel/arch/amd64/segment.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/segment.c 2008-12-11 20:30:53 UTC (rev 284) @@ -22,7 +22,7 @@ unsigned int base; } __attribute__((packed)); -/* How far the virtual address (used in C) is different from physical +/* How far the virtual address (used in C) is different from physical * address. Since we start in flat mode, the initial value is zero. */ unsigned long virt_offset = 0; @@ -108,7 +108,7 @@ "movw %5, %%gs\n\t" "movw %5, %%ss\n" : "=&S" (d0), "=&D" (d1), "=&c" (d2) - : "m" (gdtarg), "n" (RELOC_CS), "q" ((unsigned short) RELOC_DS), + : "m" (gdtarg), "n" (RELOC_CS), "q" ((unsigned short) RELOC_DS), "0" (&_start), "1" (new_base), "2" (prog_size)); virt_offset = new_offset; Modified: openbios-devel/arch/amd64/switch.S =================================================================== --- openbios-devel/arch/amd64/switch.S 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/switch.S 2008-12-11 20:30:53 UTC (rev 284) @@ -6,7 +6,7 @@ /* * Entry point * We start execution from here. - * It is assumed that CPU is in 32-bit protected mode and + * It is assumed that CPU is in 32-bit protected mode and * all segments are 4GB and base zero (flat model). */ entry: @@ -28,7 +28,7 @@ * switches the stack, and restores everything from the new stack. * This function takes no argument. New stack pointer is * taken from global variable __context, and old stack pointer - * is also saved to __context. This way we can just jump to + * is also saved to __context. This way we can just jump to * this routine to get back to the original context. * * Call this routine with lcall or pushl %cs; call. @@ -51,7 +51,7 @@ xchgl %eax, 64(%esp) movl %eax, 60(%esp) #endif - + /* At this point we don't know if we are on flat segment * or relocated. So compute the address offset from %eip. * Assuming CS.base==DS.base==SS.base. @@ -62,7 +62,7 @@ /* Interrupts are not allowed... */ cli - + /* Current context pointer is our stack pointer */ movl %esp, %esi Modified: openbios-devel/arch/amd64/sys_info.c =================================================================== --- openbios-devel/arch/amd64/sys_info.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/amd64/sys_info.c 2008-12-11 20:30:53 UTC (rev 284) @@ -7,7 +7,7 @@ #ifdef CONFIG_DEBUG_BOOT #define debug printk #else -#define debug(x...) +#define debug(x...) #endif void collect_multiboot_info(struct sys_info *); Modified: openbios-devel/arch/ppc/briq/briq.c =================================================================== --- openbios-devel/arch/ppc/briq/briq.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/briq.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,19 +1,19 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Copyright (C) 2004, Greg Watson - * + * * derived from mol.c * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -114,7 +114,7 @@ { if( !tty_avail() ) return 0; - + if( ttychar < 0 ) ttychar = inb(UART_BASE); return (ttychar >= 0); @@ -167,7 +167,7 @@ { printk (" "); } - } + } } Modified: openbios-devel/arch/ppc/briq/briq.h =================================================================== --- openbios-devel/arch/ppc/briq/briq.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/briq.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,15 +1,15 @@ -/* +/* * Creation Date: <2004/08/28 17:50:12 stepan> * Time-stamp: <2004/08/28 17:50:12 stepan> - * + * * - * + * * Copyright (C) 2004 Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #ifndef _H_BRIQ Modified: openbios-devel/arch/ppc/briq/init.c =================================================================== --- openbios-devel/arch/ppc/briq/init.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/init.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,22 +1,22 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Initialization for briq * * Copyright (C) 2004 Greg Watson * * based on mol/init.c: - * - * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Samuel & David Rydh + * + * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Samuel & David Rydh * (samuel at ibrium.se, dary at lindesign.se) - * + * * 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 - * + * */ #include "openbios/config.h" @@ -63,7 +63,7 @@ printk("\n"); printk("=============================================================\n"); printk("OpenBIOS %s [%s]\n", OPENBIOS_RELEASE, OPENBIOS_BUILD_DATE ); - + ofmem_init(); initialize_forth(); /* won't return */ @@ -88,7 +88,7 @@ phandle_t ph; #endif int autoboot; - + devtree_init(); node_methods_init(); nvram_init("/pci/mac-io/nvram"); Modified: openbios-devel/arch/ppc/briq/kernel.c =================================================================== --- openbios-devel/arch/ppc/briq/kernel.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/kernel.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,15 +1,15 @@ -/* +/* * Creation Date: <2004/08/28 18:03:25 stepan> * Time-stamp: <2004/08/28 18:03:25 stepan> - * + * * - * + * * Copyright (C) 2004 Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "briq-dict.h" Modified: openbios-devel/arch/ppc/briq/main.c =================================================================== --- openbios-devel/arch/ppc/briq/main.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/main.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,18 +1,18 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Copyright (C) 2004 Greg Watson - * - * Based on MOL specific code which is + * + * Based on MOL specific code which is * Copyright (C) 2002, 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ @@ -65,7 +65,7 @@ s = MIN( phdr[i].p_filesz, phdr[i].p_memsz ); seek_io( fd, elf_offs + phdr[i].p_offset ); - /* printk("filesz: %08lX memsz: %08lX p_offset: %08lX p_vaddr %08lX\n", + /* printk("filesz: %08lX memsz: %08lX p_offset: %08lX p_vaddr %08lX\n", phdr[i].p_filesz, phdr[i].p_memsz, phdr[i].p_offset, phdr[i].p_vaddr ); */ @@ -90,7 +90,7 @@ #endif flush_icache_range( addr, addr+s ); - /*printk("ELF ROM-section loaded at %08lX (size %08lX)\n", + /*printk("ELF ROM-section loaded at %08lX (size %08lX)\n", (ulong)phdr[i].p_vaddr, (ulong)phdr[i].p_memsz );*/ } free( phdr ); @@ -102,8 +102,8 @@ encode_bootpath( const char *spec, const char *args ) { phandle_t chosen_ph = find_dev("/chosen"); - set_property( chosen_ph, "bootpath", spec, strlen(spec)+1 ); - set_property( chosen_ph, "bootargs", args, strlen(args)+1 ); + set_property( chosen_ph, "bootpath", spec, strlen(spec)+1 ); + set_property( chosen_ph, "bootargs", args, strlen(args)+1 ); } /************************************************************************/ Modified: openbios-devel/arch/ppc/briq/methods.c =================================================================== --- openbios-devel/arch/ppc/briq/methods.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/methods.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,21 +1,21 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Misc device node methods * * Copyright (C) 2004 Greg Watson - * + * * Based on MOL specific code which is - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -38,7 +38,7 @@ int physbase = POP(); int s=0x1000, size = (int)of_rtas_end - (int)of_rtas_start; ulong virt; - + while( s < size ) s += 0x1000; virt = ofmem_claim_virt( 0, s, 0x1000 ); @@ -74,7 +74,7 @@ strncpy_nopad( s, addr, len ); s[len]=0; - + printk( "%s", s ); //vfd_draw_str( s ); free( s ); @@ -137,7 +137,7 @@ /* ( -- ) */ static void -ciface_quiesce( ulong args[], ulong ret[] ) +ciface_quiesce( ulong args[], ulong ret[] ) { #if 0 ulong msr; @@ -151,12 +151,12 @@ /* ( -- ms ) */ static void -ciface_milliseconds( ulong args[], ulong ret[] ) +ciface_milliseconds( ulong args[], ulong ret[] ) { extern unsigned long get_timer_freq(); static ulong mticks=0, usecs=0; ulong t; - + asm volatile("mftb %0" : "=r" (t) : ); if( mticks ) usecs += get_timer_freq() / 1000000 * ( t-mticks ); @@ -189,7 +189,7 @@ int size = POP(); int phys = POP(); int ret = ofmem_claim_phys( phys, size, align ); - + if( ret == -1 ) { printk("MEM: claim failure\n"); throw( -13 ); @@ -230,7 +230,7 @@ } /* ( phys virt size mode -- [ret???] ) */ -static void +static void mmu_map( void ) { int mode = POP(); @@ -238,7 +238,7 @@ int virt = POP(); int phys = POP(); int ret; - + /* printk("mmu_map: %x %x %x %x\n", phys, virt, size, mode ); */ ret = ofmem_map( phys, virt, size, mode ); Modified: openbios-devel/arch/ppc/briq/tree.c =================================================================== --- openbios-devel/arch/ppc/briq/tree.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/tree.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * device tree setup - * + * * Copyright (C) 2004 Greg Watson - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" Modified: openbios-devel/arch/ppc/briq/vfd.c =================================================================== --- openbios-devel/arch/ppc/briq/vfd.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/briq/vfd.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2004/08/28 17:29:43 greg> * Time-stamp: <2004/08/28 17:29:43 greg> - * + * * - * + * * Simple text console - * + * * Copyright (C) 2004 Greg Watson - * + * * 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 - * + * */ #include "openbios/config.h" @@ -21,14 +21,14 @@ static int vfd_is_open; static int -vfd_init( void ) +vfd_init( void ) { vfd_is_open = 1; return 0; } void -vfd_close( void ) +vfd_close( void ) { } Modified: openbios-devel/arch/ppc/kernel.c =================================================================== --- openbios-devel/arch/ppc/kernel.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/kernel.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,20 +1,20 @@ -/* +/* * Creation Date: <2003/10/25 14:07:17 samuel> * Time-stamp: <2004/08/28 17:48:19 stepan> - * + * * - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) * Copyright (C) 2003, 2004 Stefan Reinauer - * + * * Based upon unix.c (from OpenBIOS): * * Copyright (C) 2003 Patrick Mauritz, Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -46,7 +46,7 @@ printk("panic: segmentation violation at %x\n", (int)segv_addr); printk("dict=0x%x here=0x%x(dict+0x%x) pc=0x%x(dict+0x%x)\n", - (int)dict, (int)(dict + dicthead), dicthead, + (int)dict, (int)(dict + dicthead), dicthead, PC, PC - (ucell) dict); printk("dstackcnt=%d rstackcnt=%d instruction=%x\n", dstackcnt, rstackcnt, addr); @@ -60,7 +60,7 @@ return -1; } -/* +/* * allocate memory and prepare engine for memory management. */ Modified: openbios-devel/arch/ppc/kernel.h =================================================================== --- openbios-devel/arch/ppc/kernel.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/kernel.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,15 +1,15 @@ -/* +/* * Creation Date: <2004/08/28 17:50:12 stepan> * Time-stamp: <2004/08/28 17:50:12 stepan> - * + * * - * + * * Copyright (C) 2004 Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #ifndef __KERNEL_H__ Modified: openbios-devel/arch/ppc/misc.S =================================================================== --- openbios-devel/arch/ppc/misc.S 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/misc.S 2008-12-11 20:30:53 UTC (rev 284) @@ -1,11 +1,11 @@ -/* +/* * Creation Date: <2002/10/20 15:54:50 samuel> * Time-stamp: <2002/10/20 15:57:21 samuel> - * + * * - * + * * Low-level stuff - * + * * Copyright (C) 2002, 2003 Samuel Rydh (samuel at ibrium.se) * * Based upon misc.S from the the linux kernel with the following @@ -13,11 +13,11 @@ * * Copyright (C) 1995-1996 Gary Thomas (gdt at linuxppc.org), * Cort Dougan (cort at cs.nmt.edu), Paul Mackerras - * + * * 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 - * + * */ #include "asm/asmdefs.h" @@ -26,7 +26,7 @@ /* * Extended precision shifts. - * + * * Updated to be valid for shift counts from 0 to 63 inclusive. * -- Gabriel * @@ -34,12 +34,12 @@ * R5 has shift count * result in R3/R4 * - * ashrdi3: arithmetic right shift (sign propagation) - * lshrdi3: logical right shift + * ashrdi3: arithmetic right shift (sign propagation) + * lshrdi3: logical right shift * ashldi3: left shift */ -GLOBL(__ashrdi3): - subfic r6,r5,32 +GLOBL(__ashrdi3): + subfic r6,r5,32 srw r4,r4,r5 # LSW = count > 31 ? 0 : LSW >> count addi r7,r5,32 # could be xori, or addi with -32 slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count) @@ -51,8 +51,8 @@ or r4,r4,r7 # LSW |= t2 blr -GLOBL(__ashldi3): - subfic r6,r5,32 +GLOBL(__ashldi3): + subfic r6,r5,32 slw r3,r3,r5 # MSW = count > 31 ? 0 : MSW << count addi r7,r5,32 # could be xori, or addi with -32 srw r6,r4,r6 # t1 = count > 31 ? 0 : LSW >> (32-count) @@ -62,14 +62,14 @@ or r3,r3,r7 # MSW |= t2 blr -GLOBL(__lshrdi3): - subfic r6,r5,32 +GLOBL(__lshrdi3): + subfic r6,r5,32 srw r4,r4,r5 # LSW = count > 31 ? 0 : LSW >> count addi r7,r5,32 # could be xori, or addi with -32 slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count) srw r7,r3,r7 # t2 = count < 32 ? 0 : MSW >> (count-32) or r4,r4,r6 # LSW |= t1 srw r3,r3,r5 # MSW = MSW >> count - or r4,r4,r7 # LSW |= t2 + or r4,r4,r7 # LSW |= t2 blr - + Modified: openbios-devel/arch/ppc/mmutypes.h =================================================================== --- openbios-devel/arch/ppc/mmutypes.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mmutypes.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,19 +1,19 @@ -/* +/* * Creation Date: <2002/01/13 13:53:14 samuel> * Time-stamp: <2002/01/27 19:56:11 samuel> - * + * * - * + * * MMU definitions - * + * * Most of these declarations originate from the Linux Kernel * * Copyright (C) 2002 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ #ifndef _H_MMUTYPES Modified: openbios-devel/arch/ppc/mol/console.c =================================================================== --- openbios-devel/arch/ppc/mol/console.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/console.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,18 +1,18 @@ -/* +/* * Creation Date: <2002/10/29 18:59:05 samuel> * Time-stamp: <2003/12/28 22:51:11 samuel> - * + * * - * + * * Simple text console - * + * * Copyright (C) 2002, 2003, 2004 Samuel Rydh (samuel at ibrium.se) * Copyright (C) 2005 Stefan Reinauer - * + * * 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 - * + * */ #include "openbios/config.h" Modified: openbios-devel/arch/ppc/mol/init.c =================================================================== --- openbios-devel/arch/ppc/mol/init.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/init.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,18 +1,18 @@ -/* +/* * Creation Date: <1999/11/16 00:49:26 samuel> * Time-stamp: <2004/04/12 16:26:50 samuel> - * + * * - * + * * Initialization - * - * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Samuel & David Rydh + * + * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Samuel & David Rydh # (samuel at ibrium.se, dary at lindesign.se) - * + * * 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 - * + * */ #include "openbios/config.h" @@ -58,7 +58,7 @@ printk("\n"); printk("=============================================================\n"); printk("OpenBIOS %s [%s]\n", OPENBIOS_RELEASE, OPENBIOS_BUILD_DATE ); - + ofmem_init(); initialize_forth(); /* won't return */ @@ -81,7 +81,7 @@ { mol_phandle_t ph; int autoboot; - + devtree_init(); node_methods_init(); nvram_init("/pci/mac-io/nvram"); Modified: openbios-devel/arch/ppc/mol/kernel.c =================================================================== --- openbios-devel/arch/ppc/mol/kernel.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/kernel.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,15 +1,15 @@ -/* +/* * Creation Date: <2004/08/28 18:03:25 stepan> * Time-stamp: <2004/08/28 18:03:25 stepan> - * + * * - * + * * Copyright (C) 2004 Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "mol-dict.h" Modified: openbios-devel/arch/ppc/mol/main.c =================================================================== --- openbios-devel/arch/ppc/mol/main.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/main.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2002/10/02 22:24:24 samuel> * Time-stamp: <2004/03/27 01:57:55 samuel> - * + * * - * - * - * + * + * + * * Copyright (C) 2002, 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ @@ -71,7 +71,7 @@ s = MIN( phdr[i].p_filesz, phdr[i].p_memsz ); seek_io( fd, elf_offs + phdr[i].p_offset ); - /* printk("filesz: %08lX memsz: %08lX p_offset: %08lX p_vaddr %08lX\n", + /* printk("filesz: %08lX memsz: %08lX p_offset: %08lX p_vaddr %08lX\n", phdr[i].p_filesz, phdr[i].p_memsz, phdr[i].p_offset, phdr[i].p_vaddr ); */ @@ -94,7 +94,7 @@ } flush_icache_range( addr, addr+s ); - /* printk("ELF ROM-section loaded at %08lX (size %08lX)\n", + /* printk("ELF ROM-section loaded at %08lX (size %08lX)\n", (ulong)phdr[i].p_vaddr, (ulong)phdr[i].p_memsz );*/ } free( phdr ); @@ -157,7 +157,7 @@ nw_dec_calibration = OSI_MticksToUsecs(0xfffff*47)/60; memcpy( start + s, timer_calib_start, timer_calib_end - timer_calib_start ); - printk("Timer calibration fix: %d.%02d MHz [%ld]\n", + printk("Timer calibration fix: %d.%02d MHz [%ld]\n", hz/1000, (hz/10)%100, nw_dec_calibration ); break; } @@ -170,20 +170,20 @@ int lszz_offs, lszz_size; ulong entry, data[2]; phandle_t ph; - + lszz_offs = load_elf_rom( &entry, fd ); seek_io( fd, -1 ); lszz_size = tell(fd) - lszz_offs; seek_io( fd, lszz_offs ); - /* printk("Compressed ROM image: offset %08X, size %08X loaded at %08x\n", + /* printk("Compressed ROM image: offset %08X, size %08X loaded at %08x\n", lszz_offs, lszz_size, ROM_BASE ); */ if( ofmem_claim(ROM_BASE, lszz_size, 0) == -1 ) fatal_error("Claim failure (lszz)!\n"); - + read_io( fd, (char*)ROM_BASE, lszz_size ); - + /* Fix the /rom/macos/AAPL,toolbox-image,lzss property (phys, size) */ #if 0 if( (ph=prom_create_node("/rom/macos/")) == -1 ) @@ -195,7 +195,7 @@ data[1] = lszz_size; set_property( ph, "AAPL,toolbox-image,lzss", (char*)data, sizeof(data) ); - /* The 7.8 rom (MacOS 9.2) uses AAPL,toolbox-parcels instead of + /* The 7.8 rom (MacOS 9.2) uses AAPL,toolbox-parcels instead of * AAPL,toolbox-image,lzss. It probably doesn't hurt to have it * always present (we don't have an easy way to determine ROM version...) */ @@ -208,7 +208,7 @@ { char *s, buf[128]; int found = 0; - + if( fast ) { int ind; found = !reopen( fd, "\\\\:tbxi" ); @@ -233,8 +233,8 @@ encode_bootpath( const char *spec, const char *args ) { phandle_t chosen_ph = find_dev("/chosen"); - set_property( chosen_ph, "bootpath", spec, strlen(spec)+1 ); - set_property( chosen_ph, "bootargs", args, strlen(args)+1 ); + set_property( chosen_ph, "bootpath", spec, strlen(spec)+1 ); + set_property( chosen_ph, "bootargs", args, strlen(args)+1 ); } static char * Modified: openbios-devel/arch/ppc/mol/methods.c =================================================================== --- openbios-devel/arch/ppc/mol/methods.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/methods.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2003/10/18 13:24:29 samuel> * Time-stamp: <2004/03/27 02:00:30 samuel> - * + * * - * + * * Misc device node methods - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -30,7 +30,7 @@ DECLARE_NODE( powermgt, INSTALL_OPEN, 0, "/pci/pci-bridge/mac-io/power-mgt" ); /* ( -- ) */ -static void +static void set_hybernot_flag( void ) { } @@ -53,7 +53,7 @@ int physbase = POP(); int s=0x1000, size = (int)of_rtas_end - (int)of_rtas_start; ulong virt; - + while( s < size ) s += 0x1000; virt = ofmem_claim_virt( 0, s, 0x1000 ); @@ -89,7 +89,7 @@ strncpy_nopad( s, addr, len ); s[len]=0; - + /* printk( "%s", s ); */ console_draw_str( s ); free( s ); @@ -159,7 +159,7 @@ char keytable[32]; } kbd_state_t; -static const uchar adb_ascii_table[128] = +static const uchar adb_ascii_table[128] = /* 0x00 */ "asdfhgzxcv`bqwer" /* 0x10 */ "yt123465=97-80]o" /* 0x20 */ "u[ip\nlj'k;\\,/nm." @@ -169,7 +169,7 @@ /* 0x60 */ " " /* 0x70 */ " "; -static const uchar adb_shift_table[128] = +static const uchar adb_shift_table[128] = /* 0x00 */ "ASDFHGZXCV~BQWER" /* 0x10 */ "YT!@#$^%+(&_*)}O" /* 0x20 */ "U{IP\nLJ\"K:|" @@ -179,7 +179,7 @@ /* 0x60 */ " " /* 0x70 */ " "; -DECLARE_NODE( kbd, INSTALL_OPEN, sizeof(kbd_state_t), +DECLARE_NODE( kbd, INSTALL_OPEN, sizeof(kbd_state_t), "/psuedo-hid/keyboard", "/mol/mol-keyboard", "/mol/keyboard" @@ -203,7 +203,7 @@ int ret=0, len = POP(); char *p = (char*)POP(); int key; - + if( !p || !len ) { PUSH( -1 ); return; @@ -214,12 +214,12 @@ ks->save_key = 0; RET( 1 ); } - OSI_USleep(1); /* be nice */ + OSI_USleep(1); /* be nice */ for( ; (key=OSI_GetAdbKey()) >= 0 ; ) { int code = (key & 0x7f); int down = !(key & 0x80); - + if( code == 0x36 /* ctrl */ ) { ks->cntrl = down; continue; @@ -273,7 +273,7 @@ /* ( -- ) */ static void -ciface_quiesce( ulong args[], ulong ret[] ) +ciface_quiesce( ulong args[], ulong ret[] ) { #if 0 ulong msr; @@ -290,11 +290,11 @@ /* ( -- ms ) */ static void -ciface_milliseconds( ulong args[], ulong ret[] ) +ciface_milliseconds( ulong args[], ulong ret[] ) { static ulong mticks=0, usecs=0; ulong t; - + asm volatile("mftb %0" : "=r" (t) : ); if( mticks ) usecs += OSI_MticksToUsecs( t-mticks ); @@ -327,7 +327,7 @@ int size = POP(); int phys = POP(); int ret = ofmem_claim_phys( phys, size, align ); - + if( ret == -1 ) { printk("MEM: claim failure\n"); throw( -13 ); @@ -368,7 +368,7 @@ } /* ( phys virt size mode -- [ret???] ) */ -static void +static void mmu_map( void ) { int mode = POP(); @@ -376,7 +376,7 @@ int virt = POP(); int phys = POP(); int ret; - + /* printk("mmu_map: %x %x %x %x\n", phys, virt, size, mode ); */ ret = ofmem_map( phys, virt, size, mode ); Modified: openbios-devel/arch/ppc/mol/mol.c =================================================================== --- openbios-devel/arch/ppc/mol/mol.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/mol.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2003/12/19 18:46:21 samuel> * Time-stamp: <2004/04/12 16:27:12 samuel> - * + * * - * - * - * + * + * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -96,7 +96,7 @@ { if( !tty_avail() ) return 0; - + if( ttychar < 0 ) ttychar = OSI_TTYGetc(); if( ttychar < 0 ) Modified: openbios-devel/arch/ppc/mol/mol.h =================================================================== --- openbios-devel/arch/ppc/mol/mol.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/mol.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2003/12/20 00:20:12 samuel> * Time-stamp: <2004/03/27 01:52:50 samuel> - * + * * - * - * - * + * + * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #ifndef _H_MOL Modified: openbios-devel/arch/ppc/mol/osi-blk.c =================================================================== --- openbios-devel/arch/ppc/mol/osi-blk.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/osi-blk.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2003/12/07 19:08:33 samuel> * Time-stamp: <2004/01/07 19:38:36 samuel> - * + * * - * + * * OSI-block interface - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -64,7 +64,7 @@ int i, n = POP(); int blk = POP(); char *dest = (char*)POP(); - + /* printk("osiblk_read_blocks %x block=%d n=%d\n", (int)dest, blk, n ); */ for( i=0; i * Time-stamp: <2004/01/07 19:38:45 samuel> - * + * * - * + * * SCSI device node - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -105,7 +105,7 @@ char *dest = (char*)POP(); unsigned char cmd[10]; int len = nblks * sd->info->blocksize; - + memset( dest, 0, len ); /* printk("READ: blk: %d length %d\n", blk, len ); */ @@ -190,7 +190,7 @@ continue; } break; - } + } info->valid = 1; return 0; Modified: openbios-devel/arch/ppc/mol/prom.c =================================================================== --- openbios-devel/arch/ppc/mol/prom.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/prom.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2002/10/03 20:55:02 samuel> * Time-stamp: <2002/10/29 13:00:23 samuel> - * + * * - * + * * oftree interface - * + * * Copyright (C) 2002, 2003 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ #include "openbios/config.h" @@ -69,7 +69,7 @@ /* ret: prop len or -1 if error */ int -prom_get_prop_by_path( const char *path, const char *name, char *buf, long buflen ) +prom_get_prop_by_path( const char *path, const char *name, char *buf, long buflen ) { mol_phandle_t ph = prom_find_device(path); return (ph != -1)? prom_get_prop( ph, name, buf, buflen) : -1; @@ -105,12 +105,12 @@ if( !path ) return -1; - + if( (ph=OSI_PromPathIface( kPromFindDevice, path )) != -1 ) return ph; else if( path[0] == '/' ) return -1; - + /* might be an alias */ if( !(p=strpbrk(path, "@:/")) ) p = (char*)path + strlen(path); @@ -126,7 +126,7 @@ printk("Error: aliases must be absolute!\n"); return -1; } - ph = OSI_PromPathIface( kPromFindDevice, buf2 ); + ph = OSI_PromPathIface( kPromFindDevice, buf2 ); return ph; } Modified: openbios-devel/arch/ppc/mol/prom.h =================================================================== --- openbios-devel/arch/ppc/mol/prom.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/prom.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2002/10/03 21:07:27 samuel> * Time-stamp: <2003/10/22 22:45:26 samuel> - * + * * - * + * * device tree interface - * + * * Copyright (C) 2002, 2003 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ #ifndef _H_PROM Modified: openbios-devel/arch/ppc/mol/pseudodisk.c =================================================================== --- openbios-devel/arch/ppc/mol/pseudodisk.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/pseudodisk.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2003/11/26 16:55:47 samuel> * Time-stamp: <2004/01/07 19:41:54 samuel> - * + * * - * + * * pseudodisk (contains files exported from linux) - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -77,7 +77,7 @@ int len = POP(); char *dest = (char*)POP(); int cnt; - + if( pb->fd < 0 ) { memset( dest, 0, len ); PUSH(len); @@ -119,9 +119,9 @@ if( pos_lo == -1 ) pos_lo = pb->size; } - + pb->seekpos = pos_lo; - + PUSH(0); /* ??? */ } Modified: openbios-devel/arch/ppc/mol/tree.c =================================================================== --- openbios-devel/arch/ppc/mol/tree.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/mol/tree.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2003/11/18 14:55:05 samuel> * Time-stamp: <2004/03/27 02:03:55 samuel> - * + * * - * + * * device tree setup - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -30,7 +30,7 @@ char name[40], path[80]; int exists; phandle_t ph; - + if( !molph ) return; @@ -73,7 +73,7 @@ set_int_property( ph, "MOL,phandle", molph ); copy_node( prom_child(molph) ); - + if( !exists ) fword("finish-device"); else @@ -128,7 +128,7 @@ if( (map=(int*)get_property(ph, "interrupt-map", &len)) ) { int i, acells = get_int_property(ph, "#address-cells", NULL); int icells = get_int_property(ph, "#interrupt-cells", NULL); - + len /= sizeof(int); for( i=0; i * Time-stamp: <2004/01/07 19:42:36 samuel> - * + * * - * + * * OF Memory manager - * + * * Copyright (C) 1999-2004 Samuel Rydh (samuel at ibrium.se) * Copyright (C) 2004 Stefan Reinauer - * + * * 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 - * + * */ /* TODO: Clean up MOLisms in a decent way */ @@ -44,14 +44,14 @@ * * Physical * - * 0x00000000 Exception vectors + * 0x00000000 Exception vectors * 0x00004000 Free space * 0x01e00000 Open Firmware (us) * 0x01f00000 OF allocations * 0x01ff0000 PTE Hash * 0x02000000- Free space * - * Allocations grow downwards from 0x01e00000 + * Allocations grow downwards from 0x01e00000 * ****************************************************************/ @@ -104,7 +104,7 @@ /************************************************************************/ void * -malloc( int size ) +malloc( int size ) { alloc_desc_t *d, **pp; char *ret; @@ -114,11 +114,11 @@ if( !ofmem.next_malloc ) ofmem.next_malloc = (char*)OF_MALLOC_BASE; - + if( size & 3 ) size += 4 - (size & 3); size += sizeof(alloc_desc_t); - + /* look in the freelist */ for( pp=&ofmem.mfree; *pp && (**pp).size < size; pp = &(**pp).next ) ; @@ -154,7 +154,7 @@ /* it is legal to free NULL pointers (size zero allocations) */ if( !ptr ) return; - + d = (alloc_desc_t*)(ptr - sizeof(alloc_desc_t)); d->next = ofmem.mfree; @@ -166,11 +166,11 @@ } void * -realloc( void *ptr, size_t size ) +realloc( void *ptr, size_t size ) { alloc_desc_t *d = (alloc_desc_t*)(ptr - sizeof(alloc_desc_t)); char *p; - + if( !ptr ) return malloc( size ); if( !size ) { @@ -199,13 +199,13 @@ } static void -print_phys_range() +print_phys_range() { print_range( ofmem.phys_range, "phys" ); } static void -print_virt_range() +print_virt_range() { print_range( ofmem.virt_range, "virt" ); } @@ -259,7 +259,7 @@ add_entry_( ulong ea, ulong size, range_t **r ) { range_t *nr; - + for( ; *r && (**r).start < ea; r=&(**r).next ) ; nr = (range_t*)malloc( sizeof(range_t) ); @@ -312,17 +312,17 @@ { ulong base = min; range_t *r2; - + if( (align & (align-1)) ) { printk("bad alignment %ld\n", align); align = 0x1000; } if( !align ) align = 0x1000; - + base = reverse ? max - size : min; r2 = reverse ? NULL : r; - + for( ;; ) { if( !reverse ) { base = (base + align - 1) & ~(align-1); @@ -395,7 +395,7 @@ add_entry( virt, size, &ofmem.virt_range ); return virt; } - + virt = find_area( align, size, ofmem.virt_range, min, max, reverse ); if( virt == (ulong)-1 ) { printk("ofmem_claim_virt - out of space\n"); @@ -451,7 +451,7 @@ } if( size & 0xfff ) size = (size + 0xfff) & ~0xfff; - + /* printk("...free memory found... phys: %08lX, virt: %08lX, size %lX\n", phys, virt, size ); */ ofmem_map( phys, virt, size, def_memmode(phys) ); return virt + offs; @@ -466,7 +466,7 @@ split_trans( ulong virt ) { translation_t *t, *t2; - + for( t=ofmem.trans; t; t=t->next ) { if( virt > t->virt && virt < t->virt + t->size-1 ) { t2 = (translation_t*)malloc( sizeof(translation_t) ); @@ -485,7 +485,7 @@ map_page_range( ulong virt, ulong phys, ulong size, int mode ) { translation_t *t, **tt; - + split_trans( virt ); split_trans( virt + size ); @@ -523,9 +523,9 @@ int ofmem_map( ulong phys, ulong virt, ulong size, int mode ) { - /* printk("+ofmem_map: %08lX --> %08lX (size %08lX, mode 0x%02X)\n", + /* printk("+ofmem_map: %08lX --> %08lX (size %08lX, mode 0x%02X)\n", virt, phys, size, mode ); */ - + if( (phys & 0xfff) || (virt & 0xfff) || (size & 0xfff) ) { printk("ofmem_map: Bad parameters (%08lX %08lX %08lX)\n", phys, virt, size ); phys &= ~0xfff; @@ -548,7 +548,7 @@ ofmem_translate( ulong virt, ulong *mode ) { translation_t *t; - + for( t=ofmem.trans; t && t->virt <= virt ; t=t->next ) { ulong offs; if( t->virt + t->size - 1 < virt ) @@ -611,7 +611,7 @@ ulong *upte, cmp, hash1; int i, vsid, found; mPTE_t *pp; - + vsid = (ea>>28) + SEGR_BASE; cmp = BIT(0) | (vsid << 7) | ((ea & 0x0fffffff) >> 22); @@ -621,7 +621,7 @@ pp = (mPTE_t*)(HASH_BASE + (hash1 << 6)); upte = (ulong*)pp; - + /* replace old translation */ for( found=0, i=0; !found && i<8; i++ ) if( cmp == upte[i*2] ) @@ -651,7 +651,7 @@ int mode; asm volatile("mfdar %0" : "=r" (dar) : ); - asm volatile("mfdsisr %0" : "=r" (dsisr) : ); + asm volatile("mfdsisr %0" : "=r" (dsisr) : ); //printk("dsi-exception @ %08lx <%08lx>\n", dar, dsisr ); hash_page( dar, ea_to_phys(dar, &mode), mode ); } @@ -663,7 +663,7 @@ int mode; asm volatile("mfsrr0 %0" : "=r" (nip) : ); - asm volatile("mfsrr1 %0" : "=r" (srr1) : ); + asm volatile("mfsrr1 %0" : "=r" (srr1) : ); //printk("isi-exception @ %08lx <%08lx>\n", nip, srr1 ); hash_page( nip, ea_to_phys(nip, &mode), mode ); Modified: openbios-devel/arch/ppc/osi.h =================================================================== --- openbios-devel/arch/ppc/osi.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/osi.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,19 +1,19 @@ -/* +/* * Creation Date: <1999/03/18 03:19:43 samuel> * Time-stamp: <2003/12/26 16:58:19 samuel> - * + * * - * + * * This file includes definitions for drivers * running in the "emulated" OS. (Mainly the 'sc' * mechanism of communicating) - * + * * Copyright (C) 1999, 2000, 2001, 2002, 2003 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ #ifndef _H_OSI Modified: openbios-devel/arch/ppc/osi_calls.h =================================================================== --- openbios-devel/arch/ppc/osi_calls.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/osi_calls.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2002/06/16 01:40:57 samuel> * Time-stamp: <2003/12/26 17:02:09 samuel> - * + * * - * + * * OSI call inlines - * + * * Copyright (C) 2002, 2003 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ #ifndef _H_OSI_CALLS @@ -43,7 +43,7 @@ register unsigned long dreg(r3); \ register unsigned long dreg(r4); \ register unsigned long dreg(r5) \ - ,##input_regs ; + ,##input_regs ; #define _oc_syscall( number, extra_ret_regs... ) \ __oc_r3 = OSI_SC_MAGIC_R3; \ @@ -90,7 +90,7 @@ ,## inputregs \ : "memory", \ "r4", "r5", "r6", "r7", "r8", "r9" ); -#endif +#endif /************************************************************************/ @@ -339,14 +339,14 @@ /* NVRAM */ static inline _osi_call0( int, OSI_NVRamSize, OSI_NVRAM_SIZE ); static inline _osi_call1( int, OSI_ReadNVRamByte, OSI_READ_NVRAM_BYTE, int, offs ); -static inline _osi_call2( int, OSI_WriteNVRamByte, OSI_WRITE_NVRAM_BYTE, int, offs, +static inline _osi_call2( int, OSI_WriteNVRamByte, OSI_WRITE_NVRAM_BYTE, int, offs, unsigned char, ch ); /* keyboard stuff */ static inline _osi_call0_w1( int, OSI_GetAdbKey2, OSI_GET_ADB_KEY, int *, raw_key ); static inline _osi_call1( int, OSI_KbdCntrl, OSI_KBD_CNTRL, int, cmd ); -static inline int OSI_GetAdbKey( void ) +static inline int OSI_GetAdbKey( void ) { int dummy_raw_key; return OSI_GetAdbKey2( &dummy_raw_key ); } static inline _osi_call2( int, OSI_MapAdbKey, OSI_MAP_ADB_KEY, int, keycode, int, adbkey ) static inline _osi_call1( int, OSI_KeycodeToAdb, OSI_KEYCODE_TO_ADB, int, keycode ); @@ -387,12 +387,12 @@ static inline _osi_call2_w4( int, OSI_ABlkDiskInfo, OSI_ABLK_DISK_INFO, int, channel, int, unit, struct ablk_disk_info *, retinfo ); static inline _osi_call1( int, OSI_ABlkKick, OSI_ABLK_KICK, int, channel ); -static inline _osi_call1_w1w1w1( int, OSI_ABlkIRQAck, OSI_ABLK_IRQ_ACK, int, channel, int *, req_count, +static inline _osi_call1_w1w1w1( int, OSI_ABlkIRQAck, OSI_ABLK_IRQ_ACK, int, channel, int *, req_count, int *, active, int *, events ); static inline _osi_call3( int, OSI_ABlkRingSetup, OSI_ABLK_RING_SETUP, int, channel, int, mphys, int, n_el ); static inline _osi_call2( int, OSI_ABlkCntrl, OSI_ABLK_CNTRL, int, channel, int, cmd ); static inline _osi_call3( int, OSI_ABlkCntrl1, OSI_ABLK_CNTRL, int, channel, int, cmd, int, param ); -static inline _osi_call5( int, OSI_ABlkSyncRead, OSI_ABLK_SYNC_READ, int, channel, int, unit, +static inline _osi_call5( int, OSI_ABlkSyncRead, OSI_ABLK_SYNC_READ, int, channel, int, unit, int, blk, ulong, mphys, int, size ); static inline _osi_call5( int, OSI_ABlkSyncWrite, OSI_ABLK_SYNC_WRITE, int, channel, int, unit, int, blk, ulong, mphys, int, size ); @@ -403,7 +403,7 @@ /* enet2 */ static inline _osi_call0( int, OSI_Enet2Open, OSI_ENET2_OPEN ); static inline _osi_call0( int, OSI_Enet2Close, OSI_ENET2_CLOSE ); -static inline _osi_call3( int, OSI_Enet2RingSetup, OSI_ENET2_RING_SETUP, int, which_ring, +static inline _osi_call3( int, OSI_Enet2RingSetup, OSI_ENET2_RING_SETUP, int, which_ring, int, ring_mphys, int, n_el ); static inline _osi_call2( int, OSI_Enet2Cntrl1, OSI_ENET2_CNTRL, int, cmd, int, param ); static inline _osi_call1( int, OSI_Enet2Cntrl, OSI_ENET2_CNTRL, int, cmd ); @@ -411,7 +411,7 @@ static inline _osi_call0_w2( int, OSI_Enet2GetHWAddr__, OSI_ENET2_GET_HWADDR, ulong *, retbuf ); static inline int OSI_Enet2GetHWAddr( unsigned char *addr ) { - int ret; + int ret; ulong buf[2]; ret = OSI_Enet2GetHWAddr__( buf ); Modified: openbios-devel/arch/ppc/pearpc/init.c =================================================================== --- openbios-devel/arch/ppc/pearpc/init.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/init.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,23 +1,23 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Initialization for pearpc * * Copyright (C) 2004 Greg Watson * Copyright (C) 2005 Stefan Reinauer * * based on mol/init.c: - * - * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Samuel & David Rydh + * + * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Samuel & David Rydh * (samuel at ibrium.se, dary at lindesign.se) - * + * * 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 - * + * */ #include "openbios/config.h" @@ -66,7 +66,7 @@ printk("\n"); printk("=============================================================\n"); printk("OpenBIOS %s [%s]\n", OPENBIOS_RELEASE, OPENBIOS_BUILD_DATE ); - + ofmem_init(); initialize_forth(); /* won't return */ @@ -91,7 +91,7 @@ phandle_t ph; #endif int autoboot; - + devtree_init(); nvram_init("/pci/mac-io/nvram"); modules_init(); @@ -108,7 +108,7 @@ node_methods_init(); init_video(); - + #if USE_RTAS if( !(ph=find_dev("/rtas")) ) printk("Warning: No /rtas node\n"); Modified: openbios-devel/arch/ppc/pearpc/kernel.c =================================================================== --- openbios-devel/arch/ppc/pearpc/kernel.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/kernel.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,15 +1,15 @@ -/* +/* * Creation Date: <2004/08/28 18:03:25 stepan> * Time-stamp: <2004/08/28 18:03:25 stepan> - * + * * - * + * * Copyright (C) 2005 Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "pearpc-dict.h" Modified: openbios-devel/arch/ppc/pearpc/main.c =================================================================== --- openbios-devel/arch/ppc/pearpc/main.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/main.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,18 +1,18 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Copyright (C) 2004 Greg Watson - * - * Based on MOL specific code which is + * + * Based on MOL specific code which is * Copyright (C) 2002, 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ @@ -65,7 +65,7 @@ s = MIN( phdr[i].p_filesz, phdr[i].p_memsz ); seek_io( fd, elf_offs + phdr[i].p_offset ); - /* printk("filesz: %08lX memsz: %08lX p_offset: %08lX p_vaddr %08lX\n", + /* printk("filesz: %08lX memsz: %08lX p_offset: %08lX p_vaddr %08lX\n", phdr[i].p_filesz, phdr[i].p_memsz, phdr[i].p_offset, phdr[i].p_vaddr ); */ @@ -90,7 +90,7 @@ #endif flush_icache_range( addr, addr+s ); - /*printk("ELF ROM-section loaded at %08lX (size %08lX)\n", + /*printk("ELF ROM-section loaded at %08lX (size %08lX)\n", (ulong)phdr[i].p_vaddr, (ulong)phdr[i].p_memsz );*/ } free( phdr ); @@ -102,8 +102,8 @@ encode_bootpath( const char *spec, const char *args ) { phandle_t chosen_ph = find_dev("/chosen"); - set_property( chosen_ph, "bootpath", spec, strlen(spec)+1 ); - set_property( chosen_ph, "bootargs", args, strlen(args)+1 ); + set_property( chosen_ph, "bootpath", spec, strlen(spec)+1 ); + set_property( chosen_ph, "bootargs", args, strlen(args)+1 ); } /************************************************************************/ Modified: openbios-devel/arch/ppc/pearpc/methods.c =================================================================== --- openbios-devel/arch/ppc/pearpc/methods.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/methods.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,21 +1,21 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Misc device node methods * * Copyright (C) 2004 Greg Watson - * + * * Based on MOL specific code which is - * + * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -38,7 +38,7 @@ int physbase = POP(); int s=0x1000, size = (int)of_rtas_end - (int)of_rtas_start; ulong virt; - + while( s < size ) s += 0x1000; virt = ofmem_claim_virt( 0, s, 0x1000 ); @@ -74,11 +74,11 @@ strncpy_nopad( s, addr, len ); s[len]=0; - + printk( "%s", s ); //vfd_draw_str( s ); console_draw_str( s ); - + free( s ); PUSH( len ); @@ -139,7 +139,7 @@ /* ( -- ) */ static void -ciface_quiesce( ulong args[], ulong ret[] ) +ciface_quiesce( ulong args[], ulong ret[] ) { #if 0 ulong msr; @@ -153,12 +153,12 @@ /* ( -- ms ) */ static void -ciface_milliseconds( ulong args[], ulong ret[] ) +ciface_milliseconds( ulong args[], ulong ret[] ) { extern unsigned long get_timer_freq(); static ulong mticks=0, usecs=0; ulong t; - + asm volatile("mftb %0" : "=r" (t) : ); if( mticks ) usecs += get_timer_freq() / 1000000 * ( t-mticks ); @@ -191,7 +191,7 @@ int size = POP(); int phys = POP(); int ret = ofmem_claim_phys( phys, size, align ); - + if( ret == -1 ) { printk("MEM: claim failure\n"); throw( -13 ); @@ -232,7 +232,7 @@ } /* ( phys virt size mode -- [ret???] ) */ -static void +static void mmu_map( void ) { int mode = POP(); @@ -240,7 +240,7 @@ int virt = POP(); int phys = POP(); int ret; - + /* printk("mmu_map: %x %x %x %x\n", phys, virt, size, mode ); */ ret = ofmem_map( phys, virt, size, mode ); Modified: openbios-devel/arch/ppc/pearpc/pearpc.c =================================================================== --- openbios-devel/arch/ppc/pearpc/pearpc.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/pearpc.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,19 +1,19 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * Copyright (C) 2004, Greg Watson - * + * * derived from mol.c * * Copyright (C) 2003, 2004 Samuel Rydh (samuel at ibrium.se) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -116,7 +116,7 @@ { if( !tty_avail() ) return 0; - + if( ttychar < 0 ) ttychar = inb(UART_BASE); return (ttychar >= 0); @@ -172,7 +172,7 @@ { printk (" "); } - } + } } Modified: openbios-devel/arch/ppc/pearpc/pearpc.h =================================================================== --- openbios-devel/arch/ppc/pearpc/pearpc.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/pearpc.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,15 +1,15 @@ -/* +/* * Creation Date: <2004/08/28 17:50:12 stepan> * Time-stamp: <2004/08/28 17:50:12 stepan> - * + * * - * + * * Copyright (C) 2005 Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #ifndef _H_PEARPC Modified: openbios-devel/arch/ppc/pearpc/tree.c =================================================================== --- openbios-devel/arch/ppc/pearpc/tree.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/tree.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2004/08/28 18:38:22 greg> * Time-stamp: <2004/08/28 18:38:22 greg> - * + * * - * + * * device tree setup - * + * * Copyright (C) 2004 Greg Watson - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" Modified: openbios-devel/arch/ppc/pearpc/vfd.c =================================================================== --- openbios-devel/arch/ppc/pearpc/vfd.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/pearpc/vfd.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,17 +1,17 @@ -/* +/* * Creation Date: <2004/08/28 17:29:43 greg> * Time-stamp: <2004/08/28 17:29:43 greg> - * + * * - * + * * Simple text console - * + * * Copyright (C) 2004 Greg Watson - * + * * 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 - * + * */ #include "openbios/config.h" @@ -21,14 +21,14 @@ static int vfd_is_open; static int -vfd_init( void ) +vfd_init( void ) { vfd_is_open = 1; return 0; } void -vfd_close( void ) +vfd_close( void ) { } Modified: openbios-devel/arch/ppc/start.S =================================================================== --- openbios-devel/arch/ppc/start.S 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/ppc/start.S 2008-12-11 20:30:53 UTC (rev 284) @@ -1,23 +1,23 @@ -/* +/* * Creation Date: <2001/06/16 21:30:18 samuel> * Time-stamp: <2003/04/04 16:32:06 samuel> - * + * * - * + * * Asm glue for ELF images run inside MOL - * + * * Copyright (C) 2001, 2002, 2003 Samuel Rydh (samuel at ibrium.se) - * + * * 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 - * + * */ #include "asm/asmdefs.h" #include "asm/processor.h" #include "osi.h" - + /************************************************************************/ /* Macros */ /************************************************************************/ @@ -73,8 +73,8 @@ .space 32*1024 // 32 K exception stack estack: .space 128 - - + + /************************************************************************/ /* entry */ /************************************************************************/ @@ -83,7 +83,7 @@ GLOBL(_start): li r0,0 mtmsr r0 - + lis r1,HA(estack) addi r1,r1,LO(estack) mtsprg0 r1 // setup exception stack @@ -122,7 +122,7 @@ /* According to IEEE 1275, PPC bindings: - * + * * MSR = FP, ME + (DR|IR) * r1 = stack (32 K + 32 bytes link area above) * r5 = clint interface handler @@ -156,7 +156,7 @@ lwz r0,20(r1) mtlr r0 addi r1,r1,16 - // XXX: should restore r12-r31 etc.. + // XXX: should restore r12-r31 etc.. // we should not really come here though blr @@ -191,7 +191,7 @@ lwz r0,16(r1) lwz r1,8(r1) // restore caller stack blr - + /* rtas glue (must be reloctable) */ GLOBL(of_rtas_start): /* r3 = argument buffer, r4 = of_rtas_start */ @@ -276,12 +276,12 @@ mtctr r3 bctrl b exception_return - + ILLEGAL_VECTOR( 0x500 ) ILLEGAL_VECTOR( 0x600 ) ILLEGAL_VECTOR( 0x700 ) -VECTOR( 0x800, "FPU" ): +VECTOR( 0x800, "FPU" ): mtsprg1 r3 mfsrr1 r3 ori r3,r3,0x2000 Modified: openbios-devel/arch/sparc32/linux_load.c =================================================================== --- openbios-devel/arch/sparc32/linux_load.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc32/linux_load.c 2008-12-11 20:30:53 UTC (rev 284) @@ -123,7 +123,7 @@ uint16_t ramdisk_flags; /* 0x1f8 */ #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 -#define RAMDISK_LOAD_FLAG 0x4000 +#define RAMDISK_LOAD_FLAG 0x4000 uint8_t reserved8[2]; /* 0x1fa */ uint16_t orig_root_dev; /* 0x1fc */ uint8_t reserved9[1]; /* 0x1fe */ Modified: openbios-devel/arch/sparc32/loadfs.c =================================================================== --- openbios-devel/arch/sparc32/loadfs.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc32/loadfs.c 2008-12-11 20:30:53 UTC (rev 284) @@ -17,7 +17,7 @@ { if(load_fd==-1) return; - + close_io(load_fd); load_fd=-1; } @@ -42,7 +42,7 @@ unsigned long file_size(void) { llong fpos, fsize; - + if (load_fd < 0) return 0; @@ -52,11 +52,11 @@ /* go to end of file and get position */ seek_io(load_fd, -1); fsize=tell(load_fd); - + /* go back to old position */ seek_io(load_fd, 0); seek_io(load_fd, fpos); - + return fsize; } Modified: openbios-devel/arch/sparc32/openbios.c =================================================================== --- openbios-devel/arch/sparc32/openbios.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc32/openbios.c 2008-12-11 20:30:53 UTC (rev 284) @@ -168,7 +168,7 @@ load_dictionary((char *)sys_info.dict_start, (unsigned long)sys_info.dict_end - (unsigned long)sys_info.dict_start); - + #ifdef CONFIG_DEBUG_BOOT printk("forth started.\n"); printk("initializing memory..."); Modified: openbios-devel/arch/sparc32/switch.S =================================================================== --- openbios-devel/arch/sparc32/switch.S 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc32/switch.S 2008-12-11 20:30:53 UTC (rev 284) @@ -66,7 +66,7 @@ set (PSR_PS | PSR_S | PSR_PIL | PSR_EF), %g2 wr %g2, 0x0, %psr #endif - + /* Load all registers */ set __context, %g1 Modified: openbios-devel/arch/sparc64/boot.c =================================================================== --- openbios-devel/arch/sparc64/boot.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc64/boot.c 2008-12-11 20:30:53 UTC (rev 284) @@ -22,7 +22,7 @@ { char *path=pop_fstr_copy(), *param; char altpath[256]; - + if (kernel_size) { void (*entry)(unsigned long p1, unsigned long p2, unsigned long p3, unsigned long p4, unsigned long p5); @@ -75,7 +75,7 @@ POP(); param = pop_fstr_copy(); } - + printk("[sparc64] Booting file '%s' ", path); if (param) printk("with parameters '%s'\n", param); Modified: openbios-devel/arch/sparc64/console.c =================================================================== --- openbios-devel/arch/sparc64/console.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc64/console.c 2008-12-11 20:30:53 UTC (rev 284) @@ -201,7 +201,7 @@ static void video_putchar(int c) { int p=1; - + if (c == '\n' || c == '\r') { video_newline(); return; @@ -229,7 +229,7 @@ static void video_cls(void) { int i; - + for (i = 0; i < 2 * COLUMNS * LINES;) { video[i++] = 0; video[i++] = ATTRIBUTE; Modified: openbios-devel/arch/sparc64/entry.S =================================================================== --- openbios-devel/arch/sparc64/entry.S 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc64/entry.S 2008-12-11 20:30:53 UTC (rev 284) @@ -199,7 +199,7 @@ bne 1b nop #endif - + membar #Sync setx _start, %g7, %g4 Modified: openbios-devel/arch/sparc64/linux_load.c =================================================================== --- openbios-devel/arch/sparc64/linux_load.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc64/linux_load.c 2008-12-11 20:30:53 UTC (rev 284) @@ -123,7 +123,7 @@ uint16_t ramdisk_flags; /* 0x1f8 */ #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 -#define RAMDISK_LOAD_FLAG 0x4000 +#define RAMDISK_LOAD_FLAG 0x4000 uint8_t reserved8[2]; /* 0x1fa */ uint16_t orig_root_dev; /* 0x1fc */ uint8_t reserved9[1]; /* 0x1fe */ Modified: openbios-devel/arch/sparc64/loadfs.c =================================================================== --- openbios-devel/arch/sparc64/loadfs.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc64/loadfs.c 2008-12-11 20:30:53 UTC (rev 284) @@ -17,7 +17,7 @@ { if(load_fd==-1) return; - + close_io(load_fd); load_fd=-1; } @@ -42,7 +42,7 @@ unsigned long file_size(void) { llong fpos, fsize; - + if (load_fd < 0) return 0; @@ -52,11 +52,11 @@ /* go to end of file and get position */ seek_io(load_fd, -1); fsize=tell(load_fd); - + /* go back to old position */ seek_io(load_fd, 0); seek_io(load_fd, fpos); - + return fsize; } Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc64/openbios.c 2008-12-11 20:30:53 UTC (rev 284) @@ -898,12 +898,12 @@ #endif collect_sys_info(&sys_info); - + dict=intdict; load_dictionary((char *)sys_info.dict_start, (unsigned long)sys_info.dict_end - (unsigned long)sys_info.dict_start); - + #ifdef CONFIG_DEBUG_BOOT printk("forth started.\n"); printk("initializing memory..."); @@ -917,7 +917,7 @@ PUSH_xt( bind_noname_func(arch_init) ); fword("PREPOST-initializer"); - + PC = (ucell)findword("initialize-of"); if (!PC) { Modified: openbios-devel/arch/sparc64/openbios.h =================================================================== --- openbios-devel/arch/sparc64/openbios.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/sparc64/openbios.h 2008-12-11 20:30:53 UTC (rev 284) @@ -3,9 +3,9 @@ * Time-stamp: <2004/01/15 16:14:05 samuel> * * - * - * * + * + * * Copyright (C) 2004 Samuel Rydh (samuel at ibrium.se) * * This program is free software; you can redistribute it and/or Modified: openbios-devel/arch/unix/blk.c =================================================================== --- openbios-devel/arch/unix/blk.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/blk.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,14 +1,14 @@ -/* +/* * - * - * block device emulation for unix hosts - * + * + * block device emulation for unix hosts + * * Copyright (C) 2004 Stefan Reinauer - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 - * + * */ #include "openbios/config.h" @@ -60,9 +60,9 @@ cell i, n = POP(); cell blk = POP(); char *dest = (char*)POP(); - + // printk("blk_read_blocks %x block=%d n=%d\n", (ucell)dest, blk, n ); - + for( i=0; iinsertItem( "E&xit", this, SLOT(quit()), CTRL+Key_Q ); - + QPopupMenu *help = new QPopupMenu( this ); help->insertItem("&About OpenBIOS", this, SLOT(about()), CTRL+Key_H ); help->insertItem( "About &Qt", this, SLOT(aboutQt()) ); - + menu = new QMenuBar( this ); Q_CHECK_PTR( menu ); menu->insertItem( "&File", file ); menu->insertSeparator(); menu->insertItem( "&Help", help ); menu->setSeparator( QMenuBar::InWindowsStyle ); - + setFixedSize(sizex,sizey+menu->heightForWidth(sizex)); - + buffer.create(sizex, sizey, depth, 256); for (int i=16; i < 256; i++) { @@ -64,16 +64,16 @@ color[i][1]=i; color[i][2]=i; } - + for (int i=0; i< 256; i++) buffer.setColor(i, qRgb(color[i][0], color[i][1], color[i][2])); - + buffer.fill( 0 ); - + updatetimer=new QTimer(this); connect( updatetimer, SIGNAL(timeout()), this, SLOT(update()) ); updatetimer->start(200,FALSE); - + setMouseTracking( TRUE ); } @@ -98,10 +98,10 @@ } void FrameBufferWidget::aboutQt() -{ +{ QMessageBox::aboutQt( this, "OpenBIOS" ); -} - +} + void FrameBufferWidget::quit() { extern volatile int gui_running; Modified: openbios-devel/arch/unix/gui_qt/gui-qt.h =================================================================== --- openbios-devel/arch/unix/gui_qt/gui-qt.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/gui_qt/gui-qt.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ /* tag: qt user interface fb class description - * + * * Copyright (C) 2003-2004 Stefan Reinauer * * See the file "COPYING" for further information about @@ -24,7 +24,7 @@ public: FrameBufferWidget(QWidget *parent=0, const char *name=0); unsigned char *getFrameBuffer(void); - + public slots: void quit(); void about(); Modified: openbios-devel/arch/unix/gui_qt/qt-main.cpp =================================================================== --- openbios-devel/arch/unix/gui_qt/qt-main.cpp 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/gui_qt/qt-main.cpp 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ /* tag: openbios qt user interface - * + * * Copyright (C) 2003-2004 Stefan Reinauer * * See the file "COPYING" for further information about @@ -28,19 +28,19 @@ void *gui_thread(void *ptr) { threaddata *td=(threaddata *)ptr; - + QApplication a(td->argc, td->argv); FrameBufferWidget w; a.setMainWidget(&w); w.show(); - + fb=w.getFrameBuffer(); gui_running=-1; a.exec(); gui_running=0; - + return 0; } @@ -56,11 +56,11 @@ printf("Initializing \"framebuffer\" plugin..."); #endif pthread_create(&mythread, NULL, gui_thread, &mytd); - while (!fb) + while (!fb) usleep(20); #if 0 - + /* now we have the framebuffer start address. * updating pci config space to reflect this */ @@ -80,14 +80,14 @@ *(u32 *)(pci_config_space+0x34)=0; #endif *(u32 *)(pci_config_space+0x30)=(u32)((unsigned long)qt_fcode&0xffffffff); - + /* FIXME: we need to put the fcode image for this * device to the rom resource, once it exists */ - + /* register pci device to be available to beginagain */ pci_register_device(0, 2, 0, pci_config_space); -#endif +#endif #ifdef DEBUG printf("done.\n"); #endif Modified: openbios-devel/arch/unix/plugins/plugin_pci/plugin_pci.c =================================================================== --- openbios-devel/arch/unix/plugins/plugin_pci/plugin_pci.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/plugins/plugin_pci/plugin_pci.c 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ /* tag: openbios pci plugin - * + * * Copyright (C) 2003 Stefan Reinauer * * See the file "COPYING" for further information about @@ -34,7 +34,7 @@ } /* - * IO functions. These manage all the magic of providing a PCI + * IO functions. These manage all the magic of providing a PCI * compatible interface to OpenBIOS' unix version of the kernel. */ Modified: openbios-devel/arch/unix/plugins/plugin_qt/pciconfig.h =================================================================== --- openbios-devel/arch/unix/plugins/plugin_qt/pciconfig.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/plugins/plugin_qt/pciconfig.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ /* tag: pci config space dump for qt plugin's pci device. - * + * * Copyright (C) 2003 Stefan Reinauer * * See the file "COPYING" for further information about Modified: openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.cpp =================================================================== --- openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.cpp 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.cpp 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ /* tag: qt plugin framebuffer class - * + * * Copyright (C) 2003 Stefan Reinauer * * See the file "COPYING" for further information about @@ -15,22 +15,22 @@ static const int sizey=480; static const int depth=8; -static unsigned char color[256][3]={ - { 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0xaa }, - { 0x00, 0xaa, 0x00 }, - { 0x00, 0xaa, 0xaa }, - { 0xaa, 0x00, 0x00 }, - { 0xaa, 0x00, 0xaa }, - { 0xaa, 0x55, 0x00 }, - { 0xaa, 0xaa, 0xaa }, - { 0x55, 0x55, 0x55 }, - { 0x55, 0x55, 0xff }, - { 0x55, 0xff, 0x55 }, - { 0x55, 0xff, 0xff }, - { 0xff, 0x55, 0x55 }, - { 0xff, 0x55, 0xff }, - { 0xff, 0xff, 0x55 }, +static unsigned char color[256][3]={ + { 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0xaa }, + { 0x00, 0xaa, 0x00 }, + { 0x00, 0xaa, 0xaa }, + { 0xaa, 0x00, 0x00 }, + { 0xaa, 0x00, 0xaa }, + { 0xaa, 0x55, 0x00 }, + { 0xaa, 0xaa, 0xaa }, + { 0x55, 0x55, 0x55 }, + { 0x55, 0x55, 0xff }, + { 0x55, 0xff, 0x55 }, + { 0x55, 0xff, 0xff }, + { 0xff, 0x55, 0x55 }, + { 0xff, 0x55, 0xff }, + { 0xff, 0xff, 0x55 }, { 0xff, 0xff, 0xff }, }; @@ -43,20 +43,20 @@ QPopupMenu *file = new QPopupMenu (this); file->insertItem( "E&xit", this, SLOT(quit()), CTRL+Key_Q ); - + QPopupMenu *help = new QPopupMenu( this ); help->insertItem("&About OpenBIOS", this, SLOT(about()), CTRL+Key_H ); help->insertItem( "About &Qt", this, SLOT(aboutQt()) ); - + menu = new QMenuBar( this ); Q_CHECK_PTR( menu ); menu->insertItem( "&File", file ); menu->insertSeparator(); menu->insertItem( "&Help", help ); menu->setSeparator( QMenuBar::InWindowsStyle ); - + setFixedSize(sizex,sizey+menu->heightForWidth(sizex)); - + buffer.create(sizex, sizey, depth, 256); for (int i=16; i < 256; i++) { @@ -64,16 +64,16 @@ color[i][1]=i; color[i][2]=i; } - + for (int i=0; i< 256; i++) buffer.setColor(i, qRgb(color[i][0], color[i][1], color[i][2])); - + buffer.fill( 0 ); - + updatetimer=new QTimer(this); connect( updatetimer, SIGNAL(timeout()), this, SLOT(update()) ); updatetimer->start(200,FALSE); - + setMouseTracking( TRUE ); } @@ -98,10 +98,10 @@ } void FrameBufferWidget::aboutQt() -{ +{ QMessageBox::aboutQt( this, "OpenBIOS" ); -} - +} + void FrameBufferWidget::quit() { extern volatile int gui_running; Modified: openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.h =================================================================== --- openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.h 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/plugins/plugin_qt/plugin_qt.h 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ /* tag: qt plugin framebuffer class description - * + * * Copyright (C) 2003 Stefan Reinauer * * See the file "COPYING" for further information about @@ -24,7 +24,7 @@ public: FrameBufferWidget(QWidget *parent=0, const char *name=0); unsigned char *getFrameBuffer(void); - + public slots: void quit(); void about(); Modified: openbios-devel/arch/unix/plugins/plugin_qt/qt_main.cpp =================================================================== --- openbios-devel/arch/unix/plugins/plugin_qt/qt_main.cpp 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/plugins/plugin_qt/qt_main.cpp 2008-12-11 20:30:53 UTC (rev 284) @@ -1,5 +1,5 @@ /* tag: openbios qt plugin skeleton - * + * * Copyright (C) 2003 Stefan Reinauer * * See the file "COPYING" for further information about @@ -30,19 +30,19 @@ void *gui_thread(void *ptr) { threaddata *td=(threaddata *)ptr; - + QApplication a(td->argc, td->argv); FrameBufferWidget w; a.setMainWidget(&w); w.show(); - + fb=w.getFrameBuffer(); gui_running=-1; a.exec(); gui_running=0; - + return 0; } @@ -58,7 +58,7 @@ printf("Initializing \"framebuffer\" plugin..."); #endif pthread_create(&mythread, NULL, gui_thread, &mytd); - while (!fb) + while (!fb) usleep(20); /* now we have the framebuffer start address. @@ -80,14 +80,14 @@ *(u32 *)(pci_config_space+0x34)=0; #endif *(u32 *)(pci_config_space+0x30)=(u32)((unsigned long)qt_fcode&0xffffffff); - + /* FIXME: we need to put the fcode image for this * device to the rom resource, once it exists */ - + /* register pci device to be available to beginagain */ pci_register_device(0, 2, 0, pci_config_space); - + #ifdef DEBUG printf("done.\n"); #endif Modified: openbios-devel/arch/unix/unix.c =================================================================== --- openbios-devel/arch/unix/unix.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/unix/unix.c 2008-12-11 20:30:53 UTC (rev 284) @@ -37,7 +37,7 @@ #define MEMORY_SIZE (4*1024*1024) /* 4M ram for hosted system */ #define DICTIONARY_SIZE (256*1024) /* 256k for the dictionary */ - + #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS==64) #define lseek lseek64 #define __LFS O_LARGEFILE @@ -155,7 +155,7 @@ if (ior) return ior->inb(reg); #endif - + printk("TRAP: io byte read @0x%x", reg); return 0xff; } @@ -302,7 +302,7 @@ exit(1); } -/* +/* * allocate memory and prepare engine for memory management. */ @@ -327,9 +327,9 @@ void exception(__attribute__((unused)) cell no) { - /* - * this is a noop since the dictionary has to take care - * itself of errors it generates outside of the bootstrap + /* + * this is a noop since the dictionary has to take care + * itself of errors it generates outside of the bootstrap */ } @@ -339,17 +339,17 @@ modules_init(); if(diskemu!=-1) blk_init(); - + device_end(); bind_func("platform-boot", boot); } -int +int read_from_disk( int channel, int unit, int blk, unsigned long mphys, int size ) { // channels and units not supported yet. unsigned char *buf=(unsigned char *)mphys; - + if(diskemu==-1) return -1; @@ -461,7 +461,7 @@ } memset(dict, 0, DICTIONARY_SIZE); - + if (!segfault) { if (verbose) printk("Installing SIGSEGV handler..."); @@ -536,7 +536,7 @@ printk( const char *fmt, ... ) { int i; - + va_list args; va_start( args, fmt ); i = vprintf(fmt, args ); Modified: openbios-devel/arch/x86/boot.c =================================================================== --- openbios-devel/arch/x86/boot.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/x86/boot.c 2008-12-11 20:30:53 UTC (rev 284) @@ -20,12 +20,12 @@ void boot(void); -struct sys_info sys_info; +struct sys_info sys_info; void boot(void) { char *path=pop_fstr_copy(), *param; - + if(!path) { printk("[x86] Booting default not supported.\n"); return; @@ -36,7 +36,7 @@ *param = '\0'; param++; } - + printk("[x86] Booting file '%s' with parameters '%s'\n",path, param); if (elf_load(&sys_info, path, param) != LOADER_NOT_SUPPORT) @@ -45,7 +45,7 @@ goto loaded; if (forth_load(&sys_info, path, param) != LOADER_NOT_SUPPORT) goto loaded; - + printk("Unsupported image format\n"); loaded: Modified: openbios-devel/arch/x86/console.c =================================================================== --- openbios-devel/arch/x86/console.c 2008-12-11 17:10:03 UTC (rev 283) +++ openbios-devel/arch/x86/console.c 2008-12-11 20:30:53 UTC (rev 284) @@ -200,7 +200,7 @@ static void video_putchar(int c) { int p=1; - + if (c == '\n' || c == '\r') { video_newline(); return; @@ -228,7 +228,7 @@ static void video_cls(void) { int i; - + for (i = 0; i < 2 * COLUMNS