Fix HPET unaligned read/writes on bochs

This commit is contained in:
2025-12-22 21:06:48 +01:00
parent 69feceaaae
commit 849df9c27d
5 changed files with 43 additions and 12 deletions

View File

@@ -23,13 +23,14 @@ void bootmain (void) {
amd64_ioapic_init ();
amd64_hpet_init ();
int* a = malloc (sizeof (int));
*a = 6969;
DEBUG ("a=%p, *a=%d\n", a, *a);
/* int* a = malloc (sizeof (int)); */
/* *a = 6969; */
/* DEBUG ("a=%p, *a=%d\n", a, *a); */
amd64_hpet_sleep_micro (3000000);
DEBUG ("woke up!!!\n");
for (size_t i = 0; i < 1000; i++) {
DEBUG ("i=%zu\n", i);
amd64_hpet_sleep_micro (1000000);
}
for (;;)
;