build: Remove dependency on GCC-specific -fplan9-extensions flag

This commit is contained in:
mintsuki 2021-05-28 16:05:42 +02:00
parent 187576393c
commit 87cc5494c7
6 changed files with 11 additions and 15 deletions

View File

@ -45,7 +45,6 @@ S2CFLAGS = -Os -g -pipe -Wall -Wextra $(WERROR)
INTERNAL_CFLAGS := \
-std=gnu11 \
-fplan9-extensions \
-ffreestanding \
-fno-stack-protector \
-fno-omit-frame-pointer \

View File

@ -43,7 +43,7 @@ struct iso9660_volume_descriptor {
} __attribute__((packed));
struct iso9660_primary_volume {
struct iso9660_volume_descriptor;
struct iso9660_volume_descriptor volume_descriptor;
union {
struct {

View File

@ -128,7 +128,7 @@ void acpi_get_smbios(void **smbios32, void **smbios64) {
void *acpi_get_table(const char *signature, int index) {
int cnt = 0;
struct rsdp_rev2 *rsdp = acpi_get_rsdp();
struct rsdp *rsdp = acpi_get_rsdp();
if (rsdp == NULL)
return NULL;
@ -143,7 +143,7 @@ void *acpi_get_table(const char *signature, int index) {
rsdt = (struct rsdt *)(uintptr_t)rsdp->rsdt_addr;
size_t entry_count =
(rsdt->length - sizeof(struct sdt)) / (use_xsdt ? 8 : 4);
(rsdt->header.length - sizeof(struct sdt)) / (use_xsdt ? 8 : 4);
for (size_t i = 0; i < entry_count; i++) {
struct sdt *ptr;

View File

@ -24,10 +24,7 @@ struct rsdp {
char oem_id[6];
uint8_t rev;
uint32_t rsdt_addr;
} __attribute__((packed));
struct rsdp_rev2 {
struct rsdp;
// Rev 2 only after this comment
uint32_t length;
uint64_t xsdt_addr;
uint8_t ext_checksum;
@ -35,7 +32,7 @@ struct rsdp_rev2 {
} __attribute__((packed));
struct rsdt {
struct sdt;
struct sdt header;
char ptrs_start[];
} __attribute__((packed));

View File

@ -7,7 +7,7 @@
#include <lib/acpi.h>
struct dmar {
struct sdt;
struct sdt header;
uint8_t host_address_width;
uint8_t flags;
uint8_t reserved[10];

View File

@ -13,7 +13,7 @@
#include <mm/pmm.h>
struct madt {
struct sdt;
struct sdt header;
uint32_t local_controller_addr;
uint32_t flags;
char madt_entries_begin[];
@ -25,14 +25,14 @@ struct madt_header {
} __attribute__((packed));
struct madt_lapic {
struct madt_header;
struct madt_header header;
uint8_t acpi_processor_uid;
uint8_t lapic_id;
uint32_t flags;
} __attribute__((packed));
struct madt_x2apic {
struct madt_header;
struct madt_header header;
uint8_t reserved[2];
uint32_t x2apic_id;
uint32_t flags;
@ -164,7 +164,7 @@ struct smp_information *init_smp(size_t header_hack_size,
size_t max_cpus = 0;
for (uint8_t *madt_ptr = (uint8_t *)madt->madt_entries_begin;
(uintptr_t)madt_ptr < (uintptr_t)madt + madt->length;
(uintptr_t)madt_ptr < (uintptr_t)madt + madt->header.length;
madt_ptr += *(madt_ptr + 1)) {
switch (*madt_ptr) {
case 0: {
@ -200,7 +200,7 @@ struct smp_information *init_smp(size_t header_hack_size,
// Try to start all APs
for (uint8_t *madt_ptr = (uint8_t *)madt->madt_entries_begin;
(uintptr_t)madt_ptr < (uintptr_t)madt + madt->length;
(uintptr_t)madt_ptr < (uintptr_t)madt + madt->header.length;
madt_ptr += *(madt_ptr + 1)) {
switch (*madt_ptr) {
case 0: {