* [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
@ 2008-10-23 14:05 Gleb Natapov
2008-10-23 14:05 ` [PATCH 1/8] Move PIC initialization out of line to save space in post code area Gleb Natapov
` (9 more replies)
0 siblings, 10 replies; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
Hello,
This patch series adds S3 (suspend to RAM) ACPI state. Most changes
are in the BIOS code and concern themselves with preventing BIOS from
using memory available to OS.
---
Gleb Natapov (8):
Don't power down vga card on entering S3 state.
Add DPMS support to cirrus vga bios.
Don't use unreserved memory in BIOS.
Execute rombios32 code from rom address 0xe0000.
Disable init of SMM.
Add S3 state to DSDT. Handle resume event in the BIOS.
Handle suspend in qemu.
Move PIC initialization out of line to save space in post code area.
bios/Makefile | 1
bios/acpi-dsdt.dsl | 49 +++++++++++++++++++----
bios/rombios.c | 106 ++++++++++++++++++++++++++++++-------------------
bios/rombios.h | 4 +-
bios/rombios32.c | 78 +++++++++++++++++++++++++++++++++---
bios/rombios32.ld | 8 +---
bios/rombios32start.S | 9 ++++
qemu/hw/acpi.c | 10 +++++
qemu/hw/pc.c | 8 ++++
qemu/hw/pc.h | 1
qemu/qemu-kvm.c | 2 -
qemu/qemu-kvm.h | 1
vgabios/clext.c | 36 ++++++++++++++++-
13 files changed, 247 insertions(+), 66 deletions(-)
--
Gleb.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/8] Move PIC initialization out of line to save space in post code area.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-23 14:05 ` [PATCH 2/8] Handle suspend in qemu Gleb Natapov
` (8 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
There are only a couple of bytes left.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
bios/rombios.c | 48 ++++++++++++++++++++++++++----------------------
1 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/bios/rombios.c b/bios/rombios.c
index 818ce63..529f3bd 100644
--- a/bios/rombios.c
+++ b/bios/rombios.c
@@ -10294,6 +10294,31 @@ post_enable_cache:
mov cr0, eax
jmp post_enable_cache_done
+post_init_pic:
+ mov al, #0x11 ; send initialisation commands
+ out 0x20, al
+ out 0xa0, al
+ mov al, #0x08
+ out 0x21, al
+ mov al, #0x70
+ out 0xa1, al
+ mov al, #0x04
+ out 0x21, al
+ mov al, #0x02
+ out 0xa1, al
+ mov al, #0x01
+ out 0x21, al
+ out 0xa1, al
+ mov al, #0xb8
+ out 0x21, AL ;master pic: unmask IRQ 0, 1, 2, 6
+#if BX_USE_PS2_MOUSE
+ mov al, #0x8f
+#else
+ mov al, #0x9f
+#endif
+ out 0xa1, AL ;slave pic: unmask IRQ 12, 13, 14
+ ret
+
;; the following area can be used to write dynamically generated tables
.align 16
bios_table_area_start:
@@ -10557,28 +10582,7 @@ post_default_ints:
SET_INT_VECTOR(0x10, #0xF000, #int10_handler)
;; PIC
- mov al, #0x11 ; send initialisation commands
- out 0x20, al
- out 0xa0, al
- mov al, #0x08
- out 0x21, al
- mov al, #0x70
- out 0xa1, al
- mov al, #0x04
- out 0x21, al
- mov al, #0x02
- out 0xa1, al
- mov al, #0x01
- out 0x21, al
- out 0xa1, al
- mov al, #0xb8
- out 0x21, AL ;master pic: unmask IRQ 0, 1, 2, 6
-#if BX_USE_PS2_MOUSE
- mov al, #0x8f
-#else
- mov al, #0x9f
-#endif
- out 0xa1, AL ;slave pic: unmask IRQ 12, 13, 14
+ call post_init_pic
mov cx, #0xc000 ;; init vga bios
mov ax, #0xc780
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/8] Handle suspend in qemu.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
2008-10-23 14:05 ` [PATCH 1/8] Move PIC initialization out of line to save space in post code area Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-23 14:05 ` [PATCH 3/8] Add S3 state to DSDT. Handle resume event in the BIOS Gleb Natapov
` (7 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
qemu/hw/acpi.c | 10 ++++++++++
qemu/hw/pc.c | 8 ++++++++
qemu/hw/pc.h | 1 +
qemu/qemu-kvm.c | 2 +-
qemu/qemu-kvm.h | 1 +
5 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c
index 7a7a534..e6494c5 100644
--- a/qemu/hw/acpi.c
+++ b/qemu/hw/acpi.c
@@ -56,6 +56,8 @@ typedef struct PIIX4PMState {
qemu_irq irq;
} PIIX4PMState;
+#define RSM_STS (1 << 15)
+#define PWRBTN_STS (1 << 8)
#define RTC_EN (1 << 10)
#define PWRBTN_EN (1 << 8)
#define GBL_EN (1 << 5)
@@ -154,6 +156,14 @@ static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val)
case 0: /* soft power off */
qemu_system_shutdown_request();
break;
+ case 1:
+ /* RSM_STS should be set on resume. Pretend that resume
+ was caused by power button */
+ s->pmsts |= (RSM_STS | PWRBTN_STS);
+ kvm_shutdown(NULL, 0);
+#if defined(TARGET_I386)
+ cmos_set_s3_resume();
+#endif
default:
break;
}
diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
index d559f0c..37d013e 100644
--- a/qemu/hw/pc.c
+++ b/qemu/hw/pc.c
@@ -1183,6 +1183,14 @@ static void pc_init_isa(ram_addr_t ram_size, int vga_ram_size,
initrd_filename, 0, cpu_model);
}
+/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE)
+ BIOS will read it and start S3 resume at POST Entry */
+void cmos_set_s3_resume(void)
+{
+ if (rtc_state)
+ rtc_set_memory(rtc_state, 0xF, 0xFE);
+}
+
QEMUMachine pc_machine = {
.name = "pc",
.desc = "Standard PC",
diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h
index 1f63678..af9071a 100644
--- a/qemu/hw/pc.h
+++ b/qemu/hw/pc.h
@@ -85,6 +85,7 @@ RTCState *rtc_init(int base, qemu_irq irq);
RTCState *rtc_mm_init(target_phys_addr_t base, int it_shift, qemu_irq irq);
void rtc_set_memory(RTCState *s, int addr, int val);
void rtc_set_date(RTCState *s, const struct tm *tm);
+void cmos_set_s3_resume(void);
/* pc.c */
extern int fd_bootchk;
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index c5f3f29..80cdb40 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -721,7 +721,7 @@ static int kvm_halt(void *opaque, int vcpu)
return kvm_arch_halt(opaque, vcpu);
}
-static int kvm_shutdown(void *opaque, int vcpu)
+int kvm_shutdown(void *opaque, int vcpu)
{
/* stop the current vcpu from going back to guest mode */
vcpu_info[cpu_single_env->cpu_index].stopped = 1;
diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h
index a1d6646..f5b530c 100644
--- a/qemu/qemu-kvm.h
+++ b/qemu/qemu-kvm.h
@@ -72,6 +72,7 @@ void kvm_arch_update_regs_for_sipi(CPUState *env);
void kvm_arch_cpu_reset(CPUState *env);
CPUState *qemu_kvm_cpu_env(int index);
+int kvm_shutdown(void *opaque, int vcpu);
void qemu_kvm_aio_wait_start(void);
void qemu_kvm_aio_wait(void);
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/8] Add S3 state to DSDT. Handle resume event in the BIOS.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
2008-10-23 14:05 ` [PATCH 1/8] Move PIC initialization out of line to save space in post code area Gleb Natapov
2008-10-23 14:05 ` [PATCH 2/8] Handle suspend in qemu Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-26 14:58 ` Avi Kivity
2008-10-23 14:05 ` [PATCH 4/8] Disable init of SMM Gleb Natapov
` (6 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
bios/acpi-dsdt.dsl | 33 ++++++++++++++++++-----
bios/rombios.c | 35 +++++++++++++++++++++++++
bios/rombios32.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++----
3 files changed, 130 insertions(+), 12 deletions(-)
diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl
index 577b3fe..02f53a1 100755
--- a/bios/acpi-dsdt.dsl
+++ b/bios/acpi-dsdt.dsl
@@ -65,6 +65,32 @@ DefinitionBlock (
gen_processor(14, E)
}
+ /*
+ * S3 (suspend-to-ram), S4 (suspend-to-disc) and S5 (power-off) type codes:
+ * must match piix4 emulation.
+ */
+ Name (\_S3, Package (0x04)
+ {
+ 0x01, /* PM1a_CNT.SLP_TYP */
+ 0x01, /* PM1b_CNT.SLP_TYP */
+ Zero, /* reserved */
+ Zero /* reserved */
+ })
+ Name (\_S4, Package (0x04)
+ {
+ Zero, /* PM1a_CNT.SLP_TYP */
+ Zero, /* PM1b_CNT.SLP_TYP */
+ Zero, /* reserved */
+ Zero /* reserved */
+ })
+ Name (\_S5, Package (0x04)
+ {
+ Zero, /* PM1a_CNT.SLP_TYP */
+ Zero, /* PM1b_CNT.SLP_TYP */
+ Zero, /* reserved */
+ Zero /* reserved */
+ })
+
Scope (\)
{
/* Debug Output */
@@ -626,13 +652,6 @@ DefinitionBlock (
}
}
- /* S5 = power off state */
- Name (_S5, Package (4) {
- 0x00, // PM1a_CNT.SLP_TYP
- 0x00, // PM2a_CNT.SLP_TYP
- 0x00, // reserved
- 0x00, // reserved
- })
Scope (\_GPE)
{
diff --git a/bios/rombios.c b/bios/rombios.c
index 529f3bd..5c75043 100644
--- a/bios/rombios.c
+++ b/bios/rombios.c
@@ -2198,6 +2198,32 @@ debugger_off()
outb(0xfedc, 0x00);
}
+void
+s3_resume()
+{
+ Bit32u s3_wakeup_vector;
+ Bit8u s3_resume_flag;
+
+ s3_resume_flag = read_byte(0x40, 0xb0);
+ s3_wakeup_vector = read_dword(0x40, 0xb2);
+
+ BX_INFO("S3 resume called %x 0x%lx\n", s3_resume_flag, s3_wakeup_vector);
+ if (s3_resume_flag != 0xFE || !s3_wakeup_vector)
+ return;
+
+ write_byte(0x40, 0xb0, 0);
+
+ /* setup wakeup vector */
+ write_word(0x40, 0xb6, (s3_wakeup_vector & 0xF)); /* IP */
+ write_word(0x40, 0xb8, (s3_wakeup_vector >> 4)); /* CS */
+
+ BX_INFO("S3 resume jump to %x:%x\n", *(Bit16u*)0x04b8, *(Bit16u*)0x04b6);
+ASM_START
+ mov sp, #0 ;; disable tpr patching on boot CPU
+ jmpf [0x04b6]
+ASM_END
+}
+
#if BX_USE_ATADRV
// ---------------------------------------------------------------------------
@@ -10036,6 +10062,10 @@ rombios32_05:
;; init the stack pointer
mov esp, #0x00080000
+ ;; pass pointer to s3_resume_flag and s3_resume_vector to rombios32
+ push #0x04b0
+ push #0x04b2
+
;; call rombios32 code
mov eax, #0x00040000
call eax
@@ -10424,6 +10454,9 @@ normal_post:
rep
stosw
+ ;; Save shutdown status
+ mov 0x04b0, bl
+
call _log_bios_start
;; set all interrupts to default handler
@@ -10634,6 +10667,8 @@ post_default_ints:
mov ax, #0xe000
call rom_scan
+ call _s3_resume
+
#if BX_ELTORITO_BOOT
call _interactive_bootkey
#endif // BX_ELTORITO_BOOT
diff --git a/bios/rombios32.c b/bios/rombios32.c
index a91b155..3833878 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -213,6 +213,20 @@ void *memmove(void *d1, const void *s1, size_t len)
return d1;
}
+int memcmp(const void *s1, const void *s2, size_t len)
+{
+ const int8_t *p1 = s1;
+ const int8_t *p2 = s2;
+
+ while (len--) {
+ int r = *p1++ - *p2++;
+ if(r)
+ return r;
+ }
+
+ return 0;
+}
+
size_t strlen(const char *s)
{
const char *s1;
@@ -568,7 +582,6 @@ void ram_probe(void)
ebda_cur_addr = ((*(uint16_t *)(0x40e)) << 4) + 0x380;
BX_INFO("ebda_cur_addr: 0x%08lx\n", ebda_cur_addr);
#endif
- setup_mtrr();
}
/****************************************************/
@@ -756,7 +769,7 @@ static void bios_shadow_init(PCIDevice *d)
{
int v;
- if (find_bios_table_area() < 0)
+ if (bios_table_cur_addr == 0)
return;
/* remap the BIOS to shadow RAM an keep it read/write while we
@@ -1528,7 +1541,7 @@ void acpi_bios_init(void)
memset(facs, 0, sizeof(*facs));
memcpy(facs->signature, "FACS", 4);
facs->length = cpu_to_le32(sizeof(*facs));
-
+ BX_INFO("Firmware waking vector %p\n", &facs->firmware_waking_vector);
/* DSDT */
memcpy(dsdt, AmlCode, sizeof(AmlCode));
@@ -2099,9 +2112,40 @@ void smbios_init(void)
BX_INFO("SMBIOS table addr=0x%08lx\n", (unsigned long)start);
}
-void rombios32_init(void)
+static uint32_t find_resume_vector(void)
+{
+ unsigned long addr;
+
+ if (bios_table_cur_addr == 0)
+ return 0;
+
+ for (addr = bios_table_cur_addr; addr < bios_table_end_addr; addr++) {
+ if (!memcmp((void*)addr, "RSD PTR ", 8)) {
+ struct rsdp_descriptor *rsdp = (void*)addr;
+ struct rsdt_descriptor_rev1 *rsdt = (void*)rsdp->rsdt_physical_address;
+ struct fadt_descriptor_rev1 *fadt = (void*)rsdt->table_offset_entry[0];
+ struct facs_descriptor_rev1 *facs = (void*)fadt->firmware_ctrl;
+ return facs->firmware_waking_vector;
+ }
+ }
+
+ return 0;
+}
+
+static void find_440fx(PCIDevice *d)
{
- BX_INFO("Starting rombios32\n");
+ uint16_t vendor_id, device_id;
+
+ vendor_id = pci_config_readw(d, PCI_VENDOR_ID);
+ device_id = pci_config_readw(d, PCI_DEVICE_ID);
+
+ if (vendor_id == 0x8086 && device_id == 0x1237)
+ i440_pcidev = *d;
+}
+
+void rombios32_init(uint32_t *s3_resume_vector, uint8_t *shutdown_flag)
+{
+ BX_INFO("Starting rombios32 %p %p %x\n", s3_resume_vector, shutdown_flag, *shutdown_flag);
init_smp_msrs();
@@ -2111,10 +2155,30 @@ void rombios32_init(void)
ram_probe();
+ setup_mtrr();
+
cpu_probe();
smp_probe();
+ if (find_bios_table_area() < 0)
+ return;
+
+ if (*shutdown_flag == 0xfe) {
+ *s3_resume_vector = find_resume_vector();
+ if (!*s3_resume_vector) {
+ BX_INFO("This is S3 resume but wakeup vector is NULL\n");
+ } else {
+ BX_INFO("S3 resume vector %p\n", *s3_resume_vector);
+ /* redirect bios read access to RAM */
+ pci_for_each_device(find_440fx);
+ bios_lock_shadow_ram(); /* bios is already copied */
+ return;
+ }
+ }
+
+ uuid_probe();
+
pci_bios_init();
if (bios_table_cur_addr != 0) {
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/8] Disable init of SMM.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
` (2 preceding siblings ...)
2008-10-23 14:05 ` [PATCH 3/8] Add S3 state to DSDT. Handle resume event in the BIOS Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-23 14:05 ` [PATCH 5/8] Execute rombios32 code from rom address 0xe0000 Gleb Natapov
` (5 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
SMM initialization uses memory available for OS use.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
bios/rombios32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bios/rombios32.c b/bios/rombios32.c
index 3833878..2c08bfb 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -38,7 +38,7 @@ typedef unsigned long long uint64_t;
//#define BX_USE_EBDA_TABLES
/* define it if the (emulated) hardware supports SMM mode */
-#define BX_USE_SMM
+//#define BX_USE_SMM
#define cpuid(index, eax, ebx, ecx, edx) \
asm volatile ("cpuid" \
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/8] Execute rombios32 code from rom address 0xe0000.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
` (3 preceding siblings ...)
2008-10-23 14:05 ` [PATCH 4/8] Disable init of SMM Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-23 14:05 ` [PATCH 6/8] Don't use unreserved memory in BIOS Gleb Natapov
` (4 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
bios/Makefile | 1 +
bios/rombios.c | 17 +----------------
bios/rombios32.ld | 8 +++-----
bios/rombios32start.S | 9 ++++++++-
4 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/bios/Makefile b/bios/Makefile
index 48022ea..f3f2758 100644
--- a/bios/Makefile
+++ b/bios/Makefile
@@ -106,6 +106,7 @@ rombios32.o: rombios32.c acpi-dsdt.hex
acpi-dsdt.hex: acpi-dsdt.dsl
cpp -P $< $<.i
iasl -tc -p $@ $<.i
+ sed -i -e's/^unsigned/const unsigned/' $@
rm $<.i
rombios32start.o: rombios32start.S
diff --git a/bios/rombios.c b/bios/rombios.c
index 5c75043..340af30 100644
--- a/bios/rombios.c
+++ b/bios/rombios.c
@@ -10052,13 +10052,6 @@ rombios32_05:
mov gs, ax
cld
- ;; copy rombios32 code to ram (ram offset = 1MB)
- mov esi, #0xfffe0000
- mov edi, #0x00040000
- mov ecx, #0x10000 / 4
- rep
- movsd
-
;; init the stack pointer
mov esp, #0x00080000
@@ -10067,17 +10060,9 @@ rombios32_05:
push #0x04b2
;; call rombios32 code
- mov eax, #0x00040000
+ mov eax, #0x000e0000
call eax
- ;; reset the memory (some boot loaders such as syslinux suppose
- ;; that the memory is set to zero)
- mov edi, #0x00040000
- mov ecx, #0x40000 / 4
- xor eax, eax
- rep
- stosd
-
;; return to 16 bit protected mode first
db 0xea
dd rombios32_10
diff --git a/bios/rombios32.ld b/bios/rombios32.ld
index 4f8fcc3..c334225 100644
--- a/bios/rombios32.ld
+++ b/bios/rombios32.ld
@@ -3,18 +3,16 @@ OUTPUT_ARCH(i386)
ENTRY(_start);
SECTIONS
{
- . = 0x00040000;
+ . = 0x000e0000;
.text : { *(.text) }
.rodata : { *(.rodata) }
. = ALIGN(64);
fixup_start = .;
.fixup : { *(.fixup) }
fixup_end = .;
- . = ALIGN(4096);
- .data : { *(.data) }
- __bss_start = . ;
- .bss : { *(.bss) *(COMMON) }
_end = . ;
+ .data 0x700 : AT (_end) { __data_start = .; *(.data); __data_end = .;}
+ .bss : { __bss_start = .; *(.bss) *(COMMON); __bss_end = .;}
/DISCARD/ : { *(.stab)
*(.stabstr)
*(.comment)
diff --git a/bios/rombios32start.S b/bios/rombios32start.S
index 4dcee3a..449a5db 100644
--- a/bios/rombios32start.S
+++ b/bios/rombios32start.S
@@ -32,10 +32,17 @@ _start:
/* clear bss section */
xor %eax, %eax
mov $__bss_start, %edi
- mov $_end, %ecx
+ mov $__bss_end, %ecx
sub %edi, %ecx
rep stosb
+ /* copy data section */
+ mov $_end, %esi
+ mov $__data_start, %edi
+ mov $__data_end, %ecx
+ sub %edi, %ecx
+ rep movsb
+
jmp rombios32_init
.code16
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/8] Don't use unreserved memory in BIOS.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
` (4 preceding siblings ...)
2008-10-23 14:05 ` [PATCH 5/8] Execute rombios32 code from rom address 0xe0000 Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-23 14:05 ` [PATCH 7/8] Add DPMS support to cirrus vga bios Gleb Natapov
` (3 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
Use only first page and last page of low memory. OSes assumes that first
page is used by bios and last page is reserved in e820 map.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
bios/rombios.c | 6 +++---
bios/rombios.h | 4 ++--
bios/rombios32.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/bios/rombios.c b/bios/rombios.c
index 340af30..01f9cbb 100644
--- a/bios/rombios.c
+++ b/bios/rombios.c
@@ -4551,7 +4551,7 @@ ASM_END
{
case 0:
set_e820_range(ES, regs.u.r16.di,
- 0x0000000L, 0x0009fc00L, 0, 0, 1);
+ 0x0000000L, 0x0009f000L, 0, 0, 1);
regs.u.r32.ebx = 1;
regs.u.r32.eax = 0x534D4150;
regs.u.r32.ecx = 0x14;
@@ -4560,7 +4560,7 @@ ASM_END
break;
case 1:
set_e820_range(ES, regs.u.r16.di,
- 0x0009fc00L, 0x000a0000L, 0, 0, 2);
+ 0x0009f000L, 0x000a0000L, 0, 0, 2);
regs.u.r32.ebx = 2;
regs.u.r32.eax = 0x534D4150;
regs.u.r32.ecx = 0x14;
@@ -10053,7 +10053,7 @@ rombios32_05:
cld
;; init the stack pointer
- mov esp, #0x00080000
+ mov esp, #0x9fbf0
;; pass pointer to s3_resume_flag and s3_resume_vector to rombios32
push #0x04b0
diff --git a/bios/rombios.h b/bios/rombios.h
index feed101..3784744 100644
--- a/bios/rombios.h
+++ b/bios/rombios.h
@@ -56,8 +56,8 @@
#define ACPI_DATA_SIZE 0x00010000L
#define PM_IO_BASE 0xb000
#define SMB_IO_BASE 0xb100
-#define CPU_COUNT_ADDR 0xf000
-#define SMP_MSR_ADDR 0xf010
+#define CPU_COUNT_ADDR 0x0500
+#define SMP_MSR_ADDR 0x0504
#define MAX_CPUS 16
diff --git a/bios/rombios32.c b/bios/rombios32.c
index 2c08bfb..a901c6a 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -60,7 +60,7 @@ typedef unsigned long long uint64_t;
#define APIC_ENABLED 0x0100
-#define AP_BOOT_ADDR 0x10000
+#define AP_BOOT_ADDR 0x9f000
#define MPTABLE_MAX_SIZE 0x00002000
#define SMI_CMD_IO_ADDR 0xb2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 7/8] Add DPMS support to cirrus vga bios.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
` (5 preceding siblings ...)
2008-10-23 14:05 ` [PATCH 6/8] Don't use unreserved memory in BIOS Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-23 14:05 ` [PATCH 8/8] Don't power down vga card on entering S3 state Gleb Natapov
` (2 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
vgabios/clext.c | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/vgabios/clext.c b/vgabios/clext.c
index ea37ec5..c7a2ad0 100644
--- a/vgabios/clext.c
+++ b/vgabios/clext.c
@@ -510,7 +510,7 @@ cirrus_vesa:
#ifdef CIRRUS_DEBUG
call cirrus_debug_dump
#endif
- cmp al, #0x0F
+ cmp al, #0x10
ja cirrus_vesa_not_handled
push bx
xor bx, bx
@@ -1196,6 +1196,37 @@ cirrus_vesa_07h_2:
mov ax, #0x004f
ret
+cirrus_vesa_10h:
+ cmp bl, #0x00
+ jne cirrus_vesa_10h_01
+ mov bx, #0x0f30
+ mov ax, #0x004f
+ ret
+cirrus_vesa_10h_01:
+ cmp bl, #0x01
+ jne cirrus_vesa_10h_02
+ push dx
+ push ds
+ mov dx, #0x40
+ mov ds, dx
+ mov [0xb9], bh
+ pop ds
+ pop dx
+ mov ax, #0x004f
+ ret
+cirrus_vesa_10h_02:
+ cmp bl, #0x02
+ jne cirrus_vesa_unimplemented
+ push dx
+ push ds
+ mov dx, #0x40
+ mov ds, dx
+ mov bh, [0xb9]
+ pop ds
+ pop dx
+ mov ax, #0x004f
+ ret
+
cirrus_vesa_unimplemented:
mov ax, #0x014F ;; not implemented
ret
@@ -1612,7 +1643,8 @@ cirrus_vesa_handlers:
dw cirrus_vesa_unimplemented
dw cirrus_vesa_unimplemented
dw cirrus_vesa_unimplemented
-
+ ;; 10h
+ dw cirrus_vesa_10h
ASM_END
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 8/8] Don't power down vga card on entering S3 state.
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
` (6 preceding siblings ...)
2008-10-23 14:05 ` [PATCH 7/8] Add DPMS support to cirrus vga bios Gleb Natapov
@ 2008-10-23 14:05 ` Gleb Natapov
2008-10-23 15:45 ` Anthony Liguori
2008-10-23 16:12 ` [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Anthony Liguori
2008-10-23 22:04 ` Sebastian Herbszt
9 siblings, 1 reply; 18+ messages in thread
From: Gleb Natapov @ 2008-10-23 14:05 UTC (permalink / raw)
To: kvm
This is needed to fool windows to enter S3. The trick works for XP and
Windows2003, but Vista still refuse to allow S3.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
bios/acpi-dsdt.dsl | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl
index 02f53a1..84af8f1 100755
--- a/bios/acpi-dsdt.dsl
+++ b/bios/acpi-dsdt.dsl
@@ -263,6 +263,22 @@ DefinitionBlock (
Scope(\_SB.PCI0) {
+ Device (VGA) {
+ Name (_ADR, 0x00020000)
+ Method (_S1D, 0, NotSerialized)
+ {
+ Return (0x00)
+ }
+ Method (_S2D, 0, NotSerialized)
+ {
+ Return (0x00)
+ }
+ Method (_S3D, 0, NotSerialized)
+ {
+ Return (0x00)
+ }
+ }
+
/* PIIX3 ISA bridge */
Device (ISA) {
Name (_ADR, 0x00010000)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 8/8] Don't power down vga card on entering S3 state.
2008-10-23 14:05 ` [PATCH 8/8] Don't power down vga card on entering S3 state Gleb Natapov
@ 2008-10-23 15:45 ` Anthony Liguori
0 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2008-10-23 15:45 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
Gleb Natapov wrote:
> This is needed to fool windows to enter S3. The trick works for XP and
> Windows2003, but Vista still refuse to allow S3.
>
This is because the Cirrus VGA card does not support suspend? That's
what you mean by "fooling", correct?
What about std-vga?
Regards,
Anthony Liguori
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> ---
>
> bios/acpi-dsdt.dsl | 16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl
> index 02f53a1..84af8f1 100755
> --- a/bios/acpi-dsdt.dsl
> +++ b/bios/acpi-dsdt.dsl
> @@ -263,6 +263,22 @@ DefinitionBlock (
>
> Scope(\_SB.PCI0) {
>
> + Device (VGA) {
> + Name (_ADR, 0x00020000)
> + Method (_S1D, 0, NotSerialized)
> + {
> + Return (0x00)
> + }
> + Method (_S2D, 0, NotSerialized)
> + {
> + Return (0x00)
> + }
> + Method (_S3D, 0, NotSerialized)
> + {
> + Return (0x00)
> + }
> + }
> +
> /* PIIX3 ISA bridge */
> Device (ISA) {
> Name (_ADR, 0x00010000)
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
` (7 preceding siblings ...)
2008-10-23 14:05 ` [PATCH 8/8] Don't power down vga card on entering S3 state Gleb Natapov
@ 2008-10-23 16:12 ` Anthony Liguori
2008-10-23 16:38 ` Avi Kivity
[not found] ` <20081023173748.GA13097@redhat.com>
2008-10-23 22:04 ` Sebastian Herbszt
9 siblings, 2 replies; 18+ messages in thread
From: Anthony Liguori @ 2008-10-23 16:12 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
Hi Gleb,
Gleb Natapov wrote:
> Hello,
>
> This patch series adds S3 (suspend to RAM) ACPI state. Most changes
> are in the BIOS code and concern themselves with preventing BIOS from
> using memory available to OS.
>
I thought you initially sent this to qemu-devel. Any reason not to push
this through QEMU instead of in KVM?
Regards,
Anthony Liguori
> ---
>
> Gleb Natapov (8):
> Don't power down vga card on entering S3 state.
> Add DPMS support to cirrus vga bios.
> Don't use unreserved memory in BIOS.
> Execute rombios32 code from rom address 0xe0000.
> Disable init of SMM.
> Add S3 state to DSDT. Handle resume event in the BIOS.
> Handle suspend in qemu.
> Move PIC initialization out of line to save space in post code area.
>
>
> bios/Makefile | 1
> bios/acpi-dsdt.dsl | 49 +++++++++++++++++++----
> bios/rombios.c | 106 ++++++++++++++++++++++++++++++-------------------
> bios/rombios.h | 4 +-
> bios/rombios32.c | 78 +++++++++++++++++++++++++++++++++---
> bios/rombios32.ld | 8 +---
> bios/rombios32start.S | 9 ++++
> qemu/hw/acpi.c | 10 +++++
> qemu/hw/pc.c | 8 ++++
> qemu/hw/pc.h | 1
> qemu/qemu-kvm.c | 2 -
> qemu/qemu-kvm.h | 1
> vgabios/clext.c | 36 ++++++++++++++++-
> 13 files changed, 247 insertions(+), 66 deletions(-)
>
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
2008-10-23 16:12 ` [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Anthony Liguori
@ 2008-10-23 16:38 ` Avi Kivity
2008-10-23 18:17 ` Anthony Liguori
[not found] ` <20081023173748.GA13097@redhat.com>
1 sibling, 1 reply; 18+ messages in thread
From: Avi Kivity @ 2008-10-23 16:38 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Gleb Natapov, kvm
Anthony Liguori wrote:
>
> I thought you initially sent this to qemu-devel. Any reason not to
> push this through QEMU instead of in KVM?
>
Since it requires bios changes, it is basically unpushable to qemu. It
may also depend on existing kvm bios and acpi changes.
If it is possible to do this via qemu, of course I much prefer that route.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
2008-10-23 16:38 ` Avi Kivity
@ 2008-10-23 18:17 ` Anthony Liguori
2008-10-23 19:51 ` Avi Kivity
0 siblings, 1 reply; 18+ messages in thread
From: Anthony Liguori @ 2008-10-23 18:17 UTC (permalink / raw)
To: Avi Kivity; +Cc: Gleb Natapov, kvm
Avi Kivity wrote:
> Anthony Liguori wrote:
>>
>> I thought you initially sent this to qemu-devel. Any reason not to
>> push this through QEMU instead of in KVM?
>>
>
> Since it requires bios changes, it is basically unpushable to qemu.
Why? As long as Gleb is willing to push those changes to Bochs, I'll
stick them in the bios.diff for now. The hard part is the dsdt changes
but if the build is changed to run the dsdt through cpp first, we can
just #ifdef BX_QEMU the qemu specific stuff.
> It may also depend on existing kvm bios and acpi changes.
How much dependency is there here?
>
> If it is possible to do this via qemu, of course I much prefer that
> route.
I looked through the patches. They're quite reasonable so I'd like to
push them into QEMU if it's possible.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
[not found] ` <20081023173748.GA13097@redhat.com>
@ 2008-10-23 18:18 ` Anthony Liguori
[not found] ` <20081023182153.GA13492@redhat.com>
0 siblings, 1 reply; 18+ messages in thread
From: Anthony Liguori @ 2008-10-23 18:18 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
Gleb Natapov wrote:
> On Thu, Oct 23, 2008 at 11:12:59AM -0500, Anthony Liguori wrote:
>
>> Hi Gleb,
>>
>> Gleb Natapov wrote:
>>
>>> Hello,
>>>
>>> This patch series adds S3 (suspend to RAM) ACPI state. Most changes
>>> are in the BIOS code and concern themselves with preventing BIOS from
>>> using memory available to OS.
>>>
>>>
>> I thought you initially sent this to qemu-devel. Any reason not to push
>> this through QEMU instead of in KVM?
>>
>>
> 90% of this patch touches BIOS code. It is easy to push QEMU bits
> upstream, but BIOS part may be problematic. KVM BIOS is already
> different from upstream.
>
I'm willing to expand the bios.diff that we have in QEMU as long as
someone is submitting the patches to bochs. In this case, I don't think
these changes are at all controversial.
Regards,
Anthony Liguori
> --
> Gleb.
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
[not found] ` <20081023182153.GA13492@redhat.com>
@ 2008-10-23 18:41 ` Anthony Liguori
0 siblings, 0 replies; 18+ messages in thread
From: Anthony Liguori @ 2008-10-23 18:41 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
Gleb Natapov wrote:
> On Thu, Oct 23, 2008 at 01:18:45PM -0500, Anthony Liguori wrote:
>
>>> 90% of this patch touches BIOS code. It is easy to push QEMU bits
>>> upstream, but BIOS part may be problematic. KVM BIOS is already
>>> different from upstream.
>>>
>>>
>> I'm willing to expand the bios.diff that we have in QEMU as long as
>> someone is submitting the patches to bochs. In this case, I don't think
>> these changes are at all controversial.
>>
>>
> I'll move BIOS changes to bochs BIOS next week. The hard part will be to
> run bochs and see if it works with those changes. Can bochs read QEMU
> disk images?
>
It can read raw disk images. I've played with bochs a little bit so if
you run into trouble let me know.
Thanks!
Regards,
Anthony Liguori
> --
> Gleb.
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
2008-10-23 18:17 ` Anthony Liguori
@ 2008-10-23 19:51 ` Avi Kivity
0 siblings, 0 replies; 18+ messages in thread
From: Avi Kivity @ 2008-10-23 19:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Gleb Natapov, kvm
Anthony Liguori wrote:
>>
>> Since it requires bios changes, it is basically unpushable to qemu.
>
> Why? As long as Gleb is willing to push those changes to Bochs, I'll
> stick them in the bios.diff for now. The hard part is the dsdt
> changes but if the build is changed to run the dsdt through cpp first,
> we can just #ifdef BX_QEMU the qemu specific stuff.
>
I forgot bios.diff. So yes, it's mergable into qemu.
>> It may also depend on existing kvm bios and acpi changes.
>
> How much dependency is there here?
>
I don't know; and that can be pulled as well (if anything needs pulling).
>>
>> If it is possible to do this via qemu, of course I much prefer that
>> route.
>
> I looked through the patches. They're quite reasonable so I'd like to
> push them into QEMU if it's possible.
That's the best way IMO as well.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] Support for S3 ACPI state (suspend to memory)
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
` (8 preceding siblings ...)
2008-10-23 16:12 ` [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Anthony Liguori
@ 2008-10-23 22:04 ` Sebastian Herbszt
9 siblings, 0 replies; 18+ messages in thread
From: Sebastian Herbszt @ 2008-10-23 22:04 UTC (permalink / raw)
To: Gleb Natapov, kvm
Gleb Natapov wrote:
> Hello,
>
> This patch series adds S3 (suspend to RAM) ACPI state. Most changes
> are in the BIOS code and concern themselves with preventing BIOS from
> using memory available to OS.
>
> ---
>
> Gleb Natapov (8):
> Don't power down vga card on entering S3 state.
> Add DPMS support to cirrus vga bios.
> Don't use unreserved memory in BIOS.
> Execute rombios32 code from rom address 0xe0000.
> Disable init of SMM.
> Add S3 state to DSDT. Handle resume event in the BIOS.
> Handle suspend in qemu.
> Move PIC initialization out of line to save space in post code area.
Earlier this year patches were posted on xen-devel for S3 support [1].
They include qemu [2] and rombios [3] changes. It might be worth checking
them out in case you did not.
[1] [PATCH 0/4] HVM Virtual S3
http://lists.xensource.com/archives/html/xen-devel/2007-05/msg00603.html
[2] [PATCH 2/4]: QEMU interface for HVM virtual S3
http://lists.xensource.com/archives/html/xen-devel/2007-05/msg00605.html
[3] [PATCH 3/4] rombios interface for HVM S3
http://lists.xensource.com/archives/html/xen-devel/2007-05/msg00606.html
- Sebastian
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/8] Add S3 state to DSDT. Handle resume event in the BIOS.
2008-10-23 14:05 ` [PATCH 3/8] Add S3 state to DSDT. Handle resume event in the BIOS Gleb Natapov
@ 2008-10-26 14:58 ` Avi Kivity
0 siblings, 0 replies; 18+ messages in thread
From: Avi Kivity @ 2008-10-26 14:58 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
Gleb Natapov wrote:
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> ---
>
> bios/acpi-dsdt.dsl | 33 ++++++++++++++++++-----
> bios/rombios.c | 35 +++++++++++++++++++++++++
> bios/rombios32.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++----
> 3 files changed, 130 insertions(+), 12 deletions(-)
>
> diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl
> index 577b3fe..02f53a1 100755
> --- a/bios/acpi-dsdt.dsl
> +++ b/bios/acpi-dsdt.dsl
> @@ -65,6 +65,32 @@ DefinitionBlock (
> gen_processor(14, E)
> }
>
> + /*
> + * S3 (suspend-to-ram), S4 (suspend-to-disc) and S5 (power-off) type codes:
> + * must match piix4 emulation.
> + */
> + Name (\_S3, Package (0x04)
> + {
> + 0x01, /* PM1a_CNT.SLP_TYP */
> + 0x01, /* PM1b_CNT.SLP_TYP */
> + Zero, /* reserved */
> + Zero /* reserved */
> + })
> + Name (\_S4, Package (0x04)
> + {
> + Zero, /* PM1a_CNT.SLP_TYP */
> + Zero, /* PM1b_CNT.SLP_TYP */
> + Zero, /* reserved */
> + Zero /* reserved */
> + })
> + Name (\_S5, Package (0x04)
> + {
> + Zero, /* PM1a_CNT.SLP_TYP */
> + Zero, /* PM1b_CNT.SLP_TYP */
> + Zero, /* reserved */
> + Zero /* reserved */
> + })
> +
> Scope (\)
> {
> /* Debug Output */
> @@ -626,13 +652,6 @@ DefinitionBlock (
> }
> }
>
> - /* S5 = power off state */
> - Name (_S5, Package (4) {
> - 0x00, // PM1a_CNT.SLP_TYP
> - 0x00, // PM2a_CNT.SLP_TYP
> - 0x00, // reserved
> - 0x00, // reserved
> - })
> Scope (\_GPE)
> {
>
Any reason for the code movement?
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2008-10-26 14:58 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23 14:05 [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Gleb Natapov
2008-10-23 14:05 ` [PATCH 1/8] Move PIC initialization out of line to save space in post code area Gleb Natapov
2008-10-23 14:05 ` [PATCH 2/8] Handle suspend in qemu Gleb Natapov
2008-10-23 14:05 ` [PATCH 3/8] Add S3 state to DSDT. Handle resume event in the BIOS Gleb Natapov
2008-10-26 14:58 ` Avi Kivity
2008-10-23 14:05 ` [PATCH 4/8] Disable init of SMM Gleb Natapov
2008-10-23 14:05 ` [PATCH 5/8] Execute rombios32 code from rom address 0xe0000 Gleb Natapov
2008-10-23 14:05 ` [PATCH 6/8] Don't use unreserved memory in BIOS Gleb Natapov
2008-10-23 14:05 ` [PATCH 7/8] Add DPMS support to cirrus vga bios Gleb Natapov
2008-10-23 14:05 ` [PATCH 8/8] Don't power down vga card on entering S3 state Gleb Natapov
2008-10-23 15:45 ` Anthony Liguori
2008-10-23 16:12 ` [PATCH 0/8] Support for S3 ACPI state (suspend to memory) Anthony Liguori
2008-10-23 16:38 ` Avi Kivity
2008-10-23 18:17 ` Anthony Liguori
2008-10-23 19:51 ` Avi Kivity
[not found] ` <20081023173748.GA13097@redhat.com>
2008-10-23 18:18 ` Anthony Liguori
[not found] ` <20081023182153.GA13492@redhat.com>
2008-10-23 18:41 ` Anthony Liguori
2008-10-23 22:04 ` Sebastian Herbszt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).