Commit Graph
100 Commits
Author SHA1 Message Date
Jessica Hamilton 51429f0417 kernel/efi: Drop device_set_path_end. Fixes booting Haiku with EFI under qemu
Change-Id: Iafa6cf064675d5f2beb134a6c6a906d137c70dc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2040
Reviewed-by: Alex von Gluck IV <[email protected]>
2019-12-22 10:59:34 +00:00
Jessica Hamilton 19017f3f47 Initial version of lgtm.com configuration file.
* Ideally, should download a pre-built cross-compiler, but it
  finishes within the allowed run-time for now.
2019-09-19 04:03:09 +00:00
Jessica Hamilton d7818b5aae sys/types: include endian.h, and fix endian definitions.
* Defining LITTLE/BIG_ENDIAN as 0 breaks some feature test macros,
  particularly in autoconf. Checking with FreeBSD, their macros
  define a non-zero value as well.

References:
- https://github.com/freebsd/freebsd/blob/master/sys/x86/include/endian.h
- http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/c.m4#n1584
Change-Id: I61b0bbad74e2bf5248464a5c15e504b9f45bea7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1526
Reviewed-by: Adrien Destugues <[email protected]>
2019-08-27 10:02:45 +00:00
Jessica Hamilton 785877e9c0 loader: remove unused function.
No longer required due to bab060e.

Change-Id: I5d931ecfa615d2982a22256ba7d1f8aa1679a576
2019-04-26 04:27:11 +00:00
Jessica Hamilton bab060e9dd loader: load all available file/partitioning system modules.
* This fixes booting on virtualbox with UEFI, where it
  fails to identify CDs as BOOT_METHOD_CD, such that the
  write_overlay driver doesn't get loaded, causing a
  panic in the kernel trying to mount the boot device.

Change-Id: I1f23b4c4195668752357735368f4668b73f75980
2019-04-25 05:08:22 +00:00
Jessica Hamilton 0f00993773 Revert "loader: load all available file/partitioning system modules."
This reverts commit ce624c696f.
2019-04-25 05:05:19 +00:00
Jessica Hamilton ce624c696f loader: load all available file/partitioning system modules.
* This fixes booting on virtualbox with UEFI, where it
  fails to identify CDs as BOOT_METHOD_CD, such that the
  write_overlay driver doesn't get loaded, causing a
  panic in the kernel trying to mount the boot device.

Change-Id: I63046d976661500227604bf01cc1631f1ae2b608
Reviewed-on: https://review.haiku-os.org/c/1406
Reviewed-by: waddlesplash <[email protected]>
2019-04-18 16:40:01 +00:00
Jessica Hamilton 1f96a3cbde system/boot: Add support for multiple bootloaders 2018-10-17 14:47:46 -05:00
Jessica Hamilton 2ff22d6734 vesa: fix missing display_mode for UEFI.
* Broke use of non-standard modes in hrev51207. Code changed
  when merging framebuffer driver back into vesa driver...

Change-Id: I688ae627de23f37ffc8614d8f189593f8833ae3e
2018-07-20 17:08:38 +12:00
Jessica Hamilton 7f7f3618dd webpositive: force download window on screen.
* When Download window is initially shown, it is correctly
  fully onscreen; however, adding a download resizes the
  window such that it becomes partially offscreen. Now,
  when the frame is resized, reposition the window onscreen
  again.

Fixes #12704
2018-06-17 17:00:47 +00:00
Jessica Hamilton 77c8afb47f libroot_build: don't define system_time() on Haiku host.
* On x86_64, this was causing an infinite loop between
  libroot & libroot_build in the host unzip tool.
2018-06-16 10:08:56 +00:00
Jessica Hamilton d284524815 libroot_build: replace void* with addr_t for hidden functions.
* Using attribute visibility hidden doesn't get applied if a
  function returns a non-class pointer type, so the functions
  weren't being hidden for gcc4+ builds, resulting in stack
  overflows. Using addr_t, which should be the same size as
  void* works around this restriction.
2018-06-16 10:08:56 +00:00
Jessica Hamilton 86b12d85c7 efi: move various init before call to main().
* With the previous commit, we can now move functions that require
  calling mmu_map_physical_memory to where they should have been
  originally. This also allows the SMP safe mode menu entries to
  be properly generated, now that smp_init is called prior to
  main().

Change-Id: I05ddca5273b11cb4846021664c1ea2cf8ba723b7
2018-06-11 15:17:40 +12:00
Jessica Hamilton b2d0b3699e efi: redo mmu_map_physical_address to not require allocations.
* mmu_map_physical_address will get called prior to calling main()
  which leaves us without a heap, malloc, and new. Instead, use
  the kernel args physical allocated range array, and then
  convert to our allocated memory region type on-demand.

Change-Id: I265fd165ef7143681e8e40c3686fda1a583c20dc
2018-06-11 15:17:39 +12:00
Jessica Hamilton 74bfec3b96 build/jam: whitespace cleanup.
Change-Id: I80c9a51417631b1f283923451f5bb530097b74f3
2018-05-07 13:12:16 +12:00
Jessica Hamilton f599721237 bootloader/efi: remove partition before adding to new list.
* A Node/Partition cannot be member of two lists at once. This
  resolves an issue where a partition cannot be found later
  due to corruption of a NodeList.
2018-05-05 14:14:35 +12:00
Jessica Hamilton bb96d47d9b Revert "efi: force boot menu to show."
This reverts commit 3ceaa03c60.
2018-05-05 14:14:21 +12:00
Jessica Hamilton 3ceaa03c60 efi: force boot menu to show. 2018-05-05 14:11:26 +12:00
Jessica Hamilton 916d4f5d75 rust (x86_64): updated with working cargo.
* Note that this is a cross-compiled version from git
  master, so may run into bugs.

ref: https://github.com/haikuports/haikuports/89c999e9e
2017-09-22 03:35:47 +00:00
Jessica Hamilton 9533c3e921 docker: tools for creating a container with Haiku cross-compilers.
* This also includes the package tool for easy use of installing
  dependencies in a container.
* Pre-built docker images are also available at
  https://hub.docker.com/r/haiku/cross-compiler/
2017-09-11 07:06:52 +12:00
Jessica Hamilton c5e77784a8 compatibility/bsd: add endian.h for BSD extensions. 2017-09-11 07:06:52 +12:00
Jessica Hamilton f995cdcc5f Revert "endian.h: add BSD extensions when _BSD_SOURCE is defined."
This reverts commit b8cfd96db1.
2017-09-11 07:06:52 +12:00
Jessica Hamilton b8cfd96db1 endian.h: add BSD extensions when _BSD_SOURCE is defined. 2017-09-10 07:37:32 +12:00
Jessica Hamilton 77815ad59a ftp: rename variable named bool.
* Causes conflicts with <stdbool.h>
2017-09-10 07:35:41 +12:00
Jessica Hamilton d995db52e5 radeon_hd: fix typo in hrev51403. 2017-09-09 22:16:46 +12:00
Jessica Hamilton 6cc6f04747 build_cross_tools_gcc4: bring in sync with native compiler.
* Previously, the cross-compiler would generate code that doesn't
  run on Haiku, particularly where TLS is concerned. It also ended
  up with a c++config.h header incompatible with the version in
  the native compiler.
* Now possible to correctly cross-compile rust for Haiku.
2017-09-05 21:41:39 +00:00
Jessica Hamilton fe434a740e rust (x86_64): new package, development snapshot.
* Note that this is a cross-compiled version from git
  master, so may run into bugs.

ref: https://github.com/haikuports/haikuports/b2214fb42
2017-09-05 21:23:19 +00:00
Jessica Hamilton e8caf2e794 llvm (x86_64): update to package with threading enabled.
ref: https://github.com/haikuports/haikuports/commit/c539ff63
2017-09-05 15:49:40 +00:00
Jessica Hamilton 8253046311 hda: prevent buffer overrun for associations array. 2017-06-29 13:56:54 -07:00
Jessica Hamilton 85b0c3209d hda: increase max association count.
* On MacBook Air 6,2, HDA driver has an association count of 19. Prior
  to this fix, this would corrupt the hda_multi pointer.
2017-06-27 10:57:19 +12:00
Jessica Hamilton 72fc5e6a71 framebuffer: remove driver & accelerant.
* Functionality provided by the framebuffer driver for UEFI
  systems has now been folded into the vesa driver, so is
  no longer needed.
2017-06-16 20:31:24 +12:00
Jessica Hamilton b9eacd390d vesa: fold framebuffer driver into vesa driver.
* The app_server isn't designed to support two fallback drivers, so
  on systems using UEFI to boot, the framebuffer driver will often
  win when other drivers would likely work on those systems.
2017-06-16 20:29:15 +12:00
Jessica Hamilton f286626cd0 pxe_ia32: add missing include for boot::Partition 2017-05-17 23:21:40 +12:00
Jessica Hamilton e888217124 loader: fetch all potential boot partitions for boot device.
This allows the loader to skip BFS partitions that don't contain
a bootable system. Useful when you have a BFS data partition that
comes before the system partition when iterated over.

Currently, only the UEFI loader actually returns more than one
possible partition.
2017-05-17 12:51:09 +12:00
Jessica Hamilton 10a1d9102e bootloader/efi: use B_PAGE_SIZE 2017-04-25 00:06:01 +00:00
Jessica Hamilton d9e65badd3 HaikuDepot: remove invalid use of const. 2017-01-31 21:22:15 +13:00
Jessica Hamilton 0d51483fae HaikuDepot: format string fixes. 2017-01-30 12:44:53 +13:00
Jessica Hamilton 614d494afc DefaultMediaTheme: use DetachedFromWindow() for unwatching media events. 2017-01-30 12:35:07 +13:00
Jessica Hamilton 9f4c8d3b74 desklink: set the status of fMuted in _ConnectMixer().
* This fixes the volume icon not showing as muted, despite
  media preflet saying otherwise.
2017-01-16 18:54:02 +00:00
Jessica Hamilton 79b9bd9f37 desklink: use media_server notifications instead of polling.
* This removes Pulse(), which would constantly reconnect to
  the mixer. With the previous changes to the
  DefaultMediaTheme, this also makes changes to the muted
  state instaneous when modified by some other app.
2017-01-16 12:28:49 +13:00
Jessica Hamilton 9c7d2b4668 DefaultMediaTheme: improve watching for parameter value changes.
* Addresses TODO of sub-classing controls, registering with the
  media roster for parameter changes.
* Also adds support for discrete parameter controls, which didn't
  have this functionality.
* With this change, the controls no longer need to be focused or
  modified for the parameter changes to register.
2017-01-16 12:28:49 +13:00
Jessica Hamilton 939b40d65c Media preflet: fix runtime warning about incorrect flag usage. 2017-01-16 12:28:48 +13:00
Jessica Hamilton e3c6ca6589 gpt: add pointer to the GPT header for child partitions.
* This fixes odd behaviour in devices.cpp for the UEFI loader,
  which I had forgotten to commit at that time.
2017-01-13 00:53:12 +00:00
Jessica Hamilton 92b9c8649b MultibyteToWchar: correctly handle UTF-16 surrogate pairs.
* Whilst in WcharToMultibyte, we correctly convert our UTF-32
  wchar characters to multibyte, the same wasn't done in
  MultibyteToWchar. Now, if we detect a leading surrogate,
  we'll re-read the multibyte sequence with space for a UTF-16
  pair, which allows U16_GET to correctly convert the UTF-16
  byte sequence into the needed UTF-32 codepoint.

Fixes #13184.
2017-01-12 06:39:55 +13:00
Jessica Hamilton d2423e4b3c ICUCtypeData.cpp: format string fixes for tracing. 2017-01-12 03:33:11 +13:00
Jessica Hamilton 079ab7f0b1 ICU add-on: validate mbState->converter before attempting to close.
This resolves crashes in gawk with multibyte support.

Fixes #12515, #13103.
2017-01-12 03:33:04 +13:00
Jessica Hamilton 3d870da3cb UEFI: leave runtime memory identity mapped.
* We don't have kernel/userspace access to UEFI at this point
  either, and with some firmware, if we don't keep the
  runtime memory identity mapped, then the loader dies. This
  will fix booting on such machines, and shouldn't have any
  impact on already working machines.
2017-01-08 21:43:53 +13:00
Jessica Hamilton 6b4cbec040 UEFI: identify the boot partition to check that it's valid.
* Also modified EFI::Header to return the efi_table_header so
  that we can compare it to boot device partition table.
2017-01-07 21:26:25 +13:00
Jessica Hamilton 42e718f041 UEFI: improve boot support in devices.cpp
* Maintain a list of all MESSAGING_DEVICE_PATH and
  MEDIA_DEVICE_PATH handles, so we can avoid adding devices
  multiple times.
* Split up platform_add_boot_device() into separate functions
  for better readability (add_cd_devices, add_boot_device_for_image,
  etc.).
2017-01-07 21:26:23 +13:00
Jessica Hamilton 35b38c392e loader: get_boot_file_system() iterate over all devices found.
* This is useful for UEFI, as we can then add the device that
  contains the UEFI loader, as well as all CD devices. As a
  result, if the device with the UEFI loader doesn't contain
  a bootable BFS partition, it will then attempt the same for
  CD devices.
2017-01-07 21:25:23 +13:00
Jessica Hamilton 445b080ea3 UEFI: support selecting video resolution & vesa settings file. 2017-01-07 15:39:35 +13:00
Jessica Hamilton c337460525 binutils: update x86_64 to include PE targets 2017-01-07 05:24:24 +00:00
Jessica Hamilton e6efd8f21c gawk: downgrade to 4.1.0 to fix build issues on x86_64 Haiku hosts. 2017-01-05 22:33:44 +00:00
Jessica Hamilton d2e18d6462 efi/video.cpp: style fix. 2016-12-23 18:58:26 +13:00
Jessica Hamilton 4419d699ec partitioning: pass along reference to parent when uninitializing.
* Fixes problems with setting the partition name after uninitializing
  a partition in DriveSetup. Previously, UninitializeJob() was
  followed by SetStringJob(), but the kernel was updating the
  change counter for the parent partition when uninitializing a
  partition, leading to SetStringJob() having an incorrect change
  counter for the parent partition. Now the parent change counter
  will be correct when SetStringJob() runs.
2016-12-23 18:53:15 +13:00
Jessica Hamilton 9ba5f87313 disk_systems: set filesystem name from partition name if exists.
* With GPT, partition entries store the name of the partition, so
  use the stored name to initialise the name for the file system
  when formatting.
2016-12-23 18:53:15 +13:00
Jessica Hamilton e495a73b39 partitioning: set partition name in partition table if supported. 2016-12-23 18:53:15 +13:00
Jessica Hamilton 222c84407a gpt: return size of created strings in to_utf8/to_ucs2. 2016-12-23 18:53:15 +13:00
Jessica Hamilton 4ff3f10852 UEFI: improve setting up of the framebuffer.
* Even if we get dropped into the boot menu, we still want
  to have the framebuffer enabled, else we never switch
  back into graphics mode.
2016-12-19 20:18:31 +13:00
Jessica Hamilton 941c240ab0 libroot/fork: fix gcc2 compilation. 2016-12-18 14:42:06 +13:00
Jessica Hamilton 80bc54a59a partitioning_systems/gpt: write the protective MBR & bootloader
* This fixes booting Haiku when creating a brand new GPT
  partition layout with the BIOS/MBR.
* This also fixes boot issues with UEFI based on OVMF, which
  rejects GPT partitions that don't have the protective MBR.
2016-12-18 14:42:05 +13:00
Jessica Hamilton bad25b4baa disk_systems/gpt: Remove unused dependency on Header.cpp 2016-12-18 14:42:05 +13:00
Jessica Hamilton b521a45ec2 Revert "vm: Try harder to allocate early physical pages."
This reverts commit 21e3ac6cf5,
which was accidentally applied twice, missed during rebase.

Originally applied in 601b2f7eda.
2016-12-13 22:24:12 +13:00
Jessica Hamilton 48494219eb Add a dumb framebuffer driver.
This is separate to the VESA driver, as the VESA driver requires
using the VBE BIOS. Under UEFI, we don't have the VBE BIOS, nor
are we able to switch modes after leaving UEFI Boot Services, so
a dumb framebuffer driver seemed like the easier way to approach
the problem.

The framebuffer & vesa drivers now test for the presence of the
VESA_MODES_BOOT_INFO boot item to distinguish between which driver
to use. Also added check for the VESA mode count to determine
whether to add the VESA_MODES_BOOT_INFO item.

UEFI video updated to explicitly zero out the VESA and EDID
boot data.
2016-12-13 21:41:10 +13:00
Jessica Hamilton 25fa3b1b8a loader: fix defines affecting elf.cpp for other platforms 2016-11-14 23:46:10 +13:00
Jessica Hamilton 04f0d02a8f Jamfiles: fix TARGET_BOOT_PLATFORM tests to use = efi 2016-11-14 23:45:22 +13:00
Jessica Hamilton f4ff9cb02c Merge branch 'uefi-support' 2016-11-14 03:21:59 +13:00
Jessica Hamilton ec239abcf5 EFI: implement mmu_map_physical_memory & mmu_free.
Also move cpu, acpi, hpet init into platform_start_kernel, as we
need an initialised heap for alllocating memory for recording
the mapped regions.
2016-11-14 03:21:41 +13:00
Jessica Hamilton a7142a5037 EFI: add cpu.cpp from bios_ia32 2016-11-14 03:21:40 +13:00
Jessica Hamilton a1d0102ee4 EFI: add support for HPET 2016-11-14 03:21:40 +13:00
Jessica Hamilton 6e6efaecdc EFI: add ACPI support
Also add support in the kernel to get the ACPI RSDP from the
bootloader, and pass onto the ACPI driver using get_boot_item.
2016-11-14 03:21:36 +13:00
Jessica Hamilton 2da1cb75a4 EFI: device support for anyboot CDs.
I have tried to get normal ISOs working, but the bootloader doesn't
seem to detect any bootable partitions.
2016-09-03 01:58:41 +12:00
Jessica Hamilton 325b1e3787 EFI: add support for graphics mode output
* We can now switch between graphics and text modes, and display
  the splash screen
2016-09-02 19:02:35 +12:00
Jessica Hamilton dbf1363b41 EFI: naive platform_allocate_region() implementation 2016-09-02 19:02:35 +12:00
Jessica Hamilton 96f4d68b2b EFI: check for boot keys
* Only supports spacebar for the boot menu, and escape for
  enabling debug output. Shift keys will not work.
2016-09-02 19:02:34 +12:00
Jessica Hamilton c0bdc8bef5 bootloader: build objects in $(TARGET_BOOT_PLATFORM)
This separates the objects required for the various boot
loaders, allowing the build system to be able to build
for different targets alongside each other. Currently
only done for bios_ia32 vs efi, as both loaders will be
needed for the x86_64 images.
2016-09-02 19:02:34 +12:00
Jessica Hamilton c0002a79e7 EFI: Implement heap 2016-09-02 19:02:33 +12:00
Jessica Hamilton e2e1558a02 EFI: stub functions so we can call loader's main() function. 2016-09-02 19:02:33 +12:00
Jessica Hamilton ddef999990 Add gnuefi package for x86_64. 2016-04-14 13:39:43 +12:00
Jessica Hamilton b8878f83ca Build: adjust Jamfiles in unittests for libshared.a change. 2016-01-16 15:44:26 +13:00
Jessica Hamilton 5d7e699ade package_daemon: fix regressions from Set*UIColor merge.
Also use Set*UIColor where appropriate.
2016-01-10 17:51:43 +13:00
Jessica Hamilton ed749c6221 BView::AdoptViewColors: handle not yet attached to a Window.
As per API documentation, a BView caches the configured view
colours when not yet attached to the app_server via its
window. So check if we're attached to a window, and if we are,
then and only then do we attempt to lock/unlock our looper.

This fixes uses of AdoptViewColors and AdoptParentColors when
the view isn't yet attached to a window.
2016-01-10 17:51:43 +13:00
Jessica Hamilton 8113bbfe40 ffmpeg addon: only use swresample for planar audio.
Fixes #12547.
2015-12-31 16:19:57 +01:00
Jessica Hamilton fcad732fcd Revert "makebootable: Add in needed GPT libuuid on cross-platform builds"
This reverts commit 832f090ea8.
2015-10-08 23:37:28 +00:00
Jessica Hamilton f217aa879b gpt/Header.cpp: also disable UUID code when _USER_MODE defined.
src/tools/makebootable defines _USER_MODE, which we can check
for in gpt/Header.cpp to remove the dependency on libuuid, as
makebootable only needs read-only access to partition maps
anyway.
2015-10-08 23:37:28 +00:00
Jessica Hamilton f052cd0cce gpt partitioning: properly delete partition entries.
Previously, deleting a partition was lazy and only changed
the partition type to an invalid UUID, and would still
show up as a partition in many partitioning tools.
2015-10-08 23:37:27 +00:00
Jessica Hamilton 0baf9d8d8d gpt partitioning: generate uuids for disks & partitions.
Also added src/libs/uuid to tree, sources adapted from
http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/tree/lib/uuid.
2015-10-08 02:12:14 +00:00
Jessica Hamilton 2346363b23 gpt partitioning: fix writing of partition entries.
When writing an individual entry to disk, the offset of the entry
was omitted, which resulted in entries not block-aligned to
overwrite previously valid entries. This in turn resulted in the
stored entries CRC no longer matching what was on disk, causing
the partitioning system to fail to identify it as a valid GPT
when read from disk later (e.g. after a reboot).

E.g. if the first entry is the ESP (which it typically is), and
then the second being an entry for a BFS partition, updating the
BFS partition entry would overwrite the entry for the ESP, thus
corrupting the entries table.
2015-10-08 02:12:13 +00:00
Jessica Hamilton 2d34b65ec2 Tracker: fix insets of vertical scrollbar. 2015-09-20 00:14:31 +00:00
Jessica Hamilton 8927348ef1 Boot menu: change colours of sub-menu headers. Fixes #12371.
Changed from white on red background, to yellow on black
(neutral) background. Red on black made it look like a
warning, whereas yellow feels more informative.
2015-09-15 01:32:07 +00:00
Jessica Hamilton 31b0eb9f53 BWindow::MoveOnScreen(), fix parentheses warning. 2015-09-15 00:51:07 +00:00
Jessica Hamilton 93244a65e6 BScrollView: _ComputeFrame(BRect,...) used incorrect insets.
Previously, the BRect would be expanded by the call to
InsetBy(), but the replacement _InsetBorders() forgot to
take this into account.

Fixes #12380.
2015-09-15 00:39:23 +00:00
Jessica Hamilton 8f3d6d192f Revert "BPrintJob: fixed crash."
This reverts commit 1805bbf29b.
2015-08-30 14:41:16 +12:00
Jessica Hamilton d7a9cbde91 BAlert: don't center ourselves if we've already been positioned. 2015-08-30 14:39:36 +12:00
Jessica Hamilton 21c3286b62 BAlert: make SetShortcut() work again.
In hrev49481, the call to AddCommonFilter was accidentally
removed, preventing SetShortcut() from working. The filter
has also been updated to enumerate all buttons, rather than
a maximum of the first three.
2015-08-30 14:06:58 +12:00
Jessica Hamilton a84dc7543a BAlert: move setting default button into AddButton().
This properly fixes the crash in #12271, introduced by
hrev49481.
2015-08-30 14:06:57 +12:00
Jessica Hamilton 579efee783 package server: fix off-by-one error in RemoveLastComponent() 2015-08-24 15:53:56 +12:00
Jessica Hamilton 56b2d534cb netresolv: add an explicit include for nsparser.h
The grist for nsparser.h doesn't include the architecture
despite using MultiArchSubDirSetup, so we need to
explicitly include the correctly gristed header.
2015-06-15 14:44:25 +12:00
Jessica Hamilton 6f19d31cd4 package_daemon: queue post-install scripts to run after reboot
* Creates symlinks to the post-install scripts into the
  administrative/queued-scripts directory.
* Upon reboot, post-install scripts in the queued-scripts
  are run, and then the symlinks to the scripts removed.
* This solves the issue of post-install scripts not being
  run when the package is installed/upgraded along with the
  system packages, as experienced with the latest upgrade
  to the bash package.
2015-06-15 13:36:13 +12:00
Jessica Hamilton 0975f16f7c setarch: use a login shell; fixes #12066.
* This also updates /etc/profile to detect whether our
  parent process is a shell, and changes the banner
  message accordingly.
* Also, pipe errors to /dev/null, in case grep is not
  installed; this allows us to not require grep as a
  dependency, and let the banner message do the right
  thing.
2015-06-12 19:29:19 +12:00