Working on issue #76
This commit is contained in:
parent
1de74e599b
commit
50df081a8f
|
@ -86,7 +86,7 @@ void IoDoStarWars(void)
|
||||||
uint time;
|
uint time;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Note score[] = { {440, 200}, {110, 200}, {440, 200}, {110, 200},
|
const struct Note score[40] = { {440, 200}, {110, 200}, {440, 200}, {110, 200},
|
||||||
{440, 200}, {110, 200}, {349, 140}, {87, 100},
|
{440, 200}, {110, 200}, {349, 140}, {87, 100},
|
||||||
{523, 60}, {87, 100}, {440, 200}, {110, 200},
|
{523, 60}, {87, 100}, {440, 200}, {110, 200},
|
||||||
{349, 140}, {87, 100}, {523, 60}, {87, 100},
|
{349, 140}, {87, 100}, {523, 60}, {87, 100},
|
||||||
|
@ -100,10 +100,10 @@ void IoDoStarWars(void)
|
||||||
|
|
||||||
//bprintf(BStdOut, "\n");
|
//bprintf(BStdOut, "\n");
|
||||||
|
|
||||||
for (uint i = 0; i < sizeof(score)/sizeof(struct Note); i++) {
|
for (uint i = 0; i < 40; i++) {
|
||||||
IoDoTone(score[i].tone, score[i].time);
|
//IoDoTone(score[i].tone, score[i].time);
|
||||||
//bprintf(BStdOut, "%d ", i);
|
bprintf(BStdOut, "%d ", score[i].time);
|
||||||
//BStdOut->flusher(BStdOut);
|
BStdOut->flusher(BStdOut);
|
||||||
}
|
}
|
||||||
IoQuietSpeaker();
|
IoQuietSpeaker();
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,24 @@ void MmInitPaging(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TEXT
|
||||||
|
if ((ulong)(i*KPAGESIZE) >= (ulong)&_text && (ulong)(i*KPAGESIZE) <= (ulong)&_text_end) {
|
||||||
|
MmPT[i] = ((ulong)(i*KPAGESIZE))| MF_PRESENT;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// RODATA
|
||||||
|
if ((ulong)(i*KPAGESIZE) >= (ulong)&_rodata && (ulong)(i*KPAGESIZE) <= (ulong)&_rodata_end) {
|
||||||
|
MmPT[i] = ((ulong)(i*KPAGESIZE)) | MF_PRESENT;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DATA
|
||||||
|
if ((ulong)(i*KPAGESIZE) >= (ulong)&_data && (ulong)(i*KPAGESIZE) <= (ulong)&_data_end) {
|
||||||
|
MmPT[i] = ((ulong)(i*KPAGESIZE)) | MF_PRESENT | MF_READWRITE;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
MmPT[i] = ((ulong)(i*KPAGESIZE)) | MF_PRESENT | MF_READWRITE;
|
MmPT[i] = ((ulong)(i*KPAGESIZE)) | MF_PRESENT | MF_READWRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +110,10 @@ void MmInitPaging(void)
|
||||||
MmPML4[0] = (ulong)(&MmPDP[0])| MF_PRESENT | MF_READWRITE;
|
MmPML4[0] = (ulong)(&MmPDP[0])| MF_PRESENT | MF_READWRITE;
|
||||||
|
|
||||||
MmLoadPML4((void *)MmPML4);
|
MmLoadPML4((void *)MmPML4);
|
||||||
|
DebugLog("Read only : %p\n", (ulong)&_text);
|
||||||
|
DebugLog("Read only : %p\n", (ulong)&_text_end);
|
||||||
|
DebugLog("Read only : %p\n", (ulong)&_rodata);
|
||||||
|
DebugLog("Read only : %p\n", (ulong)&_rodata_end);
|
||||||
//DebugLog("\tPaging tables initialized at %p, %p\n", &MmPD, &MmPT);
|
//DebugLog("\tPaging tables initialized at %p, %p\n", &MmPD, &MmPT);
|
||||||
//DebugLog("\tStack Guards at %p, %p\n", MmStackGuards[0], MmStackGuards[1]);
|
//DebugLog("\tStack Guards at %p, %p\n", MmStackGuards[0], MmStackGuards[1]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue