Author: blueswirl Date: 2009-01-06 19:09:22 +0100 (Tue, 06 Jan 2009) New Revision: 358
Modified: openbios-devel/config/examples/amd64_config.xml openbios-devel/config/examples/amd64_rules.xml openbios-devel/fs/hfsplus/btree.c openbios-devel/include/amd64/io.h Log: Fix amd64 build
Modified: openbios-devel/config/examples/amd64_config.xml =================================================================== --- openbios-devel/config/examples/amd64_config.xml 2009-01-06 17:18:46 UTC (rev 357) +++ openbios-devel/config/examples/amd64_config.xml 2009-01-06 18:09:22 UTC (rev 358) @@ -33,8 +33,9 @@ <!-- Module Configuration --> <option name="CONFIG_CMDLINE" type="boolean" value="true"/> <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/> + <option name="CONFIG_FONT_8X8" type="boolean" value="true"/> + <option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
- <!-- Filesystem Configuration --> <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/> <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
Modified: openbios-devel/config/examples/amd64_rules.xml =================================================================== --- openbios-devel/config/examples/amd64_rules.xml 2009-01-06 17:18:46 UTC (rev 357) +++ openbios-devel/config/examples/amd64_rules.xml 2009-01-06 18:09:22 UTC (rev 358) @@ -9,17 +9,19 @@ ARCH := amd64 ODIR := obj-$(ARCH) HOSTCC := gcc -HOSTCFLAGS := -O -g -fprofile-arcs -ftest-coverage -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) +HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
CC := gcc +AS := as AR := ar +LD := ld NM := nm STRIP := strip RANLIB := ranlib INSTALL := install
-CFLAGS := -Os -Wall -W -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2 +CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
# @@ -30,15 +32,20 @@
VERSION := "1.0RC1"
-versions: $(ODIR)/forth/version.fs +versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
$(ODIR)/forth/version.fs: - @test -d $(dir $@) || $(INSTALL) -d $(dir $@) @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 `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)"" ; ) \ + > $(dir $@)/openbios-version.h ]]></pre>
<!-- host compiler build rules -->
Modified: openbios-devel/fs/hfsplus/btree.c =================================================================== --- openbios-devel/fs/hfsplus/btree.c 2009-01-06 17:18:46 UTC (rev 357) +++ openbios-devel/fs/hfsplus/btree.c 2009-01-06 18:09:22 UTC (rev 358) @@ -293,7 +293,7 @@
// now we have the offset and can read the key ... #ifdef CONFIG_LITTLE_ENDIAN - return buf->node + bswap_16(*offset); + return buf->node + bswabU16(*offset); #else return buf->node + *offset; #endif
Modified: openbios-devel/include/amd64/io.h =================================================================== --- openbios-devel/include/amd64/io.h 2009-01-06 17:18:46 UTC (rev 357) +++ openbios-devel/include/amd64/io.h 2009-01-06 18:09:22 UTC (rev 358) @@ -6,6 +6,8 @@ #define phys_to_virt(phys) ((void *) ((unsigned long) (phys) - virt_offset)) #define virt_to_phys(virt) ((unsigned long) (virt) + virt_offset)
+#ifndef BOOTSTRAP + #define __SLOW_DOWN_IO "outb %%al,$0x80;" static inline void slow_down_io(void) { @@ -46,4 +48,23 @@ BUILDIO(w,w,short) BUILDIO(l,,int)
+#else /* BOOTSTRAP */ +#ifdef FCOMPILER +#define inb(reg) ((u8)0xff) +#define inw(reg) ((u16)0xffff) +#define inl(reg) ((u32)0xffffffff) +#define outb(reg, val) do{} while(0) +#define outw(reg, val) do{} while(0) +#define outl(reg, val) do{} while(0) +#else +extern u8 inb(u32 reg); +extern u16 inw(u32 reg); +extern u32 inl(u32 reg); +extern void insw(u32 reg, void *addr, unsigned long count); +extern void outb(u32 reg, u8 val); +extern void outw(u32 reg, u16 val); +extern void outl(u32 reg, u32 val); +extern void outsw(u32 reg, const void *addr, unsigned long count); #endif +#endif +#endif