Commit Graph
100 Commits
Author SHA1 Message Date
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
Alex Smith 70ee5a7efb Moved x86emu to {src,headers}/libs/. 2012-08-04 10:21:22 +01:00
Alex Smith 92f09f1aeb Added AHCI driver to image. 2012-08-04 10:14:22 +01:00
Alex Smith 54393c0379 Merge branch 'master' into x86_64 2012-08-04 09:59:17 +01:00
Alex Smith e9e70c0f95 Fixed compilation of remote_disk_server on OS X hosts. 2012-08-03 17:48:02 +01:00
Alex Smith 9bfe064799 GCC 2 compilation fix for x86emu. 2012-08-03 17:12:53 +01:00
Alex Smith 74bda98cb2 Killed off vm86 code, no longer being used. 2012-08-03 16:49:15 +01:00
Alex Smith 9f90e8a964 Updated drivers to use BIOS module instead of vm86. 2012-08-03 16:28:20 +01:00
Alex Smith b28f734b1c Remove line copied from old vm86 code that shouldn't be there. 2012-08-03 16:18:49 +01:00
Alex Smith a9ee7a5132 Added new BIOS module for calling BIOS interrupts.
This module provides an interface for drivers to use to perform calls
to the BIOS (only really for use by graphics drivers which need to use
the VESA BIOS). It uses the x86emu library from X.org which emulates
a real mode x86 CPU. This is necessary for x86_64 as virtual 8086 mode
no longer exists there.
2012-08-03 15:42:30 +01:00
Alex Smith 50cedfd5b0 Build registrar for x86_64. 2012-08-02 10:45:42 +01:00
Alex Smith d93ed09564 Improved safety for user memory accesses.
* Changed IS_USER_ADDRESS to check an address using USER_BASE and
  USER_SIZE, rather than just !IS_KERNEL_ADDRESS. The old check would
  allow user buffers to point into the physical memory map area.
* Added an unmapped hole at the end of the bottom half of the address
  space which catches buffers that cross into the uncanonical address
  region. This also removes the need to check for uncanonical return
  addresses in the syscall handler, it is no longer possible for the
  return address to be uncanonical under normal circumstances. All
  cases in which the return address might be changed by the kernel
  are still handled via the IRET path.
2012-08-02 09:32:33 +01:00
Alex Smith b77772725c Changed x86_64 toolchain target to x86_64-unknown-haiku. 2012-08-01 11:46:44 +01:00
Alex Smith 9a5503d01c Different uname machine type for x86_64.
* Added B_64_BIT_PC_PLATFORM platform type.
* Return "x86_64" as the machine type for that platform in uname.
2012-08-01 11:13:14 +01:00
Alex Smith 8110732b03 Added some more binaries to the image. 2012-08-01 11:00:35 +01:00
Alex Smith e6b3188fcb Merge branch 'master' into x86_64 2012-08-01 10:44:38 +01:00
Alex Smith f7010474bb Changed resource alignment behaviour for ELF64 binaries.
The current behaviour of aligning to the maximum value of p_align seen
is problematic for x86_64, as the default segment alignment is 2MB.
This causes all x86_64 binaries to be padded to at least 2MB when
resources are added to them. There is no need to align to p_align in
the file itself (it's only an in-memory requirement), therefore
instead just align up to an 8-byte boundary. The current behaviour is
retained for ELF32, so this won't cause any compatibility problems
(there are no existing ELF64 BeOS/Haiku binaries to worry about).
2012-08-01 10:35:34 +01:00
Alex Smith bd97ee39e0 Style fix. 2012-07-31 12:15:26 +01:00
Alex Smith d4ec857af3 Merge branch 'master' into x86_64 2012-07-31 12:10:24 +01:00
Alex Smith caa1e8b742 Fix CID 712419, 712420, 712421, 712422: Unintentional sign extension to 64 bits. 2012-07-31 12:08:45 +01:00
Alex Smith 3cd66dda5e Fix CID 712419, 712420, 712421, 712422: Unintentional sign extension to 64 bits. 2012-07-31 10:12:33 +01:00
Alex Smith 02dd3236d2 Better names for syscall/signal functions copied to the commpage. 2012-07-30 21:56:50 +01:00
Alex Smith 666b46e2e3 Added libbe, ICU and consoled to the image.
The boot script now launches consoled instead if app_server does not
exist, so there is now an interactive Bash prompt! libbe requires ICU,
which is an optional package, so I've built the packages and they've
been uploaded to haiku-files.org (thanks umccullough).
2012-07-30 21:42:49 +01:00
Alex Smith a1a38e8aba Retry a few times if opening keyboard fails in consoled.
I'm using consoled at the moment without input_server having been run,
so when it starts the input drivers will not have been loaded. Have to
retry a few times with delays so that the input devices have a chance
to appear.
2012-07-30 21:38:47 +01:00
Alex Smith 533f3bb494 Support x86_64 in sysinfo.
Just changed all #ifdef __INTEL__ to __INTEL__ || __x86_64__, and
fixed all the printf format strings. The CPU detection code all
works the same.
2012-07-30 21:34:05 +01:00
Alex Smith 9be774b553 Compilation and 64-bit fixes to libbe.so sources.
Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.
2012-07-30 21:27:21 +01:00
Alex Smith ef67788fba Ported ISA bus manager and PS/2 driver. 2012-07-30 14:37:28 +01:00
Alex Smith c0d28c0199 Implemented signals for x86_64. 2012-07-30 13:52:51 +01:00
Alex Smith 5568c5055c Added coreutils to the x86_64 image. 2012-07-30 08:59:19 +01:00
Alex Smith bd16f0dd82 Fixed configure for legacy buildtools.
The elfedit tool doesn't exist with the old binutils, so configure was
failing when it tried to get the path to it. Only try to search for it
if building GCC 4.
2012-07-30 08:25:16 +01:00
Alex Smith e27109c167 Merge branch 'master' into x86_64 2012-07-30 08:24:31 +01:00
Alex Smith e715eca04c Worked around broken GCC 2 on OS X hosts.
GCC 2 built for OS X 10.7/10.8 was broken, the Haiku build would fail
with some strange errors. Forcing compilation of GCC 2 in 32-bit mode
results in a working GCC.
2012-07-29 21:03:14 +01:00
Alex Smith afde37ff9b Prevent allocating address 0 when inserting an area with B_ANY_ADDRESS.
The USER_BASE_ANY definition exists to specify where to start searching
for B_ANY_ADDRESS allocations, but this was not being used correctly.
On x86_64, this was causing the runtime loader's heap to be allocated
at address 0 so NULL pointer accesses were not getting caught.
2012-07-29 14:31:11 +01:00
Alex Smith 03add8e7c2 Implemented TLS for x86_64. 2012-07-29 11:39:01 +01:00
Alex Smith 6e2f6d1ace Changed cookie type for get_next_area_info() to ssize_t.
The cookie is used to store the base address of the area that was just
visited. On 64-bit systems, int32 is not sufficient. Therefore, changed
to ssize_t which retains compatibility on x86 while expanding to a
sufficient size on x86_64.
2012-07-29 09:31:14 +01:00