100 Commits
Author SHA1 Message Date
Alex Smith 8c7c8ec49f Update x86_64 bison package to 2.6.5
The previous package was broken (would often segfault, prevented
building Haiku cross-tools under x86_64), so update to the latest
version in HaikuPorts.

Signed-off-by: Alex Smith <[email protected]>
2014-09-18 15:14:16 +01:00
Alex Smith 6762f5f678 HaikuDepot: Fix x86_64 build failure
Fix the following errors:

  PackageInfo.cpp:85:23: error: comparison between signed and unsigned integer expressions
  PackageInfo.cpp:93:21: error: comparison between signed and unsigned integer expressions

Signed-off-by: Alex Smith <[email protected]>
2014-09-14 09:27:54 +01:00
Alex Smith b8130cf32d Removed Haiku64Image, it's not used any more. 2013-07-27 16:40:10 +01:00
Alex Smith 271b27d5a3 x86_64: Set vector in iframe/debug state to 99 for syscalls.
Although syscalls are done through SYSCALL and therefore don't actually
have an interrupt number, set it to 99 (the syscall vector on 32-bit)
in the iframe so that a syscall frame can be identified. Also added
vector/error_code to x86_64_debug_cpu_state for Debugger to use, not
sure why I didn't put them there in the first place.
2013-07-25 20:04:25 +01:00
Alex Smith d1a2f6371a sysinfo: Fixed incorrect memory stats on PAE systems.
Memory statistics were calculated as 32-bit values, so they were incorrect
on machines with more than 4GB RAM (and on x86_64).
2013-07-10 14:02:05 +01:00
Alex Smith e818b9707c Call debug_cleanup() before converting kernel_args to 64-bit addresses, fixes #9842.
In debug_cleanup(), if the debug syslog buffer is disabled (the default when
KDEBUG_LEVEL is 0), then a new buffer is allocated with kernel_args_malloc().
This is done after kernel_args addresses have been converted to 64-bit, so
the address the kernel gets will be 32-bit, resulting in the page fault seen
in #9842. Fixed by moving the call to debug_cleanup() to before
convert_kernel_args().
2013-07-04 13:01:07 +01:00
Alex Smith 1152f6eca6 HaikuImage: Build more network drivers for x86_64. 2013-05-11 13:08:35 +01:00
Alex Smith e6a0c79790 CID 608055: Fixed unintended sign extension. 2013-03-22 19:41:57 +00:00
Alex Smith 5e0c3db286 Account for the physical map area in the kernel VM space. Fixes #9547.
The physical memory map area was not included in the kernel virtual
address space range (it was below KERNEL_BASE). This caused problems
if an I/O operation took place on physical memory mapped there (the
bad address error seen in #9547 was occurring in lock_memory_etc()).
Changed KERNEL_BASE and KERNEL_SIZE to cover the area and add a null
area that covers all of it. Also changed X86VMTranslationMap64Bit to
handle large pages in Query(), as the physical map area uses large
pages.
2013-03-22 18:30:01 +00:00
Alex Smith 8627383bf7 Fixed compilation errors with ENABLE_TRACING set. 2013-03-22 16:46:09 +00:00
Alex Smith 1aef6664d1 Fixed compilation of VFS/IORequest trace messages. 2013-03-22 14:14:33 +00:00
Alex Smith 27aafb14d7 CID 712421: Missed some other occurrences, fixed them as well. 2013-03-22 11:45:13 +00:00
Alex Smith ee8f0ab0dc CID 712421: Fix unintended sign extension. 2013-03-22 11:38:50 +00:00
Alex Smith 7f562d441c Added xz-utils for x86_64 and updated to 5.0.4 (from scottmc). 2013-02-21 20:58:50 +00:00
Alex Smith 622506c485 Added OpenSSH and Git optional packages for x86_64.
This commit is the first done from Haiku x86_64! Uncovered a few
networking bugs so hopefully this'll push OK... :)
2012-12-29 12:44:20 +00:00
Alex Smith 85a609cf7c More x86_64 optional packages from scottmc. 2012-12-22 18:43:25 +00:00
Alex Smith 9a538a294c A few x86_64 debugger fixes + style fixes. 2012-12-20 19:24:04 +00:00
Alex Smith 6c6fcaf95b Some build fixes for DEBUG=1. 2012-12-20 19:22:16 +00:00
Alex Smith e7bcffbb59 Take target address size into account in MemoryView, fixes #9307. 2012-12-20 19:20:31 +00:00
Alex Smith c8d82cf6db Started adding x86_64 support to Debugger.
Stack tracing doesn't work yet, nor does single stepping (somehow
manages to completely freeze the system).
2012-12-19 19:54:20 +00:00
Alex Smith 6e5f42ccc9 Added OpenSSL for x86_64. 2012-12-18 14:47:02 +00:00
Alex Smith fbcad4e5e5 Added some more x86_64 optional packages from scottmc. 2012-12-14 17:20:03 +00:00
Alex Smith abe053eb03 Added missing libbsd.so and a bunch of optional packages for x86_64 from scottmc. 2012-12-08 12:49:15 +00:00
Alex Smith dda60bf93a Added ftp to x86_64 image. 2012-12-07 11:12:14 +00:00
Alex Smith 133a094f80 Added Python optional package for x86_64. 2012-11-28 21:32:32 +00:00
Alex Smith afd0470932 Disable DEBUG in x86emu Jamfile rather than in x86emui.h. 2012-11-26 15:17:47 +00:00
Alex Smith b0f9ebaca5 Don't compile in x86emu debug code for builds with DEBUG set. 2012-11-18 22:51:54 +00:00
Alex Smith ba68dfba87 Fixed 64-bit pointer truncation in FreeBSD driver compat layer, fixes #9187. 2012-11-18 21:16:37 +00:00
Alex Smith 30afb18c8f Merge branch 'x86_64' 2012-11-18 19:45:44 +00:00
Alex Smith 5196d5dad0 Merge branch 'master' into x86_64
Conflicts:
	build/jam/HaikuImage
	src/add-ons/kernel/generic/Jamfile
2012-11-18 19:18:00 +00:00
Alex Smith 5f4df83cbd Fixed ARM build. 2012-11-18 19:09:35 +00:00
Alex Smith 5ccc0cb224 Merge branch 'master' into x86_64 2012-11-18 16:42:27 +00:00
Alex Smith 2913b1dbd2 Compilation fixes for x86_64. 2012-11-18 15:48:47 +00:00
Alex Smith 11c9f9a1d6 Merge branch 'master' into x86_64
Conflicts:
	build/jam/FloppyBootImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	headers/private/shared/cpu_type.h
	src/bin/ps.c
	src/bin/sysinfo.cpp
	src/kits/tracker/PoseView.cpp
	src/preferences/appearance/DecorSettingsView.cpp
	src/preferences/virtualmemory/Settings.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/input/InputServer.cpp
	src/servers/input/InputServerMethod.cpp
	src/system/boot/Jamfile
	src/system/boot/platform/raspberrypi_arm/mmu.cpp
	src/system/boot/platform/u-boot/arch/arm/Jamfile
	src/system/kernel/arch/x86/arch_cpu.cpp
	src/system/kernel/arch/x86/arch_thread.cpp
	src/system/kernel/cache/block_cache.cpp
	src/system/kernel/vm/VMAnonymousCache.cpp
2012-11-18 14:02:07 +00:00
Alex Smith c88f4908d8 Added missing AHCI driver in FloppyBootImage, should fix #8943. 2012-09-08 09:33:13 +01:00
Alex Smith ceb29f6dac Add ProcessController, NetworkStatus and StyledEdit to image. 2012-08-30 16:19:06 +01:00
Alex Smith 4591ebc99a Fixes for building Haiku x86_64 from itself. 2012-08-18 19:57:46 +01:00
Alex Smith aecb9567e3 Rebuilt flex package for x86_64.
The original package was cross-compiled to Haiku, turns out flex's
build system uses paths to stuff from the host system, so the package
was broken. Rebuilt from Haiku.
2012-08-18 19:07:25 +01:00
Alex Smith d2a1be1c4e Cleaner separation of 32-/64-bit specific CPU/interrupt code.
Renamed {32,64}/int.cpp to {32,64}/descriptors.cpp, which now contain
functions for GDT and TSS setup that were previously in arch_cpu.cpp,
as well as the IDT setup code. These get called from the init functions
in arch_cpu.cpp, rather than having a bunch of ifdef'd chunks of code
for 32/64.
2012-08-18 17:43:40 +01:00
Alex Smith dcd705cded CID 715610: Operands don't affect result.
Comparing a uint32 against ~0UL would always be false on 64-bit.
2012-08-18 14:06:11 +01:00
Alex Smith 423d8dfed3 CID 714424: Operands don't affect result.
Storing size_t result of std::string::find_first_of in a uint32 then
checking against std::string::npos would never be true.
2012-08-18 14:02:58 +01:00
Alex Smith f16cf073d5 CID 714526: Operands don't affect result.
Incorrect check of in_addr_t (uint32_t) against (unsigned long)-1
would never be true.
2012-08-18 13:58:21 +01:00
Alex Smith d339b8398c CID 712424: Unintended sign extension.
Fix taken from glibc, glibc bug #3747.
2012-08-18 13:52:10 +01:00
Alex Smith 3ab9de3b68 CID 714425: Operands don't affect result.
Result of a call to strtoul was stored in a uint32, then checked
against ULONG_MAX for error. If long is 64 bits, the error check
will never be true.
2012-08-18 13:39:37 +01:00
Alex Smith f3780ae8b2 CID 715700, 715701: Fixed assumption of 4 byte pointer size. 2012-08-18 12:24:09 +01:00
Alex Smith 6314232f45 Added VirtualMemory preferences to image. 2012-08-18 12:12:36 +01:00
Alex Smith 3c230971db 64-bit fixes for sis900 network driver. 2012-08-18 11:51:17 +01:00
Alex Smith be2f57f0de 64-bit fixes for wb840 network driver. 2012-08-18 11:47:03 +01:00
Alex Smith 660e7dd1c4 CID 714542: Unintentional sign extension to 64 bits.
Fixed by changing type of val from u_long to u_int32_t. val only gets
passed to htonl which takes a uint32_t, so no need for it to be u_long.
2012-08-18 11:28:59 +01:00
Alex Smith 79a1c3c6b8 Another missed printf string (CID 715659). 2012-08-18 10:50:11 +01:00
Alex Smith 816aded4c1 Added Installer and DriveSetup to image. 2012-08-18 10:36:00 +01:00
Alex Smith 7e5b39b672 Fix printf format warnings that were missed earlier (CIDs 715645-715657). 2012-08-18 10:27:52 +01:00
Alex Smith 173342c0ab Change the heap reservation for 64-bit platforms.
Hoard reserves a chunk of the address space to grow the heap into.
As there is a much larger address space available on 64-bit systems,
we may as well reserve a larger chunk of address space (64GB for now,
though could probably reserve a lot more than that and still leave
plenty of room for other areas).
2012-08-17 15:34:11 +01:00
Alex Smith 9f629ef38e Rename KERNEL_LOAD_BASE_64BIT to KERNEL_LOAD_BASE_64_BIT for consistency. 2012-08-17 15:16:25 +01:00
Alex Smith e993391e9c Fixed crypt() for 64-bit systems. 2012-08-17 13:37:05 +01:00
Alex Smith 3bf3aa2e2c Added the rest of the basic development packages.
Added autoconf, automake, libtool, texinfo, perl, gettext and nano.
Building an image with the nightly targets should give you an image
with these included.
2012-08-17 13:03:31 +01:00
Alex Smith 55e16d9d43 Added OHCI to image (thanks mmlr), RTF-Translator -> RTFTranslator. 2012-08-16 21:24:48 +01:00
Alex Smith e688bf23d4 Merge branch 'master' into x86_64
Conflicts:
	src/servers/app/ServerWindow.cpp
2012-08-16 21:11:15 +01:00
Alex Smith 602d9c96a5 Added some of the development optional packages.
This adds some of the development packages for x86_64. All of the
DevelopmentBase packages (gcc, make, jam, bison, flex, m4, mkdepend)
have been built and uploaded.
2012-08-16 20:32:29 +01:00
Alex Smith aaeadfcb02 Do a separate libgcc build for the kernel as well.
Turns out that libgcc is needed, for some reason building the kernel
with -O0 does not end up referencing libgcc but -O2 does. A separate
build of it is done with -mno-red-zone, same reason as for libsupc++.
Ended up being easy to rebuild with different CFLAGS: previously I'd
tried doing `CFLAGS="-mno-red-zone" make` in the libgcc dir which
didn't override, the correct way is `make CFLAGS="-mno-red-zone"`
2012-08-16 17:38:01 +01:00
Alex Smith 1eaa9e63cd Compilation fix for malloc_debug. 2012-08-16 14:23:43 +01:00
Alex Smith c864ba1a2d Build a separate libsupc++ for the kernel with correct flags.
Kernel mode code on x86_64 needs to be built with -mno-red-zone as
interrupts would corrupt the red zone if it were in use. However, the
kernel is linked with libsupc++, which was not compiled with
-mno-red-zone. If an interrupt occurred in libsupc++ code the red zone
would get corrupted. This was causing random panics, particularly under
heavy system load. Therefore, on x86_64 a separate build of libsupc++
with -mno-red-zone is now done for the kernel to use. Note: this commit
will require a rerun of configure and rebuild of cross tools.
2012-08-16 13:57:04 +01:00
Alex Smith 294818c5fd More x86_64 printf() fixes from glibc. 2012-08-15 15:40:32 +01:00
Alex Smith 91899cd48d Fix from glibc for possible crash when printf()'ing a long double. 2012-08-14 20:08:42 +01:00
Alex Smith 4efc3430a0 Fixed possible NULL dereference in vm_page_fault.
This bug was introduced by changing IS_USER_ADDRESS to check against
USER_BASE AND USER_TOP rather than just !IS_KERNEL_ADDRESS. Faults
on addresses outside both the user and kernel address spaces (i.e. the
gap between user and kernel) would result in addressSpace being NULL,
but addressSpace was being used without checking for NULL at one point.
2012-08-14 17:46:09 +01:00
Alex Smith a53cfbf491 Jump to the fault handler for GPFs in the debugger.
If an uncanonical address is accessed a general protection fault will
be raised. When in the debugger, uncanonical address faults should be
handled by the fault handler (if any).
2012-08-14 16:03:33 +01:00
Alex Smith b067b2878b Fix expr from coreutils on x86_64.
The coreutils sources get built against the regex.h included with
coreutils, but linked against the regex implementation in libroot. Some
of the types used by coreutils' regex implementation differ from those
in libroot's on 64-bit platforms meaning they are incompatible. Fixed by
building coreutils' own regex implementation rather than linking to
libroot's (GCC 2 still uses libroot though, coreutils' implementation
doesn't build with GCC 2).
2012-08-14 11:08:21 +01:00
Alex Smith 15ed6a1e56 CID 609387: Uninitialized pointer access.
Fixes a crash I just ran into on x86_64, only appeared when I built
with optimization disabled.
2012-08-12 12:40:18 +01:00
Alex Smith efffcb292f Better fix for picture data type mismatch.
Should use a fixed-size type (int32) rather than a platform-dependent
one.
2012-08-11 13:26:59 +01:00
Alex Smith e1c748e4c0 Revert "Fixed type mismatch in picture data."
This reverts commit 81aad168f8.
2012-08-11 13:23:22 +01:00
Alex Smith d384cac443 Support ELF64 in set_haiku_revision. 2012-08-11 09:17:15 +01:00
Alex Smith 8098ef47db Added Network preferences. 2012-08-10 16:55:53 +01:00
Alex Smith ac4525b2a5 Changed BRegion to use int32 instead of long.
There is no need for fCount and fDataSize to be long, not going to have
more than 2^32 rectangles in a region. Thanks Axel for pointing that
out.
2012-08-10 16:22:51 +01:00
Alex Smith 6d796a84bd Fixed up network stack and drivers for x86_64.
* Various compilation fixes.
* Fixes to the FreeBSD compatibility layer (from comparing the x86-
  specific bits with the equivalent amd64 sources in FreeBSD).
* Compile all the Ethernet drivers except for sis900 and wb840, these
  require a bit more work to fix (will file a ticket soon). Tested
  ipro1000 and rtl81xx, no issues.
2012-08-10 14:30:54 +01:00
Alex Smith 2b861dd2a5 Added translator add-ons. 2012-08-10 11:35:24 +01:00
Alex Smith 81aad168f8 Fixed type mismatch in picture data.
The size of an operation block was written as size_t by PictureDataWriter
but read as int32 by PicturePlayer. Fixes an app_server crash.
2012-08-10 10:34:28 +01:00
Alex Smith 5084d0d451 Added more things to x86_64 image.
Some preference apps, mount_server and AboutSystem. Removed the check
for x86_64 in the boot script, the normal path through the script will
work now. Also removed a temporary hack to workaround AboutSystem not
being there in build_haiku_image.
2012-08-10 09:32:54 +01:00
Alex Smith e963289800 Added Tracker and Deskbar to x86_64 build. 2012-08-09 19:36:52 +01:00
Alex Smith 4b8a51c34c Fixed incorrect sizeof in LinkReceiver::ReadRegion.
The type of BRegion::fCount is long, and ServerLink sends/receives it
with sizeof(long), but LinkReceiver was using sizeof(int32). Due to
long being 64 bit this was resulting in a mismatch. This fixes the
drawing problems on x86_64.
2012-08-09 18:10:49 +01:00
Alex Smith c0166cf22a Should check for ELF_CLASS, not ELFCLASS32. 2012-08-09 14:06:29 +01:00
Alex Smith fa6327c9f4 Compile remaining x86 bits for x86_64.
The IOAPIC and IRQ routing code now gets compiled for x86_64, though
they won't be used yet as there is no ACPI support currently.
2012-08-09 13:18:53 +01:00
Alex Smith f3e4f18be7 Debugging fixes.
* INT3 had the wrong DPL set in the IDT, could not be raised from
  userland.
* Need the debug server running.
2012-08-09 09:17:04 +01:00
Alex Smith a5e96a301e Merge branch 'master' into x86_64 2012-08-09 08:24:50 +01:00
Alex Smith a3802ca967 x86_64 support for GDB.
As mentioned in one of the previous commits, breakpoints don't work
properly yet, and I haven't done much extensive testing yet, but the
basic functionality works.
2012-08-07 20:24:55 +01:00
Alex Smith a731ad19e6 ELF64 and x86_64 support in the debug kit. 2012-08-07 20:22:36 +01:00
Alex Smith 8a1903353e Implemented user debugging support for x86_64.
Reused x86 arch_user_debugger.cpp, with a few minor changes to make
the code work for both 32 and 64 bit. Something isn't quite working
right, if a breakpoint is hit the kernel will hang. Other than that
everything appears to work correctly.
2012-08-07 20:20:42 +01:00
Alex Smith 2b883e1977 Fix compilation of OHCI on x86.
Fixes were needed to go with the USB stack changes. Haven't tested it
yet because I don't have a a machine with OHCI, but I doubt there
will be any problems.
2012-08-06 17:25:51 +01:00
Alex Smith c802257bbb Merge branch 'master' into x86_64 2012-08-06 12:34:03 +01:00
Alex Smith 2997a19125 Fixed UHCI for x86_64. 2012-08-06 12:29:12 +01:00
Alex Smith abfb41a2ab Added USB modules to image. 2012-08-06 09:47:12 +01:00
Alex Smith cc30eec43d System call restart support. 2012-08-05 14:20:37 +01:00
Alex Smith e1be7d07d6 Fixed a 64-bit calculation error. 2012-08-05 12:59:46 +01:00
Alex Smith 284d75bd6a Merge branch 'master' into x86_64 2012-08-05 10:33:20 +01:00
Alex Smith adf8818ec0 Compilation fixes for Terminal, add to image.
It runs, but has shown up various bugs: app_server crashes, kernel
panics, rendering problems. Working on fixing these now.
2012-08-05 10:24:22 +01:00
Alex Smith e5363c936a Style fix. 2012-08-05 10:16:11 +01:00
Alex Smith 3fed1a15f5 Get app_server working on x86_64.
With this commit, app_server now compiles and runs at boot! Nothing
particularly interesting happens, just the blue background and a mouse
pointer. Remote backends are broken and not compiled in, see #8834.
Note that it won't be possible to build this quite yet, need to get
the FreeType package uploaded.
2012-08-05 08:46:30 +01:00
Alex Smith f429464535 User symbol lookup works now on x86_64. 2012-08-05 08:12:39 +01:00
Alex Smith 049d149cf7 Handle 64-bit types correctly. 2012-08-04 18:58:26 +01:00
Alex Smith 57ab0395ad 64-bit fixes for input_server. 2012-08-04 16:10:00 +01:00
Alex Smith 25871c6895 Removed Thread::fault_callback, no longer necessary now that vm86 is gone. 2012-08-04 11:02:54 +01:00