X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fresume.c;h=86c0555a8715bfa5cae6ea1f7ba4e53e87f1b9d4;hb=b24c574496eecaa7a8be91ec3653f0bc8c3b8f88;hp=1bffd499fb6533eb0c2d66df6f56258ce5c1e625;hpb=b1b7c2a1c3b940b787fdb5da67fc37003e9d7b0e;p=seabios.git diff --git a/src/resume.c b/src/resume.c index 1bffd49..86c0555 100644 --- a/src/resume.c +++ b/src/resume.c @@ -36,16 +36,18 @@ handle_resume(u8 status) struct bios_data_area_s *bda = MAKE_FARPTR(SEG_BDA, 0); switch (status) { case 0xfe: - // S3 resume request. Jump to 32bit mode to handle the resume. - asm volatile( - "movw %%ax, %%ss\n" - "movl %0, %%esp\n" - "pushl $_code32_s3_resume\n" - "jmp transition32\n" - : : "i"(BUILD_S3RESUME_STACK_ADDR), "a"(0) - ); - break; - + if (CONFIG_S3_RESUME) { + // S3 resume request. Jump to 32bit mode to handle the resume. + asm volatile( + "movw %%ax, %%ss\n" + "movl %0, %%esp\n" + "pushl $_code32_s3_resume\n" + "jmp transition32\n" + : : "i"(BUILD_S3RESUME_STACK_ADDR), "a"(0) + ); + break; + } + // NO BREAK case 0x00: case 0x09: case 0x0d ... 0xfd: @@ -97,6 +99,9 @@ handle_resume(u8 status) void VISIBLE32 s3_resume() { + if (!CONFIG_S3_RESUME) + BX_PANIC("S3 resume support not compiled in.\n"); + dprintf(1, "In 32bit resume\n"); smm_init();