@@ -39,6 +39,9 @@ C99 introduces standard fixed-width data types like `uint32_t`
3939We need to include ` <stdint.h> ` which works even in ` -ffreestanding ` (but requires stdlibs)
4040and use those data types instead of our own, then delete them on ` type.h `
4141
42+ We also delete the underscores around ` __asm__ ` and ` __volatile__ ` since they aren't needed.
43+
44+
42454 . Improperly aligned ` kmalloc `
4346-------------------------------
4447
@@ -53,12 +56,24 @@ For now, it will always return a new page-aligned memory block.
53565 . Missing functions
5457--------------------
5558
59+ We will implement the missing ` mem* ` functions in following lessons
60+
61+
56626 . Interrupt handlers
5763---------------------
58- - also cli, sti in interrupt handlers
64+ ` cli ` is redundant, since we already established on the IDT entries if interrupts
65+ are enabled within a handler using the ` idt_gate_t ` flags.
66+
67+ ` sti ` is also redundant, as ` iret ` loads the eflags value from the stack, which contains a
68+ bit telling whether interrupts are on or off.
69+ In other words the interrupt handler automatically restores interrupts whether or not
70+ interrupts were enabled before this interrupt
5971
6072
61- 7 . Structs and attributes
62- -------------------------
73+ On ` cpu/isr.h ` , ` struct registers_t ` has a couple issues.
74+ First, the alleged ` esp ` is renamed to ` useless ` .
75+ The value is useless because it has to do with the current stack context, not what was interrupted.
76+ Then, we rename ` useresp ` to ` esp `
6377
78+ Finally, we add ` cld ` just before ` call isr_handler ` on ` cpu/interrupt.asm `
6479
0 commit comments