Compare commits
No commits in common. "8c0478879324e0381d0aa6ed315d91eed84a6d34" and "cbf061d18f802b0c1d94ab4e5f54cbea0eee0d5e" have entirely different histories.
8c04788793
...
cbf061d18f
@ -13,7 +13,7 @@ namespace CPU
|
||||
|
||||
[[noreturn]] void efficient_halt();
|
||||
|
||||
[[noreturn]] void idle_loop();
|
||||
void idle_loop();
|
||||
|
||||
void switch_kernel_stack(u64 top);
|
||||
|
||||
|
@ -430,7 +430,7 @@ namespace CPU
|
||||
goto loop; // Safeguard: if we ever wake up, start our low-power rest again
|
||||
}
|
||||
|
||||
[[noreturn]] void idle_loop()
|
||||
void idle_loop()
|
||||
{
|
||||
asm volatile("sti");
|
||||
loop:
|
||||
|
@ -1,4 +1,3 @@
|
||||
#pragma once
|
||||
#include <luna/Types.h>
|
||||
|
||||
struct Registers // Saved CPU registers for x86-64
|
||||
|
@ -1,23 +0,0 @@
|
||||
#pragma once
|
||||
#include <luna/Types.h>
|
||||
|
||||
struct Stack
|
||||
{
|
||||
Stack(u64 base, usize bytes);
|
||||
|
||||
u64 bottom()
|
||||
{
|
||||
return m_base;
|
||||
}
|
||||
|
||||
u64 top();
|
||||
|
||||
usize bytes()
|
||||
{
|
||||
return m_bytes;
|
||||
}
|
||||
|
||||
private:
|
||||
u64 m_base;
|
||||
usize m_bytes;
|
||||
};
|
@ -62,14 +62,11 @@ void Bitmap::clear_region(usize start, usize bits, bool value)
|
||||
expect(initialized(), "Bitmap was never initialized");
|
||||
expect((start + bits) <= size(), "Bitmap clear out of range");
|
||||
|
||||
if (!bits) return;
|
||||
|
||||
// Set individual bits while not on a byte boundary.
|
||||
while ((start % 8) && bits)
|
||||
while ((start % 8) && bits--)
|
||||
{
|
||||
set(start, value);
|
||||
start++;
|
||||
bits--;
|
||||
}
|
||||
|
||||
// Clear out the rest in bytes.
|
||||
|
@ -1,10 +0,0 @@
|
||||
#include <luna/Stack.h>
|
||||
|
||||
Stack::Stack(u64 base, usize bytes) : m_base(base), m_bytes(bytes)
|
||||
{
|
||||
}
|
||||
|
||||
u64 Stack::top()
|
||||
{
|
||||
return (m_base + m_bytes) - sizeof(void*);
|
||||
}
|
Loading…
Reference in New Issue
Block a user