[coreboot] [PATCH] Factor out common CAR asm snippets

Rudolf Marek r.marek at assembler.cz
Tue Oct 5 13:05:01 CEST 2010


> Alternatively, we could say that all "function" calls in pre-CAR state
> destroy all registers as a kind of pseudo-calling convention.

You cant you need to save BIST somewhere.

Please can we leave the only assembly code in coreboot alone? I think there are 
other places which needs to get improved.

Like for example review the SB700 code and check if everything is
ok. I started to fix the Windows7 boot and immediately lot of skeletons
fall off the closet (yes the little bug in SB700 mentioned in another thread is 
small example) I don't want to hijack this thread with details but a lot of time 
could be invested to do the code review with datasheet at hand to see
if the code is doing what is written in the comments and programming 
requirements. Which I think is more needed than fixing code which works.

Small examples:

/* Features Enable */
pci_write_config32(dev, 0x64, 0x829E79BF); /* bit10: Enables the HPET interrupt. */

Oh yeah we enable SMI for USB and USB IR12 stuff strange huh?

->/* Don't rename APIC ID */
<------>/* TODO: We should call setup_ioapic() here. But kernel hangs if cpu is K8.
<------> * We need to check out why and change back. */
<------>clear_ioapic(ioapic_base);

it talks for itself...

<------>/* IRQ0From8254 */
<------>byte = pci_read_config8(dev, 0x41);
<------>byte &= ~(1 << 7);
<------>pci_write_config8(dev, 0x41, byte);

Actually anyone idea about this? Not found in datasheet.


---->/* rrg:K8 INTR Enable (BIOS should set this bit after PIC initialization) */
Oh yeah we should init i8259....

Please note that this is just little drop while I started to LOOK into this, 
probably it is much worse. Lets get to something more productive shall we?

Thanks,
Rudolf




More information about the coreboot mailing list