here are the promised comments,
thanks for your work and fixing bugs I left behind :)
+/** Disable the MMU */
+static void disable_paging(void)
+{
+ asm volatile (
+ "mrc p15, 0, r0, c1, c0, 0\n"
+ "bic r0, r0, #1\n"
+ "mcr p15, 0, r0, c1, c0, 0\n"
+ ::: "r0"
+ );
+}
I don't understand why paging needs to be disabled.
is TLB flush after setting new page tables (just like normal AS switch) not
enough?
- /*
- * Create 1:1 virtual-physical mapping in kernel space
- * (upper 2 GB), physical addresses start from 0.
- */
- /* BeagleBoard-xM (DM37x) memory starts at 2GB border,
- * thus mapping only lower 2GB is not not enough.
- * Map entire AS 1:1 instead and hope it works. */
- for (page = split_page; page < PTL0_ENTRIES; page++)
-#ifndef MACHINE_beagleboardxm
- init_ptl0_section(&boot_pt[page], page - split_page);
-#else
- init_ptl0_section(&boot_pt[page], page);
-#endif
I agree that the loop is redundant, given the bug that sets split_page to
PTL0_ENTRIES.
The bug was introduced long time ago with initial bbxm support. The problem
is that
not all devices have ram memory accessible in upper 2GB. It looks like a
pattern for am(dm) chips,
integrator cp is ok too, because there is a RAM mirror at the same location
in upper and lower 2GB.
However, gta02 should not work at all. If someone (jakub?) can confirm that
gta02 worked ok after the introduction of this bug,
and that the current problems are unrelated, we can assume there is an
(undocumented) mirror on gta02 as well.
I don't know what the best solution would be at the moment but at least a
comment/TODO would make sure that the problem not hidden.
--- kernel/arch/arm32/_link.ld.in 2012-07-14 11:18:40 +0000
+++ kernel/arch/arm32/_link.ld.in 2013-01-26 09:05:12 +0000
@@ -10,6 +10,8 @@
#define KERNEL_LOAD_ADDRESS 0xb0a08000
#elif defined MACHINE_beagleboardxm
#define KERNEL_LOAD_ADDRESS 0x80a00000
+#elif define MACHINE_beaglebone
+#define KERNEL_LOAD_ADDRESS 0x80a00000
typo, should be probably define-d-.
kernel/genarch/include/drivers/am335x/ctrl_module_regs.h:
I don't understand why the ctrl module register access is different from
all the other drivers added.
Do you plan to convert it, or does it need this format for some reason?
you use arbitrary constant values in few places (I do too :), it might be
better to switch them to defines.
If these things are just leftovers, cleanup/conversion might be a good
thing for a newcomer to work on, so adding few TODOs would be helpful.
it's good to see that adding support for a new board was mainly drivers and
bugfixes.
jan
On Sun, Feb 24, 2013 at 11:13 AM, Ján Veselý <[email protected]> wrote:
>
>
>
> On Sat, Feb 23, 2013 at 9:04 PM, Maurizio Lombardi <[email protected]
> > wrote:
>
>> On Sat, Feb 23, 2013 at 03:43:15PM +0100, Ján Veselý wrote:
>> >
>> > I planned to have a look but had no time. I'll ask questions as I go
>> > through the code later.
>>
>> I'll postpone the merge in mainline then.
>>
>
> no that was not the intent. I don't know when I'll get to do it, just go
> ahead.
> sry for the confusion
>
> jan
>
>>
>> ----
>> Maurizio Lombardi
>>
>> _______________________________________________
>> HelenOS-devel mailing list
>> [email protected]
>> http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
>>
>
>
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel