Merge branch 'uefi-support'

This commit is contained in:
Jessica Hamilton
2016-11-14 03:21:59 +13:00
72 changed files with 3600 additions and 144 deletions
@@ -38,6 +38,8 @@ typedef struct {
// hpet stuff
uint32 hpet_phys;
FixedWidthPointer<void> hpet;
// needed for UEFI, otherwise kernel acpi support can't find ACPI root
FixedWidthPointer<void> acpi_root;
} _PACKED arch_kernel_args;
#endif /* KERNEL_ARCH_x86_KERNEL_ARGS_H */
+2
View File
@@ -30,6 +30,8 @@ class Partition : public Node, public partition_data {
status_t Mount(Directory **_fileSystem = NULL, bool isBootDevice = false);
status_t Scan(bool mountFileSystems, bool isBootDevice = false);
static Partition *Lookup(partition_id id, NodeList *list = NULL);
void SetParent(Partition *parent);
Partition *Parent() const;
+2
View File
@@ -28,6 +28,8 @@ extern status_t platform_init_heap(struct stage2_args *args, void **_base, void
extern status_t platform_allocate_region(void **_virtualAddress, size_t size,
uint8 protection, bool exactAddress);
extern status_t platform_free_region(void *address, size_t size);
extern status_t platform_bootloader_address_to_kernel_address(void *address, uint64_t *_result);
extern status_t platform_kernel_address_to_bootloader_address(uint64_t address, void **_result);
/* boot options */
#define BOOT_OPTION_MENU 1
@@ -0,0 +1,46 @@
/*
* Copyright 2013-2016 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef KERNEL_BOOT_PLATFORM_EFI_KERNEL_ARGS_H
#define KERNEL_BOOT_PLATFORM_EFI_KERNEL_ARGS_H
#ifndef KERNEL_BOOT_KERNEL_ARGS_H
# error This file is included from <boot/kernel_args.h> only
#endif
// currently the EFI loader pretends to be the bios_ia32 platform.
// not quite right, as the kernel needs to be aware of efi runtime services
#include <arch/x86/apm.h>
#include <boot/disk_identifier.h>
#include <util/FixedWidthPointer.h>
#define SMP_MAX_CPUS 64
#define MAX_PHYSICAL_MEMORY_RANGE 32
#define MAX_PHYSICAL_ALLOCATED_RANGE 32
#define MAX_VIRTUAL_ALLOCATED_RANGE 32
#define MAX_SERIAL_PORTS 4
typedef struct bios_drive {
struct bios_drive *next;
uint16 drive_number;
disk_identifier identifier;
} bios_drive;
typedef struct {
uint16 serial_base_ports[MAX_SERIAL_PORTS];
FixedWidthPointer<bios_drive> drives;
// this does not contain the boot drive
// seems to be ignored entirely?
apm_info apm;
} _PACKED platform_kernel_args;
#endif /* KERNEL_BOOT_PLATFORM_BIOS_IA32_KERNEL_ARGS_H */
@@ -0,0 +1,17 @@
/*
* Copyright 2013-2016 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_BOOT_PLATFORM_EFI_STAGE2_ARGS_H
#define _KERNEL_BOOT_PLATFORM_EFI_STAGE2_ARGS_H
#ifndef KERNEL_BOOT_STAGE2_ARGS_H
# error This file is included from <boot/stage2_args.h> only
#endif
struct platform_stage2_args {
};
#endif /* _KERNEL_BOOT_PLATFORM_EFI_STAGE2_ARGS_H */