Zbr's days.
May
Sun Mon Tue Wed Thu Fri Sat
   
24
   
2007
Months
May

About :: TODO :: Blog :: RSS :: Old blog :: Projects :: GIT :: Gallery :: Notes

Thu, 24 May 2007

A very small progress of SuperH booting today.


I've compiled RedBoot and about to compile SuperH Linux kernel, but since I do not have Compact Flash reader I can not reflash an image, so I've stopped for now.
Tomorrow I will get a flash reader and continue, likely (unfortunately) it will not be that hard to start a linux kernel on that board, since it is well supported.

Update: SuperH kernel for Hitachi SuperH SH7751R CPU can not be compiled with SMP support. This CPU can not be put into SMP system, but it is not a reason to fail building, isn't it? There is a default config for landisk board in Linux kernel, but it is not interesting to use it, so I'm playing with own set of options.
Update2: SuperH really lacks SMP support. Check this atomic increment instruction:

static inline void atomic_add(int i, atomic_t *v)
{
	unsigned long flags;

	local_irq_save(flags);
	*(long *)v += i;
	local_irq_restore(flags);
}
And never ever use read/write locks, on SuperH it ends up with following:
static inline void __raw_read_lock(raw_rwlock_t *rw)
{
	__raw_spin_lock(&rw->lock);
	atomic_inc(&rw->counter);
	__raw_spin_unlock(&rw->lock);
}
But nevertheless I continue to try to build SMP kernel, let's see where this will end up.

Update3: SMP/locks somehow compile, but there is a problem with power management compilation - all modern SuperH CPUs support power management and there are even header files for each CPU family, but power management code uses private constants which are only defined for SuperH-3 family, while 7751 is SH-4 system, so I need to read CPU power management datasheet and probably change some bits to continue... Default config for landisk does not turn power management on.

/devel/sh :: Link / Comments (0)

Please solve this captcha to be allowed to post (need to reload in a minute): 74 + 1

Comments are closed for this story.