summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-02-03 22:06:39 -0500
committerFreya Murphy <freya@freyacat.org>2024-02-03 22:06:39 -0500
commita717dbdd0087f9ce45f0a474211e760d1467013f (patch)
treec5dc35ec4f7b7107bf73d258ad6e4861cae9a031 /src/arch
parentprint registers on fatal exception (diff)
downloadcorn-a717dbdd0087f9ce45f0a474211e760d1467013f.tar.gz
corn-a717dbdd0087f9ce45f0a474211e760d1467013f.tar.bz2
corn-a717dbdd0087f9ce45f0a474211e760d1467013f.zip
fix acpi on uefi, kprint fixes
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/amd64/acpi.c12
-rw-r--r--src/arch/amd64/cpu/backtrace.c4
-rw-r--r--src/arch/amd64/mboot.c2
3 files changed, 8 insertions, 10 deletions
diff --git a/src/arch/amd64/acpi.c b/src/arch/amd64/acpi.c
index 887bfef..a7f38b6 100644
--- a/src/arch/amd64/acpi.c
+++ b/src/arch/amd64/acpi.c
@@ -38,12 +38,10 @@ struct xsdp {
char oemid[6];
uint8_t revision;
uint32_t rsdt_addr;
- struct {
- uint32_t length;
- uint64_t xsdt_addr;
- uint8_t extendeid_checksum;
- uint8_t reserved[3];
- } ext;
+ uint32_t length;
+ uint64_t xsdt_addr;
+ uint8_t extendeid_checksum;
+ uint8_t reserved[3];
} __attribute__((packed));
// root system descriptor table
@@ -321,7 +319,7 @@ int acpi_init(void *rootsdp) {
state.version = 2;
struct xsdp *xsdp = (struct xsdp *) rsdp;
kprintf("ACPI 2.0\n");
- acpi_load_table(xsdp->ext.xsdt_addr);
+ acpi_load_table(xsdp->xsdt_addr);
} else {
panic("invalid acpi rev: %d\n", rsdp->revision);
}
diff --git a/src/arch/amd64/cpu/backtrace.c b/src/arch/amd64/cpu/backtrace.c
index 181df27..357e424 100644
--- a/src/arch/amd64/cpu/backtrace.c
+++ b/src/arch/amd64/cpu/backtrace.c
@@ -36,9 +36,9 @@ void log_backtrace(void) {
void log_backtrace_ex(void *ip, void *bp) {
struct stackframe *frame = bp;
kputs("Stack trace:\n");
- kprintf(" 0x%p\n", ip);
+ kprintf(" %p\n", ip);
while (frame) {
- kprintf(" 0x%p\n", frame->rip);
+ kprintf(" %p\n", frame->rip);
frame = frame->rbp;
}
diff --git a/src/arch/amd64/mboot.c b/src/arch/amd64/mboot.c
index 606c888..9fd7fc2 100644
--- a/src/arch/amd64/mboot.c
+++ b/src/arch/amd64/mboot.c
@@ -184,7 +184,7 @@ static void read_memory_map(
type = segment_type[6];
else
type = segment_type[seg->type];
- kprintf("ADDR: 0x%16p LEN: %4s TYPE: %s (%d)\n",
+ kprintf("ADDR: %16p LEN: %4s TYPE: %s (%d)\n",
(void *)seg->addr,
btoa(seg->len, buf),
type,