mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-06-07 00:04:48 +00:00
Remove APIC CPUID check, add pastel palette
This commit is contained in:
parent
19ffe0a9a2
commit
a2187525f3
Binary file not shown.
Binary file not shown.
@ -3,6 +3,6 @@ BootHDIns;
|
||||
"\n\nSuccessful?";
|
||||
if(YorN)
|
||||
{
|
||||
Once("#include\"DoDistro\";;if(DriveIsWritable){Del(\"~/Registry.CC\");OutU16(0x4004, 0x3400);}");
|
||||
Once("#include\"DoDistro\";;if(DriveIsWritable){Del(\"~/Registry.CC\");OutU16(0x4004, 0x3400);}");
|
||||
Reboot;
|
||||
}
|
||||
|
BIN
src/Kernel.BIN.C
BIN
src/Kernel.BIN.C
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -495,10 +495,6 @@ class CKernel
|
||||
#define RLF_ONCE_USER (1<<RLf_ONCE_USER)
|
||||
|
||||
#help_index "Processor"
|
||||
|
||||
//CPUID leaf flag bits
|
||||
#define CPUIDf_RDX_APIC 9
|
||||
|
||||
//Programmable Interrupt Controller
|
||||
#define PIC1 0x20
|
||||
#define PIC1_DATA 0x21
|
||||
|
@ -287,11 +287,6 @@ U0 Core0StartMP()
|
||||
CAP16BitInit *mp=MP_VECT_ADDR;
|
||||
CCPU *c;
|
||||
I64 i,my_mp_count;
|
||||
CRAXRBCRCXRDX ee;
|
||||
|
||||
CPUId(0x1,&ee);
|
||||
if (!Bt(&ee.rdx,9))
|
||||
return;
|
||||
|
||||
PUSHFD
|
||||
CLI
|
||||
@ -343,7 +338,7 @@ U0 Core0StartMP()
|
||||
}
|
||||
|
||||
//Make sure they're all up-and-running
|
||||
for (i=1;i<my_mp_count;i++)
|
||||
for (i = 1; i < my_mp_count;i++)
|
||||
while (!Bt(&cpu_structs[i].daemon_task->task_flags,TASKf_AWAITING_MESSAGE))
|
||||
PAUSE;
|
||||
|
||||
@ -353,27 +348,19 @@ U0 Core0StartMP()
|
||||
|
||||
U0 Core0Init()
|
||||
{//Called by zenith during start-up
|
||||
CRAXRBCRCXRDX ee;
|
||||
CPUId(0x1,&ee);
|
||||
|
||||
mp_count_initial=mp_count=1;
|
||||
mp_count_lock=0;
|
||||
|
||||
debug.mp_crash=ZCAlloc(sizeof(CMPCrash));
|
||||
|
||||
//Must be in code heap because init code uses 32 bit addr of cpu_struct
|
||||
zenith_task->gs=cpu_structs=
|
||||
CAlloc(sizeof(CCPU)*MP_PROCESSORS_NUM,Fs->code_heap);
|
||||
zenith_task->gs=cpu_structs=CAlloc(sizeof(CCPU)*MP_PROCESSORS_NUM,Fs->code_heap);
|
||||
CPUStructInit(0,cpu_structs,zenith_task);
|
||||
asm {//RAX has GS
|
||||
IMPORT SET_GS_BASE;
|
||||
CALL SET_GS_BASE
|
||||
}
|
||||
if (Bt(&ee.rdx,9)) {
|
||||
//Unnecessary?
|
||||
// SetMSR(IA32_LAPIC_BASE,dev.uncached_alias+LAPIC_BASE+0x900);
|
||||
MPAPICInit;
|
||||
}
|
||||
//RAX has GS
|
||||
IMPORT SET_GS_BASE;
|
||||
CALL SET_GS_BASE
|
||||
|
||||
MPAPICInit;
|
||||
}
|
||||
|
||||
interrupt U0 IntMPCrash()
|
||||
|
@ -51,5 +51,5 @@ U0 Tmp()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PaletteSetPastel;
|
||||
Tmp;
|
||||
|
Binary file not shown.
@ -67,6 +67,12 @@ public CBGR48 gr_palette_std[COLORS_NUM]={
|
||||
0x555555555555,0x55555555FFFF,0x5555FFFF5555,0x5555FFFFFFFF,
|
||||
0xFFFF55555555,0xFFFF5555FFFF,0xFFFFFFFF5555,0xFFFFFFFFFFFF};
|
||||
|
||||
public CBGR48 gr_palette_pastel[COLORS_NUM]={
|
||||
0xE8E8E8E8D3D3,0x81819797BFBF,0x1919CBCB0000,0x666687879999,
|
||||
0xCFCF6A6A4C4C,0x87878787AFAF,0xFAFAD0D07A7A,0x525252525252,
|
||||
0x888888888888,0xACACCACAFFFF,0x2323FDFD0000,0x8080BFBFAFAF,
|
||||
0xFFFF9D9D8080,0xC4C4C4C4FFFF,0xFFFFEFEFBFBF,0x151515151515};
|
||||
|
||||
public CBGR48 gr_palette_gray[COLORS_NUM]={
|
||||
0x000000000000,0x111111111111,0x222222222222,0x333333333333,
|
||||
0x444444444444,0x555555555555,0x666666666666,0x777777777777,
|
||||
@ -91,3 +97,8 @@ public U0 PaletteSetStd()
|
||||
{//Activate std palette.
|
||||
GrPaletteSet(gr_palette_std);
|
||||
}
|
||||
public U0 PaletteSetPastel()
|
||||
{//Activate std palette.
|
||||
GrPaletteSet(gr_palette_pastel);
|
||||
fp_set_std_palette=&PaletteSetPastel;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user