* Added a FixedWidthPointer template class which uses 64-bit storage to hold
a pointer. This is used in place of raw pointers in kernel_args.
* Added __attribute__((packed)) to kernel_args and all structures contained
within it. This is necessary due to different alignment behaviour for
32-bit and 64-bit compilation with GCC.
* With these changes, kernel_args will now come out the same size for both
the x86_64 kernel and the loader, excluding the preloaded_image structure
which has not yet been changed.
* Tested both an x86 GCC2 and GCC4 build, no problems caused by these changes.
I've tested this change on x86, causing no issues. I've checked over the code
for all other platforms and made the necessary changes and to the best of my
knowledge they should also still work, but I haven't actually built and
tested them. Once I've completed the kernel_args changes the other platforms
will need testing.
Pointers in kernel_args are going to be changed to unconditionally use 64-bit
storage (to make kernel_args compatible with both the x86 and x86_64 kernels).
KMessage stores a pointer to its buffer, however since KMessage is used
outside of the boot code it is undesirable to change it to use 64-bit storage
for the pointer as it may add additional overhead on 32-bit builds. Therefore,
only store the buffer address and size and then construct a KMessage from
those in the kernel.
* set_haiku_revision doesn't currently support ELF64, don't use a
revisioned kernel image on x86_64 for now.
* Don't try to build add-ons for x86_64 yet.
As the downloadable files are now hosted on haiku-files.org and the user is
presented the Intel license at the beginning of the script, the function
OpenIntelFirmwareWebpage is unneeded.
* SizeSlider::MaxPartitionSize() also now returns the size instead of the end
offset.
* Renamed CreateParamsPanel::_UpdateTextControl() to _UpdateSizeTextControl().
* Removed code duplication, and instead just call _UpdateSizeTextControl()
twice.
* Minor other cleanup.
- Automatic whitespace cleanup.
- Remove no longer exposed show/hide time setting. The methodology for
saving it on exit was broken anyways, since it relied on the current
show/hide state of the time view, which would be hidden if the deskbar
was currently in Autohide mode.
The whole kernel now builds and there are no undefined references when
linking, I just need to fix some strange relocation errors I'm getting
(probably a problem with the linker script) and then I'll have a kernel
image.
The red zone is a 128-byte area below the stack pointer specified by the
AMD64 ABI that can be used by leaf functions for their stack frame without
modifying the stack pointer. It is guaranteed not to be modified by signal
handlers. This cannot be used in kernel mode code, as an interrupt handler
could overwrite it, so stop GCC from generating code that uses it.
Since ICI arguments are used to send addresses in some places, uint32 is
not sufficient on x86_64. addr_t still refers to the same type as uint32
(unsigned long) on other platforms, so this change only really affects
x86_64.
* Most of this is incorrect printf format strings. Changed all strings
causing errors to use the B_PRI* format string definitions, which
means the strings should be correct across all platforms.
* Some other fixes for errors, casts required, etc.
* Based on the x86 one, changes made to match the default GCC x86_64 linker
script and correct kernel load address added.
* Not tested yet as the kernel doesn't fully compile.
* Since ahci devices are emulated as scsi, we use
the SAS style TRIM call (unmap in scsi write same)
* This prevents the need for special, one off trim
calls.
* We don't perform the TRIM just yet, just laying
the goundwork for the request.