mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Fix 32-bit compilation
This commit is contained in:
@ -77,15 +77,17 @@ typedef struct
|
||||
} a_un;
|
||||
} Elf64_auxv_t;
|
||||
|
||||
#if defined(a64)
|
||||
typedef Elf64_auxv_t Elf_auxv_t;
|
||||
#elif defined(a32)
|
||||
typedef Elf64_auxv_t Elf_auxv_t;
|
||||
#elif defined(aa64)
|
||||
typedef Elf64_auxv_t Elf_auxv_t;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#if defined(a64)
|
||||
Elf64_auxv_t archaux;
|
||||
#elif defined(a32)
|
||||
Elf32_auxv_t archaux;
|
||||
#elif defined(aa64)
|
||||
Elf64_auxv_t archaux;
|
||||
#endif
|
||||
Elf_auxv_t archaux;
|
||||
} AuxiliaryVector;
|
||||
|
||||
#endif // !__FENNIX_KERNEL_ABI_H__
|
||||
|
@ -210,6 +210,35 @@ namespace CPU
|
||||
|
||||
namespace x32
|
||||
{
|
||||
/**
|
||||
* @brief MSR_APIC_BASE structure
|
||||
* @see MSR_APIC_BASE
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
{
|
||||
/** @brief Reserved */
|
||||
uint32_t Reserved0 : 8;
|
||||
/**
|
||||
* @brief BSP Flag
|
||||
* @details If the BSP flag is set to 1, the processor is the bootstrap processor.
|
||||
*/
|
||||
uint32_t BSP : 1;
|
||||
/** @brief Reserved */
|
||||
uint32_t Reserved1 : 1;
|
||||
/** @brief Enable x2APIC mode */
|
||||
uint32_t EXTD : 1;
|
||||
/** @brief APIC Global Enable */
|
||||
uint32_t EN : 1;
|
||||
/** @brief APIC Base Low Address */
|
||||
uint32_t ApicBaseLo : 20;
|
||||
/** @brief APIC Base High Address */
|
||||
uint32_t ApicBaseHi : 32;
|
||||
};
|
||||
uint64_t raw;
|
||||
} __packed APIC_BASE;
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
|
@ -213,7 +213,7 @@ namespace PCI
|
||||
|
||||
struct DeviceConfig
|
||||
{
|
||||
uintptr_t BaseAddress;
|
||||
uint64_t BaseAddress;
|
||||
uint16_t PCISegGroup;
|
||||
uint8_t StartBus;
|
||||
uint8_t EndBus;
|
||||
@ -228,9 +228,9 @@ namespace PCI
|
||||
public:
|
||||
std::vector<PCIDeviceHeader *> &GetDevices() { return Devices; }
|
||||
void MapPCIAddresses(PCIDeviceHeader *PCIDevice, Memory::PageTable *Table = nullptr);
|
||||
void EnumerateFunction(uintptr_t DeviceAddress, uintptr_t Function);
|
||||
void EnumerateDevice(uintptr_t BusAddress, uintptr_t Device);
|
||||
void EnumerateBus(uintptr_t BaseAddress, uintptr_t Bus);
|
||||
void EnumerateFunction(uint64_t DeviceAddress, uintptr_t Function);
|
||||
void EnumerateDevice(uint64_t BusAddress, uintptr_t Device);
|
||||
void EnumerateBus(uint64_t BaseAddress, uintptr_t Bus);
|
||||
std::vector<PCIDeviceHeader *> FindPCIDevice(uint8_t Class, uint8_t Subclass, uint8_t ProgIF);
|
||||
std::vector<PCIDeviceHeader *> FindPCIDevice(int VendorID, int DeviceID);
|
||||
|
||||
|
@ -52,15 +52,15 @@ namespace Time
|
||||
private:
|
||||
struct HPET
|
||||
{
|
||||
uintptr_t GeneralCapabilities;
|
||||
uintptr_t Reserved0;
|
||||
uintptr_t GeneralConfiguration;
|
||||
uintptr_t Reserved1;
|
||||
uintptr_t GeneralIntStatus;
|
||||
uintptr_t Reserved2;
|
||||
uintptr_t Reserved3[24];
|
||||
uintptr_t MainCounterValue;
|
||||
uintptr_t Reserved4;
|
||||
uint64_t GeneralCapabilities;
|
||||
uint64_t Reserved0;
|
||||
uint64_t GeneralConfiguration;
|
||||
uint64_t Reserved1;
|
||||
uint64_t GeneralIntStatus;
|
||||
uint64_t Reserved2;
|
||||
uint64_t Reserved3[24];
|
||||
uint64_t MainCounterValue;
|
||||
uint64_t Reserved4;
|
||||
};
|
||||
|
||||
uint32_t clk = 0;
|
||||
|
Reference in New Issue
Block a user