Initial checkin for supermicro p4dc6

This also includes a bunch of my pending work including
- Updated serial code so we can compile in different serial port speeds
- Updates to the build system so that:
  - Makefile.settings holds all of the settings of the config variables
  - ldoptions and cpuflags are generated automatically with perl scripts
  - src/config/Config holds all of the architecture neutral make file settings
- Initial work on the P4 including how to use cache as ram
- Update to the ioapic code for the P4 because it delivers irqs on the system
  bus instead of an out of band bus
- Updated version of printf that doesn't need an intermediate buffer
  - logbuf_subr now handles the case when we want to use a log buffer
- video_subr handles the preliminary code for writing to a video device.
- Pending changes for the L440GX are merged in as well (hopefully I haven't
  messed then up since they were written).
This commit is contained in:
Eric W. Biederman 2001-11-03 02:11:49 +00:00
commit a8151ba2cd
53 changed files with 2071 additions and 351 deletions

View file

@ -8,41 +8,50 @@
#define SIO_INDEX SIO_BASE
#define SIO_DATA SIO_BASE+1
#define SIO_SYSTEM_CLK_INPUT_48MHZ (1<<6)
#define SIO_SYSTEM_CLK_INPUT_24MHZ (0<<6)
#if defined(SIO_SYSTEM_CLK_INPUT)
#if (SIO_SYSTEM_CLK_INPUT != SIO_SYSTEM_CLK_INPUT_48MHZ) && (SIO_SYSTEM_CLK_INPUT != SIO_SYSTEM_CLK_INPUT_24MHZ)
#error BAD SIO_SYSTEM_CLK_INPUT_PARAMETER
#endif
#endif
#define SIO_COM1_DEVICE 2
#define SIO_ENTER_PNP_MODE() \
movw $SIO_BASE, %dx ; \
movb $0x87, %al ; \
outb %al, %dx ; \
outb %al, %dx
movb $0x87, %al ; \
outb %al, $(SIO_BASE) ; \
outb %al, $(SIO_BASE)
#define SIO_EXIT_PNP_MODE() \
movw $SIO_BASE, %dx ; \
movb $0xaa, %al ; \
outb %al, %dx
movb $0xaa, %al ; \
outb %al, $(SIO_BASE)
#define SIO_WRITE_CONFIG(value, reg) \
movw $SIO_BASE, %dx ; \
movb $reg, %al ; \
outb %al, %dx ; \
incw %dx ; \
movb $value, %al ; \
outb %al, %dx
movb $reg, %al ; \
outb %al, $(SIO_INDEX) ; \
movb $value, %al ; \
outb %al, $(SIO_DATA)
#define SIO_READ_CONFIG(value, reg) \
movw $SIO_BASE, %dx ; \
movb $reg, %al ; \
outb %al, %dx ; \
incw %dx ; \
inb %al, %dx
movb $reg, %al ; \
outb %al, $(SIO_INDEX) ; \
inb %al, $(SIO_DATA)
#define SIO_SET_LOGICAL_DEVICE(device) \
SIO_WRITE_CONFIG(device, 0x07)
/* enable serial 1 */
/* Enable pnp */
SIO_ENTER_PNP_MODE()
#if defined(SIO_SYSTEM_CLK_INPUT)
/* Setup up the clock input */
SIO_WRITE_CONFIG(0x84 | SIO_SYSTEM_CLK_INPUT), 0x24)
#endif
/* enable serial 1 */
SIO_SET_LOGICAL_DEVICE(SIO_COM1_DEVICE)
SIO_WRITE_CONFIG(1, 0x30)
SIO_WRITE_CONFIG(0x3, 0x60)

View file

@ -249,8 +249,6 @@ static void enable_devices(struct superio *sio)
setup_acpi_registers(sio);
#endif
// what's this.
write_config(sio, 1, 0x30);
exit_pnp(sio);
}