Damien Zammit, le sam. 04 févr. 2023 01:32:02 +, a ecrit:
> On 4/2/23 12:27, Almudena Garcia wrote:
> > But, added to interrupt stacks, the APs needs their own stacks once these
> > are running, to store data of the process which are executing.
>
> I thought this kind of stack is dynamically
On 4/2/23 12:27, Almudena Garcia wrote:
> But, added to interrupt stacks, the APs needs their own stacks once these are
> running, to store data of the process which are executing.
I thought this kind of stack is dynamically allocated by the thread manager (?)
Damien
But, added to interrupt stacks, the APs needs their own stacks once these
are running, to store data of the process which are executing.
El sáb., 4 feb. 2023 2:24, Damien Zammit escribió:
> Hi Almu,
>
> On 3/2/23 02:56, Almudena Garcia wrote:
> > I already suggested move this to a function
> >
>
Hi Almu,
On 3/2/23 02:56, Almudena Garcia wrote:
> I already suggested move this to a function
>
> +#ifndef MACH_HYP
> + /* Turn paging on.
> + * TODO: Why does setting the WP bit here cause a crash?
> + */
> + set_cr0(get_cr0() | CR0_PG /* | CR0_WP */);
> + set_cr0(get_cr0() & ~(
I already suggested move this to a function
+#ifndef MACH_HYP
+/* Turn paging on.
+ * TODO: Why does setting the WP bit here cause a crash?
+ */
+set_cr0(get_cr0() | CR0_PG /* | CR0_WP */);
+set_cr0(get_cr0() & ~(CR0_CD | CR0_NW));
+if (CPU_HAS_FEATURE(CPU_FEATURE_PGE))
+
Hello,
Damien Zammit, le mer. 01 févr. 2023 10:05:47 +, a ecrit:
> This is a rather large commit, but difficult to break it up.
Perhaps you can separate out the moving of the i386at_init code
> @@ -448,47 +444,8 @@ i386at_init(void)
>*/
> biosmem_setup();
>
> - /*
> -
+/* Turn paging on.
+ * TODO: Why does setting the WP bit here cause a crash?
+ */
+set_cr0(get_cr0() | CR0_PG /* | CR0_WP */);
+set_cr0(get_cr0() & ~(CR0_CD | CR0_NW));
+if (CPU_HAS_FEATURE(CPU_FEATURE_PGE))
+set_cr4(get_cr4() | CR4_PGE);
Check my original paging_s
This is a rather large commit, but difficult to break it up.
This also serialises the AP bringup, so paging can be enabled per cpu
one by one.
Also-by: Almudena Garcia
---
i386/i386/cpu_number.h | 2 +
i386/i386/mp_desc.c | 226
i386/i386/mp_desc.h