Replace __attribute__ with a macro from types.h

This commit is contained in:
Alex
2023-04-07 05:22:14 +03:00
parent 7fa3e91a53
commit 98c137566d
22 changed files with 69 additions and 69 deletions

View File

@ -308,7 +308,7 @@ namespace CPU
uint32_t Reserved2 : 32;
};
uint32_t raw;
} __attribute__((packed)) EFER;
} __packed EFER;
// ! TODO: UNTESTED!
typedef union DR7
@ -377,7 +377,7 @@ namespace CPU
uint8_t st[8][16];
/** @brief XMM registers */
uint8_t xmm[16][16];
} __attribute__((packed));
} __packed;
/**
* @brief CPUID
@ -445,7 +445,7 @@ namespace CPU
uint32_t ApicBaseHi : 32;
};
uint64_t raw;
} __attribute__((packed)) APIC_BASE;
} __packed APIC_BASE;
typedef union
{
@ -555,7 +555,7 @@ namespace CPU
uint64_t Reserved2 : 32;
};
uint64_t raw;
} __attribute__((packed)) EFER;
} __packed EFER;
// ! TODO: UNTESTED!
typedef union DR7
@ -674,7 +674,7 @@ namespace CPU
uint8_t st[8][16];
/** @brief XMM registers */
uint8_t xmm[16][16];
} __attribute__((packed));
} __packed;
SafeFunction static inline void lgdt(void *gdt)
{

View File

@ -51,7 +51,7 @@ namespace Disk
uint8_t CHSLast[3];
uint32_t LBAFirst;
uint32_t Sectors;
} __attribute__((packed));
} __packed;
struct MasterBootRecord
{
@ -60,7 +60,7 @@ namespace Disk
uint16_t Reserved;
MasterBootRecordPartition Partitions[4];
uint8_t Signature[2];
} __attribute__((packed));
} __packed;
struct GUIDPartitionTablePartition
{
@ -72,7 +72,7 @@ namespace Disk
uint64_t EndLBA;
uint64_t Attributes;
char Label[72];
} __attribute__((packed));
} __packed;
struct GUIDPartitionTable
{
@ -91,7 +91,7 @@ namespace Disk
uint32_t PartCount;
uint32_t EntrySize;
uint32_t PartCRC32;
} __attribute__((packed));
} __packed;
struct PartitionTable
{

View File

@ -66,7 +66,7 @@ namespace VirtualFileSystem
uint32_t HiddenSectors;
/** @brief Large sector count. This field is set if there are more than 65535 sectors in the volume, resulting in a value which does not fit in the Number of Sectors entry at 0x13. */
uint32_t Sectors32;
} __attribute__((__packed__));
} __packed;
FatType GetFATType(BIOSParameterBlock *bpb);
FAT(void *partition);

View File

@ -436,7 +436,7 @@ namespace Memory
struct PageTable4
{
PageMapLevel4 Entries[511];
} __attribute__((aligned(0x1000)));
} __aligned(0x1000);
struct __packed PageMapLevel5
{
@ -446,7 +446,7 @@ namespace Memory
struct PageTable5
{
PageMapLevel5 Entries[511];
} __attribute__((aligned(0x1000)));
} __aligned(0x1000);
class Physical
{

View File

@ -55,7 +55,7 @@ namespace NetworkARP
uint32_t SenderIP;
uint48_t TargetMAC : 48;
uint32_t TargetIP;
} __attribute__((packed));
} __packed;
struct DiscoveredAddress
{

View File

@ -42,7 +42,7 @@ namespace NetworkDHCP
uint8_t ServerHostName[64];
uint8_t BootFileName[128];
uint8_t Options[64];
} __attribute__((packed));
} __packed;
enum DHCPOperation
{

View File

@ -36,7 +36,7 @@ namespace NetworkEthernet
uint48_t DestinationMAC : 48;
uint48_t SourceMAC : 48;
uint16_t Type;
} __attribute__((packed));
} __packed;
struct EthernetPacket
{

View File

@ -139,7 +139,7 @@ namespace NetworkNTP
* @note Only when the NTP authentication scheme is used
*/
// uint32_t MessageAuthenticationCode;
} __attribute__((packed));
} __packed;
class NTP : public NetworkUDP::UDPEvents
{

View File

@ -31,7 +31,7 @@ namespace NetworkUDP
uint16_t DestinationPort;
uint16_t Length;
uint16_t Checksum;
} __attribute__((packed));
} __packed;
struct UDPPacket
{

View File

@ -217,7 +217,7 @@ namespace PCI
uint8_t StartBus;
uint8_t EndBus;
uint32_t Reserved;
} __attribute__((packed));
} __packed;
class PCI
{